1. 24 10月, 2016 2 次提交
  2. 12 10月, 2016 1 次提交
  3. 04 10月, 2016 3 次提交
  4. 03 10月, 2016 2 次提交
    • L
      gpio: OF: separation of concerns · ea713bc4
      Linus Walleij 提交于
      The generic GPIO library directly implement code for of_find_gpio()
      which is only used with CONFIG_OF and causes compilation problems
      on archs that do not even have stubs for OF functions, especially
      on UM that does not implement any IO remap functions.
      
      Move the function to gpiolib-of.c, implement a static inline stub
      in gpiolib.h returning PTR_ERR(-ENOENT) if CONFIG_OF_GPIO is not
      set and be done with it.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ea713bc4
    • L
      gpio: make memory-mapped drivers depend on HAS_IOMEM · 3085a4a4
      Linus Walleij 提交于
      This one is pretty obvious: on UM Linux compilation of things
      like allmodconfig and allyesconfig will fail due to the
      absence of IO memory. Simply make these drivers depend on
      HAS_IOMEM, it has been implicitly assumed all the time, so
      just make it explicit.
      
      The generic MMIO library also assumes that IOMEM is present
      so make also this depend on HAS_IOMEM.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      3085a4a4
  5. 01 10月, 2016 2 次提交
  6. 29 9月, 2016 1 次提交
  7. 27 9月, 2016 1 次提交
  8. 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
  9. 23 9月, 2016 5 次提交
  10. 19 9月, 2016 2 次提交
  11. 18 9月, 2016 2 次提交
  12. 15 9月, 2016 8 次提交
    • W
      gpio: aspeed: fix return value check in aspeed_gpio_probe() · 7f8b9657
      Wei Yongjun 提交于
      In case of error, the function devm_ioremap_resource() returns ERR_PTR()
      and never returns NULL. The NULL test in the return value check should
      be replaced with IS_ERR().
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7f8b9657
    • P
      gpio: wcove: fix implicit assumption module.h is present · 39d80072
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/gpio/Kconfig:config GPIO_WHISKEY_COVE
      drivers/gpio/Kconfig:   tristate "GPIO support for Whiskey Cove PMIC"
      
      ...but however it does not include module.h -- it in turn gets it from
      another header (gpio/driver.h) and we'd like to replace that with a
      forward delcaration of "struct module;" but if we do, this file will
      fail to compile.
      
      So we fix this first to avoid putting build failures into the bisect
      commit history.
      
      Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>
      Cc: Bin Gao <bin.gao@intel.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      39d80072
    • P
      gpio: loongson1: fix implicit assumption module.h is present · 5f604506
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/gpio/Kconfig:config GPIO_LOONGSON1
      drivers/gpio/Kconfig:   tristate "Loongson1 GPIO support"
      
      ...but however it does not include module.h -- it in turn gets it from
      another header (gpio/driver.h) and we'd like to replace that with a
      forward delcaration of "struct module;" but if we do, this file will
      fail to compile.
      
      So we fix this first to avoid putting build failures into the bisect
      commit history.
      
      Cc: Keguang Zhang <keguang.zhang@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5f604506
    • P
      gpio: ath79: fix implicit assumption module.h is present · 2034b9dc
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/gpio/Kconfig:config GPIO_ATH79
      drivers/gpio/Kconfig: tristate "Atheros AR71XX/AR724X/AR913X GPIO support"
      
      ...but however it does not include module.h -- it in turn gets it from
      another header (gpio/driver.h) and we'd like to replace that with a
      forward delcaration of "struct module;" but if we do, this file will
      fail to compile.
      
      So we fix this first to avoid putting build failures into the bisect
      commit history.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2034b9dc
    • P
      gpio: altera: fix implicit assumption module.h is present · 7b5409ee
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/gpio/Kconfig:config GPIO_ALTERA
      drivers/gpio/Kconfig:   tristate "Altera GPIO"
      
      ...but however it does not include module.h -- it in turn gets it from
      another header (gpio/driver.h) and we'd like to replace that with a
      forward delcaration of "struct module;" but if we do, this file will
      fail to compile.
      
      So we fix this first to avoid putting build failures into the bisect
      commit history.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7b5409ee
    • P
      gpio: ts4800: fix implicit assumption module.h is present · 7de9a6c7
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/gpio/Kconfig:config GPIO_TS4800
      drivers/gpio/Kconfig: tristate "TS-4800 DIO blocks and compatibles"
      
      ...but however it does not include module.h -- it in turn gets it from
      another header (gpio/driver.h) and we'd like to replace that with a
      forward delcaration of "struct module;" but if we do, this file will
      fail to compile.
      
      So we fix this first to avoid putting build failures into the bisect
      commit history.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7de9a6c7
    • P
      gpio: sx150x: fix implicit assumption module.h is present · bb411e77
      Paul Gortmaker 提交于
      This file is currently getting module.h from a global gpio header
      and it will faii to build once we remove module.h from that.
      
      However, the driver is controlled with the following Kconfig:
      
      drivers/gpio/Kconfig:config GPIO_SX150X
      drivers/gpio/Kconfig:   bool "Semtech SX150x I2C GPIO expander"
      
      and hence the two lines of MODULE_DEVICE_TABLE are no-ops that
      can simply be deleted.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      bb411e77
    • P
      gpio: palmas: fix implicit assumption module.h is present · a86e87e8
      Paul Gortmaker 提交于
      This file is currently getting module.h from a global gpio header
      and it will fail to build once we remove module.h from that.
      
      However, the driver is controlled with the following Kconfig:
      
      drivers/gpio/Kconfig:config GPIO_PALMAS
      drivers/gpio/Kconfig:   bool "TI PALMAS series PMICs GPIO"
      
      and hence the line of MODULE_DEVICE_TABLE is a no-op that can simply
      be deleted.  In fact it should have been removed in an earlier commit
      that did demodularization, however the unseen include prevented my
      build testing from detecting it.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a86e87e8
  13. 13 9月, 2016 5 次提交
  14. 12 9月, 2016 4 次提交