<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/pinctrl, branch v5.17</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.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-02-28T22:53:19Z</updated>
<entry>
<title>pinctrl: sunxi: Use unique lockdep classes for IRQs</title>
<updated>2022-02-28T22:53:19Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-02-16T04:00:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bac129dbc6560dfeb634c03f0c08b78024e71915'/>
<id>urn:sha1:bac129dbc6560dfeb634c03f0c08b78024e71915</id>
<content type='text'>
This driver, like several others, uses a chained IRQ for each GPIO bank,
and forwards .irq_set_wake to the GPIO bank's upstream IRQ. As a result,
a call to irq_set_irq_wake() needs to lock both the upstream and
downstream irq_desc's. Lockdep considers this to be a possible deadlock
when the irq_desc's share lockdep classes, which they do by default:

 ============================================
 WARNING: possible recursive locking detected
 5.17.0-rc3-00394-gc849047c2473 #1 Not tainted
 --------------------------------------------
 init/307 is trying to acquire lock:
 c2dfe27c (&amp;irq_desc_lock_class){-.-.}-{2:2}, at: __irq_get_desc_lock+0x58/0xa0

 but task is already holding lock:
 c3c0ac7c (&amp;irq_desc_lock_class){-.-.}-{2:2}, at: __irq_get_desc_lock+0x58/0xa0

 other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;irq_desc_lock_class);
   lock(&amp;irq_desc_lock_class);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

 4 locks held by init/307:
  #0: c1f29f18 (system_transition_mutex){+.+.}-{3:3}, at: __do_sys_reboot+0x90/0x23c
  #1: c20f7760 (&amp;dev-&gt;mutex){....}-{3:3}, at: device_shutdown+0xf4/0x224
  #2: c2e804d8 (&amp;dev-&gt;mutex){....}-{3:3}, at: device_shutdown+0x104/0x224
  #3: c3c0ac7c (&amp;irq_desc_lock_class){-.-.}-{2:2}, at: __irq_get_desc_lock+0x58/0xa0

 stack backtrace:
 CPU: 0 PID: 307 Comm: init Not tainted 5.17.0-rc3-00394-gc849047c2473 #1
 Hardware name: Allwinner sun8i Family
  unwind_backtrace from show_stack+0x10/0x14
  show_stack from dump_stack_lvl+0x68/0x90
  dump_stack_lvl from __lock_acquire+0x1680/0x31a0
  __lock_acquire from lock_acquire+0x148/0x3dc
  lock_acquire from _raw_spin_lock_irqsave+0x50/0x6c
  _raw_spin_lock_irqsave from __irq_get_desc_lock+0x58/0xa0
  __irq_get_desc_lock from irq_set_irq_wake+0x2c/0x19c
  irq_set_irq_wake from irq_set_irq_wake+0x13c/0x19c
    [tail call from sunxi_pinctrl_irq_set_wake]
  irq_set_irq_wake from gpio_keys_suspend+0x80/0x1a4
  gpio_keys_suspend from gpio_keys_shutdown+0x10/0x2c
  gpio_keys_shutdown from device_shutdown+0x180/0x224
  device_shutdown from __do_sys_reboot+0x134/0x23c
  __do_sys_reboot from ret_fast_syscall+0x0/0x1c

However, this can never deadlock because the upstream and downstream
IRQs are never the same (nor do they even involve the same irqchip).

Silence this erroneous lockdep splat by applying what appears to be the
usual fix of moving the GPIO IRQs to separate lockdep classes.

Fixes: a59c99d9eaf9 ("pinctrl: sunxi: Forward calls to irq_set_irq_wake")
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20220216040037.22730-1-samuel@sholland.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl-sunxi: sunxi_pinctrl_gpio_direction_in/output: use correct offset</title>
<updated>2022-02-28T22:52:20Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil-cisco@xs4all.nl</email>
</author>
<published>2022-01-26T11:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7795686d573de0438bba6b2b344e6b203223c889'/>
<id>urn:sha1:7795686d573de0438bba6b2b344e6b203223c889</id>
<content type='text'>
The commit that sets the direction directly without calling
pinctrl_gpio_direction(), forgot to add chip-&gt;base to the offset when
calling sunxi_pmx_gpio_set_direction().

