1. 08 4月, 2019 1 次提交
  2. 22 3月, 2019 1 次提交
  3. 08 3月, 2019 1 次提交
  4. 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
  5. 20 2月, 2019 1 次提交
  6. 14 2月, 2019 1 次提交
  7. 13 2月, 2019 1 次提交
  8. 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
  9. 11 1月, 2019 1 次提交
  10. 17 12月, 2018 1 次提交
  11. 14 12月, 2018 14 次提交
  12. 02 7月, 2018 1 次提交
  13. 24 5月, 2018 1 次提交
  14. 23 5月, 2018 4 次提交
  15. 16 5月, 2018 4 次提交
  16. 27 3月, 2018 1 次提交
  17. 03 12月, 2017 1 次提交
  18. 08 11月, 2017 1 次提交
  19. 14 8月, 2017 1 次提交
  20. 25 4月, 2017 1 次提交