1. 17 12月, 2018 1 次提交
  2. 02 7月, 2018 1 次提交
  3. 24 5月, 2018 1 次提交
  4. 23 5月, 2018 4 次提交
  5. 16 5月, 2018 4 次提交
  6. 27 3月, 2018 1 次提交
  7. 03 12月, 2017 1 次提交
  8. 08 11月, 2017 1 次提交
  9. 14 8月, 2017 1 次提交
  10. 25 4月, 2017 1 次提交
  11. 23 3月, 2017 3 次提交
  12. 11 1月, 2017 1 次提交
  13. 25 11月, 2016 1 次提交
    • L
      gpio: simplify adding threaded interrupts · d245b3f9
      Linus Walleij 提交于
      This tries to simplify the use of CONFIG_GPIOLIB_IRQCHIP when
      using threaded interrupts: add a new call
      gpiochip_irqchip_add_nested() to indicate that we're dealing
      with a nested rather than a chained irqchip, then create a
      separate gpiochip_set_nested_irqchip() to mirror
      the gpiochip_set_chained_irqchip() call to connect the
      parent and child interrupts.
      
      In the nested case gpiochip_set_nested_irqchip() does nothing
      more than call irq_set_parent() on each valid child interrupt,
      which has little semantic effect in the kernel, but this is
      probably still formally correct.
      
      Update all drivers using nested interrupts to use
      gpiochip_irqchip_add_nested() so we can now see clearly
      which these users are.
      
      The DLN2 driver can drop its specific hack with
      .irq_not_threaded as we now recognize whether a chip is
      threaded or not from its use of gpiochip_irqchip_add_nested()
      signature rather than from inspecting .can_sleep.
      
      We rename the .irq_parent to .irq_chained_parent since this
      parent IRQ is only really kept around for the chained
      interrupt handlers.
      
      Cc: Lars Poeschel <poeschel@lemonage.de>
      Cc: Octavian Purdila <octavian.purdila@intel.com>
      Cc: Daniel Baluta <daniel.baluta@intel.com>
      Cc: Bin Gao <bin.gao@linux.intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>
      Cc: Semen Protsenko <semen.protsenko@globallogic.com>
      Cc: Alexander Stein <alexander.stein@systec-electronic.com>
      Cc: Phil Reid <preid@electromag.com.au>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d245b3f9
  14. 08 11月, 2016 2 次提交
  15. 24 10月, 2016 1 次提交
  16. 12 10月, 2016 1 次提交
  17. 24 9月, 2016 2 次提交
    • W
      gpio: pca953x: variable 'id' was used twice · 6212e1d6
      Wolfram Sang 提交于
      sparse  rightfully said:
      
      drivers/gpio/gpio-pca953x.c:771:45: warning: symbol 'id' shadows an earlier one
      drivers/gpio/gpio-pca953x.c:742:36: originally declared here
      
      So, name them explicitly 'i2c_id' and 'acpi_id' to avoid any confusion.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      6212e1d6
    • B
      gpio: pca953x: fix an incorrect lockdep warning · 559b4699
      Bartosz Golaszewski 提交于
      If an I2C GPIO multiplexer is driven by a GPIO provided by an expander
      when there's a second expander using the same device driver on one of
      the I2C bus segments, lockdep prints a deadlock warning when trying to
      set the direction or the value of the GPIOs provided by the second
      expander.
      
      The below diagram presents the setup:
      
                                                     - - - - -
       -------             ---------  Bus segment 1 |         |
      |       |           |         |---------------  Devices
      |       | SCL/SDA   |         |               |         |
      | Linux |-----------| I2C MUX |                - - - - -
      |       |    |      |         | Bus segment 2
      |       |    |      |         |-------------------
       -------     |       ---------                    |
                   |           |                    - - - - -
              ------------     | MUX GPIO          |         |
             |            |    |                     Devices
             |    GPIO    |    |                   |         |
             | Expander 1 |----                     - - - - -
             |            |                             |
              ------------                              | SCL/SDA
                                                        |
                                                   ------------
                                                  |            |
                                                  |    GPIO    |
                                                  | Expander 2 |
                                                  |            |
                                                   ------------
      
      The reason for lockdep warning is that we take the chip->i2c_lock in
      pca953x_gpio_set_value() or pca953x_gpio_direction_output() and then
      come right back to pca953x_gpio_set_value() when the GPIO mux kicks
      in. The locks actually protect different expanders, but for lockdep
      both are of the same class, so it says:
      
        Possible unsafe locking scenario:
      
              CPU0
              ----
         lock(&chip->i2c_lock);
         lock(&chip->i2c_lock);
      
        *** DEADLOCK ***
      
        May be due to missing lock nesting notation
      
      In order to get rid of the warning, retrieve the adapter nesting depth
      and use it as lockdep subclass for chip->i2c_lock.
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Acked-by: NPeter Rosin <peda@axentia.se>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      559b4699
  18. 13 9月, 2016 1 次提交
  19. 12 9月, 2016 6 次提交
  20. 07 9月, 2016 1 次提交
  21. 11 8月, 2016 1 次提交
  22. 15 6月, 2016 1 次提交
  23. 13 6月, 2016 1 次提交
  24. 08 6月, 2016 1 次提交
    • A
      gpio: pca953x: enfore type for i2c_smbus_write_word_data() · c4d1cbd7
      Andy Shevchenko 提交于
      The commit 9b8e3ec3 ("gpio: pca953x: Use correct u16 value for register
      word write") fixed regression in pca953x_write_regs(). At the same time the
      solution introduced a sparse warning:
      
      drivers/gpio/gpio-pca953x.c:168:39: warning: incorrect type in argument 3 (different base types)
      drivers/gpio/gpio-pca953x.c:168:39:    expected unsigned short [unsigned] [usertype] value
      drivers/gpio/gpio-pca953x.c:168:39:    got restricted __le16 [usertype] <noident>
      
      Fix the code by enforcing the type of i2c_smbus_write_word_data() parameter.
      
      Cc: Yong Li <sdliyong@gmail.com>
      Cc: Phil Reid <preid@electromag.com.au>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c4d1cbd7
  25. 07 6月, 2016 1 次提交