This caused failures for various Allwinner boards which have two
GPIO blocks.

Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Reported-by: 5kft &lt;5kft@5kft.org&gt;
Suggested-by: 5kft &lt;5kft@5kft.org&gt;
Reported-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Fixes: 8df89a7cbc63 (pinctrl-sunxi: don't call pinctrl_gpio_direction())
Tested-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Tested-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Link: https://lore.kernel.org/r/0f536cd8-01db-5d16-2cec-ec6d19409a49@xs4all.nl
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
[Picked from linux-next to pinctrl fixes]
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'intel-pinctrl-v5.17-5' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into fixes</title>
<updated>2022-02-19T01:03:58Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-02-19T01:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=486c2d15aa812d669bb27f8241aa5d5dafbac5b9'/>
<id>urn:sha1:486c2d15aa812d669bb27f8241aa5d5dafbac5b9</id>
<content type='text'>
intel-pinctrl for v5.17-5

* Revert misplaced ID

The following is an automated git shortlog grouped by driver:

tigerlake:
 -  Revert "Add Alder Lake-M ACPI ID"
</content>
</entry>
<entry>
<title>pinctrl: starfive: Use a static name for the GPIO irq_chip</title>
<updated>2022-02-19T00:50:23Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2022-02-11T09:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64fd52a4d3ce63a327948cefc8e4e5c7ef35e813'/>
<id>urn:sha1:64fd52a4d3ce63a327948cefc8e4e5c7ef35e813</id>
<content type='text'>
Drop the device name used for the GPIO irq_chip and replace it
with something static. The information is still available from
debugfs and carried as part of the irqdomain.

Suggested-by: Emil Renner Berthing &lt;kernel@esmil.dk&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Bartosz Golaszewski &lt;brgl@bgdev.pl&gt;
Link: https://lore.kernel.org/r/20220211092345.1093332-1-maz@kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID"</title>
<updated>2022-02-15T17:02:46Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-12-14T17:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f66db29e2415cbe8759c48584f9cae19b3c2651'/>
<id>urn:sha1:6f66db29e2415cbe8759c48584f9cae19b3c2651</id>
<content type='text'>
It appears that last minute change moved ACPI ID of Alder Lake-M
to the INTC1055, which is already in the driver.

This ID on the other hand will be used elsewhere.

This reverts commit 258435a1c8187f559549e515d2f77fa0b57bcd27.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: k210: Fix bias-pull-up</title>
<updated>2022-02-11T01:19:47Z</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2022-02-09T18:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9f7b9228a94778edb7a63fde3c0a3c5bb793064'/>
<id>urn:sha1:e9f7b9228a94778edb7a63fde3c0a3c5bb793064</id>
<content type='text'>
Using bias-pull-up would actually cause the pin to have its pull-down
enabled. Fix this.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")
Link: https://lore.kernel.org/r/20220209182822.640905-1-seanga2@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: fix loop in k210_pinconf_get_drive()</title>
<updated>2022-02-11T01:18:35Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-02-09T18:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba2ab85951c91a140a8fa51d8347d54e59ec009d'/>
<id>urn:sha1:ba2ab85951c91a140a8fa51d8347d54e59ec009d</id>
<content type='text'>
The loop exited too early so the k210_pinconf_drive_strength[0] array
element was never used.

Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20220209180804.GA18385@kili
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: microchip-sgpio: Fix support for regmap</title>
<updated>2022-01-31T11:07:31Z</updated>
<author>
<name>Horatiu Vultur</name>
<email>horatiu.vultur@microchip.com</email>
</author>
<published>2022-01-31T08:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=baf927a833ca2c6717795ac131079f485cb7a5dc'/>
<id>urn:sha1:baf927a833ca2c6717795ac131079f485cb7a5dc</id>
<content type='text'>
Initially the driver accessed the registers using u32 __iomem but then
in the blamed commit it changed it to use regmap. The problem is that now
the offset of the registers is not calculated anymore at word offset but
at byte offset. Therefore make sure to multiply the offset with word size.

Acked-by: Steen Hegelund &lt;Steen.Hegelund@microchip.com&gt;
Reviewed-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Fixes: 2afbbab45c261a ("pinctrl: microchip-sgpio: update to support regmap")
Signed-off-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20220131085201.307031-1-horatiu.vultur@microchip.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: bcm63xx: fix unmet dependency on REGMAP for GPIO_REGMAP</title>
<updated>2022-01-30T01:44:00Z</updated>
<author>
<name>Julian Braha</name>
<email>julianbraha@gmail.com</email>
</author>
<published>2022-01-17T06:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a5286955bf5febc3d151bcb2c5e272e383b64aa'/>
<id>urn:sha1:3a5286955bf5febc3d151bcb2c5e272e383b64aa</id>
<content type='text'>
When PINCTRL_BCM63XX is selected,
and REGMAP is not selected,
Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIO_REGMAP
  Depends on [n]: GPIOLIB [=y] &amp;&amp; REGMAP [=n]
  Selected by [y]:
  - PINCTRL_BCM63XX [=y] &amp;&amp; PINCTRL [=y]

This is because PINCTRL_BCM63XX
selects GPIO_REGMAP without selecting or depending on
REGMAP, despite GPIO_REGMAP depending on REGMAP.

This unmet dependency bug was detected by Kismet,
a static analysis tool for Kconfig. Please advise
if this is not the appropriate solution.

Signed-off-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://lore.kernel.org/r/20220117062557.89568-1-julianbraha@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: bcm2835: Fix a few error paths</title>
<updated>2022-01-30T01:33:39Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2022-01-27T21:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5297c693d8c8e08fa742e3112cf70723f7a04da2'/>
<id>urn:sha1:5297c693d8c8e08fa742e3112cf70723f7a04da2</id>
<content type='text'>
After commit 266423e60ea1 ("pinctrl: bcm2835: Change init order for gpio
hogs") a few error paths would not unwind properly the registration of
gpio ranges. Correct that by assigning a single error label and goto it
whenever we encounter a fatal error.

Fixes: 266423e60ea1 ("pinctrl: bcm2835: Change init order for gpio hogs")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Link: https://lore.kernel.org/r/20220127215033.267227-1-f.fainelli@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
