<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v5.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-10-07T09:47:41Z</updated>
<entry>
<title>gpio: pca953x: Survive spurious interrupts</title>
<updated>2020-10-07T09:47:41Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2020-10-05T14:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b81edd80baf12d64420daff1759380aa9a14998'/>
<id>urn:sha1:8b81edd80baf12d64420daff1759380aa9a14998</id>
<content type='text'>
The pca953x driver never checks the result of irq_find_mapping(),
which returns 0 when no mapping is found. When a spurious interrupt
is delivered (which can happen under obscure circumstances), the
kernel explodes as it still tries to handle the error code as
a real interrupt.

Handle this particular case and warn on spurious interrupts.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20201005140217.1390851-1-maz@kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: Disable compat -&gt;read() code in UML case</title>
<updated>2020-10-07T09:42:03Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-10-05T13:10:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47e538d86d5776ac8152146c3ed3d22326243190'/>
<id>urn:sha1:47e538d86d5776ac8152146c3ed3d22326243190</id>
<content type='text'>
It appears that UML (arch/um) has no compat.h header defined and hence
can't compile a recently provided piece of code in GPIO library.

Disable compat -&gt;read() code in UML case to avoid compilation errors.

While at it, use pattern which is already being used in the kernel elsewhere.

Fixes: 5ad284ab3a01 ("gpiolib: Fix line event handling in syscall compatible mode")
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20201005131044.87276-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'gpio-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio</title>
<updated>2020-10-02T16:51:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-10-02T16:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0bf0dfda003eb98ca2b26441dec28751991d76d3'/>
<id>urn:sha1:0bf0dfda003eb98ca2b26441dec28751991d76d3</id>
<content type='text'>
Pull GPIO fixes from Linus Walleij:
 "Some late GPIO fixes for the v5.9 series:

   - Fix compiler warnings on the OMAP when PM is disabled

   - Clear the interrupt when setting edge sensitivity on the Spreadtrum
     driver.

   - Fix up spurious interrupts on the TC35894.

   - Support threaded interrupts on the Siox controller.

   - Fix resource leaks on the mockup driver.

   - Fix line event handling in syscall compatible mode for the
     character device.

   - Fix an unitialized variable in the PCA953A driver.

   - Fix access to all GPIO IRQs on the Aspeed AST2600.

   - Fix line direction on the AMD FCH driver.

   - Use the bitmap API instead of compiler intrinsics for bit
     manipulation in the PCA953x driver"

* tag 'gpio-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: pca953x: Correctly initialize registers 6 and 7 for PCA957x
  gpio: pca953x: Use bitmap API over implicit GCC extension
  gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION
  gpio: aspeed: fix ast2600 bank properties
  gpio/aspeed-sgpio: don't enable all interrupts by default
  gpio/aspeed-sgpio: enable access to all 80 input &amp; output sgpios
  gpio: pca953x: Fix uninitialized pending variable
  gpiolib: Fix line event handling in syscall compatible mode
  gpio: mockup: fix resource leak in error path
  gpio: siox: explicitly support only threaded irqs
  gpio: tc35894: fix up tc35894 interrupt configuration
  gpio: sprd: Clear interrupt when setting the type as edge
  gpio: omap: Fix warnings if PM is disabled
</content>
</entry>
<entry>
<title>gpio: pca953x: Correctly initialize registers 6 and 7 for PCA957x</title>
<updated>2020-10-01T08:00:18Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-09-30T14:20:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c1f1c34777bddb633d4a068a9c812d29974c6bd'/>
<id>urn:sha1:8c1f1c34777bddb633d4a068a9c812d29974c6bd</id>
<content type='text'>
When driver has been converted to the bitmap API the non-bitmap functions
started behaving differently on 32-bit BE architectures since the bytes in
two consequent unsigned longs are in different order in comparison to byte
array. Hence if the chip had had more than 32 lines the memset() call over
it would have not set up upper lines correctly.
Although it's currently a theoretical case (no supported chips of this type
has 32+ lines), it's better to provide a clean code to avoid people thinking
this is okay and potentially producing not fully working things.

