<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v5.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-02-10T13:47:27Z</updated>
<entry>
<title>gpio: ep93xx: Fix single irqchip with multi gpiochips</title>
<updated>2021-02-10T13:47:27Z</updated>
<author>
<name>Nikita Shubin</name>
<email>nikita.shubin@maquefel.me</email>
</author>
<published>2021-02-09T13:31:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28dc10eb77a2db7681b08e3b109764bbe469e347'/>
<id>urn:sha1:28dc10eb77a2db7681b08e3b109764bbe469e347</id>
<content type='text'>
Fixes the following warnings which results in interrupts disabled on
port B/F:

gpio gpiochip1: (B): detected irqchip that is shared with multiple gpiochips: please fix the driver.
gpio gpiochip5: (F): detected irqchip that is shared with multiple gpiochips: please fix the driver.

- added separate irqchip for each interrupt capable gpiochip
- provided unique names for each irqchip

Fixes: d2b091961510 ("gpio: ep93xx: Pass irqchip when adding gpiochip")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: ep93xx: fix BUG_ON port F usage</title>
<updated>2021-02-10T13:47:16Z</updated>
<author>
<name>Nikita Shubin</name>
<email>nikita.shubin@maquefel.me</email>
</author>
<published>2021-02-09T13:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b81a7ab8055d01d827ef66374b126eeac3bd108'/>
<id>urn:sha1:8b81a7ab8055d01d827ef66374b126eeac3bd108</id>
<content type='text'>
Two index spaces and ep93xx_gpio_port are confusing.

Instead add a separate struct to store necessary data and remove
ep93xx_gpio_port.

- add struct to store IRQ related data for each IRQ capable chip
- replace offset array with defined offsets
- add IRQ registers offset for each IRQ capable chip into
  ep93xx_gpio_banks

------------[ cut here ]------------
kernel BUG at drivers/gpio/gpio-ep93xx.c:64!
---[ end trace 3f6544e133e9f5ae ]---

Fixes: fd935fc421e74 ("gpio: ep93xx: Do not pingpong irq numbers")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: mxs: GPIO_MXS should not default to y unconditionally</title>
<updated>2021-02-10T13:25:59Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-02-08T14:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97c6e28d388a5000d780d2a63c32f422827f5aa3'/>
<id>urn:sha1:97c6e28d388a5000d780d2a63c32f422827f5aa3</id>
<content type='text'>
Merely enabling CONFIG_COMPILE_TEST should not enable additional code.
To fix this, restrict the automatic enabling of GPIO_MXS to ARCH_MXS,
and ask the user in case of compile-testing.

Fixes: 6876ca311bfca5d7 ("gpio: mxs: add COMPILE_TEST support for GPIO_MXS")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: gpiolib: remove shadowed variable</title>
<updated>2021-02-01T12:24:28Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2021-01-05T10:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c07ea8d0b170c0cf6592a53981841c7973e142ea'/>
<id>urn:sha1:c07ea8d0b170c0cf6592a53981841c7973e142ea</id>
<content type='text'>
After refactoring, we had two variables for the same thing. Remove the
second declaration, one is enough here. Found by cppcheck.

drivers/gpio/gpiolib.c:2551:17: warning: Local variable 'ret' shadows outer variable [shadowVariable]

Fixes: d377f56f34f5 ("gpio: gpiolib: Normalize return code variable name")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpiolib: free device name on error path to fix kmemleak</title>
<updated>2021-01-29T13:59:10Z</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2021-01-29T08:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c351bb64cbe67029c68dea3adbec1b9508c6ff0f'/>
<id>urn:sha1:c351bb64cbe67029c68dea3adbec1b9508c6ff0f</id>
<content type='text'>
In gpiochip_add_data_with_key, we should check the return value of
dev_set_name to ensure that device name is allocated successfully
and then add a label on the error path to free device name to fix
kmemleak as below:

