1. 29 4月, 2020 3 次提交
  2. 17 4月, 2020 1 次提交
  3. 16 4月, 2020 1 次提交
  4. 11 12月, 2019 3 次提交
  5. 05 12月, 2019 5 次提交
  6. 07 11月, 2019 1 次提交
  7. 28 8月, 2019 2 次提交
  8. 02 8月, 2019 4 次提交
  9. 08 6月, 2019 1 次提交
    • H
      gpio: pca953x: hack to fix 24 bit gpio expanders · 3b00691c
      H. Nikolaus Schaller 提交于
      24 bit expanders use REG_ADDR_AI in combination with register addressing. This
      conflicts with regmap which takes this bit as part of the register number,
      i.e. a second cache entry is defined for accessed with REG_ADDR_AI being
      set although on the chip it is the same register as with REG_ADDR_AI being
      cleared.
      
      The problem was introduced by
      
      	commit b32cecb4 ("gpio: pca953x: Extract the register address mangling to single function")
      
      but only became visible by
      
      	commit 8b9f9d4d ("regmap: verify if register is writeable before writing operations")
      
      because before, the regmap size was effectively ignored and
      pca953x_writeable_register() did know to ignore REG_ADDR_AI. Still, there
      were two separate cache entries created.
      
      Since the use of REG_ADDR_AI seems to be static we can work around this
      issue by simply increasing the size of the regmap to cover the "virtual"
      registers with REG_ADDR_AI being set. This only means that half of the
      regmap buffer will be unused.
      Reported-by: NH. Nikolaus Schaller <hns@goldelico.com>
      Suggested-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      3b00691c
  10. 05 6月, 2019 1 次提交
  11. 03 6月, 2019 1 次提交
  12. 11 4月, 2019 2 次提交
  13. 08 4月, 2019 1 次提交
  14. 22 3月, 2019 1 次提交
  15. 08 3月, 2019 1 次提交
  16. 01 3月, 2019 1 次提交
    • M
      gpio: pca953x: Fix dereference of irq data in shutdown · c378b3aa
      Mark Walton 提交于
      If a PCA953x gpio was used as an interrupt and then released,
      the shutdown function was trying to extract the pca953x_chip
      pointer directly from the irq_data, but in reality was getting
      the gpio_chip structure.
      
      The net effect was that the subsequent writes to the data
      structure corrupted data in the gpio_chip structure, which wasn't
      immediately obvious until attempting to use the GPIO again in the
      future, at which point the kernel panics.
      
      This fix correctly extracts the pca953x_chip structure via the
      gpio_chip structure, as is correctly done in the other irq
      functions.
      
      Fixes: 0a70fe00 ("gpio: pca953x: Clear irq trigger type on irq shutdown")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMark Walton <mark.walton@serialtek.com>
      Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c378b3aa
  17. 20 2月, 2019 1 次提交
  18. 14 2月, 2019 1 次提交
  19. 13 2月, 2019 1 次提交
  20. 21 1月, 2019 2 次提交
    • T
      gpio: pca953x: use a per instance irq_chip structure · 5c4fee63
      Thomas Petazzoni 提交于
      When a system has two PCA953x GPIO expanders, the kernel complains with:
      
      gpio gpiochip2: (0-0021): detected irqchip that is shared with multiple gpiochips: please fix the driver.
      
      Indeed, there is a single instance of "struct irq_chip" that gets
      re-used for both PCA953x instance. This commit moves the "struct
      irq_chip" to be part of the "struct pca953x_chip", so that we have one
      "struct irq_chip" per PCA953X instance.
      
      As part of this, the name of the irq_chip is also made different on a
      per-instance basis, now using the dev_name() of the I2C device. This
      changes what is visible in /proc/interrupts.
      
      Before:
      
       47:          0          0   pca953x  10 Edge      e0100000.sdhci cd
       48:          0          0   pca953x   6 Edge      e0101000.sdhci cd
      
      After:
      
       47:          0          0    0-0020  10 Edge      e0100000.sdhci cd
       48:          2          0    0-0020   6 Edge      e0101000.sdhci cd
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5c4fee63
    • T
      gpio: pca953x: reduce indentation level in pca953x_irq_setup() · 7341fa7a
      Thomas Petazzoni 提交于
      The current design of pca953x_irq_setup() is:
      
       if (all conditions to support IRQ are met) {
         lots of code to support IRQs, which goes to a serious indentation
         level.
       }
      
       return 0;
      
      It makes more sense to handle this like this:
      
       if (!all conditions to support IRQ are met)
         return 0;
      
       handle IRQ support
      
      This commit does just this change, reducing by one tab the indentation
      level of the IRQ setup code. Thanks to this reduced indentation level,
      we are less restricted by the 80-column limit, and we can have more
      function arguments on the same line.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7341fa7a
  21. 11 1月, 2019 1 次提交
  22. 17 12月, 2018 1 次提交
  23. 14 12月, 2018 4 次提交