Fixes: 35d13d94893f ("gpio: pca953x: convert to use bitmap API")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20200930142013.59247-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: pca953x: Use bitmap API over implicit GCC extension</title>
<updated>2020-10-01T08:00:17Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-09-30T14:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e09e200e07222467ef82367bff7cc6f44ad00397'/>
<id>urn:sha1:e09e200e07222467ef82367bff7cc6f44ad00397</id>
<content type='text'>
In IRQ handler we have to clear bitmap before use. Currently
the GCC extension has been used for that. For sake of the consistency
switch to bitmap API. As expected bloat-o-meter shows no difference
in the object size.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20200930142013.59247-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION</title>
<updated>2020-09-28T10:22:04Z</updated>
<author>
<name>Ed Wildgoose</name>
<email>lists@wildgooses.com</email>
</author>
<published>2020-09-28T09:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d25e8fdebdad84219b498873300b7f11dd915b88'/>
<id>urn:sha1:d25e8fdebdad84219b498873300b7f11dd915b88</id>
<content type='text'>
The original commit appears to have the logic reversed in
amd_fch_gpio_get_direction. Also confirmed by observing the value of
"direction" in the sys tree.

Signed-off-by: Ed Wildgoose &lt;lists@wildgooses.com&gt;
Fixes: e09d168f13f0 ("gpio: AMD G-Series PCH gpio driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: aspeed: fix ast2600 bank properties</title>
<updated>2020-09-24T13:37:18Z</updated>
<author>
<name>Tao Ren</name>
<email>rentao.bupt@gmail.com</email>
</author>
<published>2020-09-16T20:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e640b1eec38e4c8eba160f26cba4f592e657f3d'/>
<id>urn:sha1:3e640b1eec38e4c8eba160f26cba4f592e657f3d</id>
<content type='text'>
GPIO_U is mapped to the least significant byte of input/output mask, and
the byte in "output" mask should be 0 because GPIO_U is input only. All
the other bits need to be 1 because GPIO_V/W/X support both input and
output modes.

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the
according bits need to be 1 because GPIO_Y/Z support both input and
output modes.

Fixes: ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")
Signed-off-by: Tao Ren &lt;rentao.bupt@gmail.com&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio/aspeed-sgpio: don't enable all interrupts by default</title>
<updated>2020-09-24T13:10:56Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2020-09-11T01:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf0d394e885015941ed2d5724c0a6ed8d42dd95e'/>
<id>urn:sha1:bf0d394e885015941ed2d5724c0a6ed8d42dd95e</id>
<content type='text'>
Currently, the IRQ setup for the SGPIO driver enables all interrupts in
dual-edge trigger mode. Since the default handler is handle_bad_irq, any
state change on input GPIOs will trigger bad IRQ warnings.

This change applies sensible IRQ defaults: single-edge trigger, and all
IRQs disabled.

Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Fixes: 7db47faae79b ("gpio: aspeed: Add SGPIO driver")
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio/aspeed-sgpio: enable access to all 80 input &amp; output sgpios</title>
<updated>2020-09-24T13:10:40Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2020-09-11T01:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac67b07e268d46eba675a60c37051bb3e59fd201'/>
<id>urn:sha1:ac67b07e268d46eba675a60c37051bb3e59fd201</id>
<content type='text'>
Currently, the aspeed-sgpio driver exposes up to 80 GPIO lines,
corresponding to the 80 status bits available in hardware. Each of these
lines can be configured as either an input or an output.

However, each of these GPIOs is actually an input *and* an output; we
actually have 80 inputs plus 80 outputs.

This change expands the maximum number of GPIOs to 160; the lower half
of this range are the input-only GPIOs, the upper half are the outputs.
We fix the GPIO directions to correspond to this mapping.

This also fixes a bug when setting GPIOs - we were reading from the
input register, making it impossible to set more than one output GPIO.

Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Fixes: 7db47faae79b ("gpio: aspeed: Add SGPIO driver")
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: pca953x: Fix uninitialized pending variable</title>
<updated>2020-09-24T13:06:44Z</updated>
<author>
<name>Ye Li</name>
<email>ye.li@nxp.com</email>
</author>
<published>2020-09-23T09:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e43c26e12dd49a41cf5a4cd5c5b59a1eb98ed11e'/>
<id>urn:sha1:e43c26e12dd49a41cf5a4cd5c5b59a1eb98ed11e</id>
<content type='text'>
When pca953x_irq_pending returns false, the pending parameter won't
be set. But pca953x_irq_handler continues using this uninitialized
variable as pending irqs and will cause problem.
Fix the issue by initializing pending to 0.

Fixes: 064c73afe738 ("gpio: pca953x: Synchronize interrupt handler properly")
Signed-off-by: Ye Li &lt;ye.li@nxp.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
</feed>