unreferenced object 0xc2d6fc40 (size 64):
  comm "kworker/0:1", pid 16, jiffies 4294937425 (age 65.120s)
  hex dump (first 32 bytes):
    67 70 69 6f 63 68 69 70 30 00 1a c0 54 63 1a c0  gpiochip0...Tc..
    0c ed 84 c0 48 ed 84 c0 3c ee 84 c0 10 00 00 00  ....H...&lt;.......
  backtrace:
    [&lt;962810f7&gt;] kobject_set_name_vargs+0x2c/0xa0
    [&lt;f50797e6&gt;] dev_set_name+0x2c/0x5c
    [&lt;94abbca9&gt;] gpiochip_add_data_with_key+0xfc/0xce8
    [&lt;5c4193e0&gt;] omap_gpio_probe+0x33c/0x68c
    [&lt;3402f137&gt;] platform_probe+0x58/0xb8
    [&lt;7421e210&gt;] really_probe+0xec/0x3b4
    [&lt;000f8ada&gt;] driver_probe_device+0x58/0xb4
    [&lt;67e0f7f7&gt;] bus_for_each_drv+0x80/0xd0
    [&lt;4de545dc&gt;] __device_attach+0xe8/0x15c
    [&lt;2e4431e7&gt;] bus_probe_device+0x84/0x8c
    [&lt;c18b1de9&gt;] device_add+0x384/0x7c0
    [&lt;5aff2995&gt;] of_platform_device_create_pdata+0x8c/0xb8
    [&lt;061c3483&gt;] of_platform_bus_create+0x198/0x230
    [&lt;5ee6d42a&gt;] of_platform_populate+0x60/0xb8
    [&lt;2647300f&gt;] sysc_probe+0xd18/0x135c
    [&lt;3402f137&gt;] platform_probe+0x58/0xb8

Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpiolib: cdev: clear debounce period if line set to output</title>
<updated>2021-01-27T14:52:13Z</updated>
<author>
<name>Kent Gibson</name>
<email>warthog618@gmail.com</email>
</author>
<published>2021-01-21T14:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03a58ea5905fdbd93ff9e52e670d802600ba38cd'/>
<id>urn:sha1:03a58ea5905fdbd93ff9e52e670d802600ba38cd</id>
<content type='text'>
When set_config changes a line from input to output debounce is
implicitly disabled, as debounce makes no sense for outputs, but the
debounce period is not being cleared and is still reported in the
line info.

So clear the debounce period when the debouncer is stopped in
edge_detector_stop().

Fixes: 65cff7046406 ("gpiolib: cdev: support setting debounce")
Cc: stable@vger.kernel.org
Signed-off-by: Kent Gibson &lt;warthog618@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: tegra: Add missing dependencies</title>
<updated>2021-01-19T12:37:10Z</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2021-01-18T19:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=298d75c9b18875d2d582dcd5145a45cac8d2bae2'/>
<id>urn:sha1:298d75c9b18875d2d582dcd5145a45cac8d2bae2</id>
<content type='text'>
Commit efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip") moved the
Tegra GPIO driver to the generic GPIO IRQ chip infrastructure and made
the IRQ domain hierarchical, so the driver needs to pull in the support
infrastructure via the GPIOLIB_IRQCHIP and IRQ_DOMAIN_HIERARCHY Kconfig
options.

Fixes: efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: sifive: select IRQ_DOMAIN_HIERARCHY rather than depend on it</title>
<updated>2021-01-19T11:09:42Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2021-01-19T03:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18eedf2b5ec7c8ce2bb23d9148cfd63949207414'/>
<id>urn:sha1:18eedf2b5ec7c8ce2bb23d9148cfd63949207414</id>
<content type='text'>
This is the only driver in the kernel source tree that depends on
IRQ_DOMAIN_HIERARCHY instead of selecting it. Since it is not a
visible Kconfig symbol, depending on it (expecting a user to
set/enable it) doesn't make much sense, so change it to select
instead of "depends on".

Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Cc: linux-gpio@vger.kernel.org
Cc: Thierry Reding &lt;treding@nvidia.com&gt;
Cc: Greentime Hu &lt;greentime.hu@sifive.com&gt;
Cc: Yash Shah &lt;yash.shah@sifive.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpio: mvebu: fix pwm .get_state period calculation</title>
<updated>2021-01-19T10:58:22Z</updated>
<author>
<name>Baruch Siach</name>
<email>baruch@tkos.co.il</email>
</author>
<published>2021-01-17T13:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e73b0101ae5124bf7cd3fb5d250302ad2f16a416'/>
<id>urn:sha1:e73b0101ae5124bf7cd3fb5d250302ad2f16a416</id>
<content type='text'>
The period is the sum of on and off values. That is, calculate period as

  ($on + $off) / clkrate

instead of

  $off / clkrate - $on / clkrate

that makes no sense.

Reported-by: Russell King &lt;linux@armlinux.org.uk&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Fixes: 757642f9a584e ("gpio: mvebu: Add limited PWM support")
Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
<entry>
<title>gpiolib: add a warning on gpiochip-&gt;to_irq defined</title>
<updated>2021-01-19T10:51:15Z</updated>
<author>
<name>Nikita Shubin</name>
<email>nikita.shubin@maquefel.me</email>
</author>
<published>2021-01-18T09:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef38237444ce952daf041ed2885918f9f7d1e997'/>
<id>urn:sha1:ef38237444ce952daf041ed2885918f9f7d1e997</id>
<content type='text'>
gpiochip-&gt;to_irq method is redefined in gpiochip_add_irqchip.

A lot of gpiod driver's still define -&gt;to_irq method, let's give
a gentle warning that they can no longer rely on it, so they can remove
it on ocassion.

Fixes: e0d8972898139 ("gpio: Implement tighter IRQ chip integration")
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
</content>
</entry>
</feed>
