<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/mvebu, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-29T15:28:07Z</updated>
<entry>
<title>pinctrl: armada-37xx: make irq_lock a raw spinlock to avoid invalid wait context</title>
<updated>2022-07-29T15:28:07Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-07-16T23:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6636b1de4cd10ce882d19e29b366c81351b9cb54'/>
<id>urn:sha1:6636b1de4cd10ce882d19e29b366c81351b9cb54</id>
<content type='text'>
[ Upstream commit 984245b66cf32c494b1e4f95f5ed6ba16b8771eb ]

The irqchip-&gt;irq_set_type method is called by __irq_set_trigger() under
the desc-&gt;lock raw spinlock.

The armada-37xx implementation, armada_37xx_irq_set_type(), takes a
plain spinlock, the kind that becomes sleepable on RT.

Therefore, this is an invalid locking scheme for which we get a kernel
splat stating just that ("[ BUG: Invalid wait context ]"), because the
context in which the plain spinlock may sleep is atomic due to the raw
spinlock. We need to go raw spinlocks all the way.

Replace the driver's irq_lock with a raw spinlock, to disable preemption
even on RT.

Cc: &lt;stable@vger.kernel.org&gt; # 5.15+
Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20220716233745.1704677-2-vladimir.oltean@nxp.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register()</title>
<updated>2022-07-29T15:28:06Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2022-04-01T10:36:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb1b9fe06cc48bf52b22b3d76670494944b0dfb5'/>
<id>urn:sha1:eb1b9fe06cc48bf52b22b3d76670494944b0dfb5</id>
<content type='text'>
[ Upstream commit 46d34d4d502ea1030f5de434e6677ec96ca131c3 ]

Since we have fwnode of the first found GPIO controller assigned to the
struct gpio_chip, we may reuse it in the armada_37xx_irqchip_register().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context</title>
<updated>2022-07-29T15:27:55Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-07-16T23:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64f5c2f3d3a0064d115b2c36352c449809440415'/>
<id>urn:sha1:64f5c2f3d3a0064d115b2c36352c449809440415</id>
<content type='text'>
commit 4546760619cfa9b718fe2059ceb07101cf9ff61e upstream.

The irqchip-&gt;irq_set_type method is called by __irq_set_trigger() under
the desc-&gt;lock raw spinlock.

The armada-37xx implementation, armada_37xx_irq_set_type(), uses an MMIO
regmap created by of_syscon_register(), which uses plain spinlocks
(the kind that are sleepable on RT).

Therefore, this is an invalid locking scheme for which we get a kernel
splat stating just that ("[ BUG: Invalid wait context ]"), because the
context in which the plain spinlock may sleep is atomic due to the raw
spinlock. We need to go raw spinlocks all the way.

Make this driver create its own MMIO regmap, with use_raw_spinlock=true,
and stop relying on syscon to provide it.

This patch depends on commit 67021f25d952 ("regmap: teach regmap to use
raw spinlocks if requested in the config").

Cc: &lt;stable@vger.kernel.org&gt; # 5.15+
Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20220716233745.1704677-3-vladimir.oltean@nxp.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: mvebu: Fix irq_of_parse_and_map() return value</title>
<updated>2022-06-09T08:30:27Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2022-04-22T10:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=668e3192aa5e0bcfe9d9f8da596e1feed0ac47f7'/>
<id>urn:sha1:668e3192aa5e0bcfe9d9f8da596e1feed0ac47f7</id>
<content type='text'>
[ Upstream commit 71bc7cf3be65bab441e03667cf215c557712976c ]

The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20220422105339.78810-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Switch to use devm_kasprintf_strarray()</title>
<updated>2021-11-18T16:40:09Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-05T12:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b32b195d7f021f4c66a3de7b34ee648e56b824cd'/>
<id>urn:sha1:b32b195d7f021f4c66a3de7b34ee648e56b824cd</id>
<content type='text'>
Since we have a generic helper, switch the module to use it.

As a side effect, add check for the memory allocation failures and
cleanup it either in error case or when driver is unloading.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Convert to use dev_err_probe()</title>
<updated>2021-11-18T16:40:09Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-05T12:42:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06cb10ea0cd5c5f4db9627a33ab47fec32cb5960'/>
<id>urn:sha1:06cb10ea0cd5c5f4db9627a33ab47fec32cb5960</id>
<content type='text'>
It's fine to call dev_err_probe() in -&gt;probe() when error code is known.
Convert the driver to use dev_err_probe().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Make use of the devm_platform_ioremap_resource()</title>
<updated>2021-11-18T16:40:09Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-05T12:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49bdef501728acbfadc7eeafafb4f6c3fea415eb'/>
<id>urn:sha1:49bdef501728acbfadc7eeafafb4f6c3fea415eb</id>
<content type='text'>
Use the devm_platform_ioremap_resource() helper instead of
calling of_address_to_resource() and devm_ioremap_resource()
separately.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Use temporary variable for struct device</title>
<updated>2021-11-18T16:40:09Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-05T12:42:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50cf2ed284e49028a885aa56c3ea50714c635879'/>
<id>urn:sha1:50cf2ed284e49028a885aa56c3ea50714c635879</id>
<content type='text'>
Use temporary variable for struct device to make code neater.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Fix function name in the kernel doc</title>
<updated>2021-11-18T16:40:09Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-05T12:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6d93da40fe917582100fa0dafb8a59f402a34f9'/>
<id>urn:sha1:a6d93da40fe917582100fa0dafb8a59f402a34f9</id>
<content type='text'>
Kernel doc validator is not happy:

  .../pinctrl-armada-37xx.c:926: warning: expecting prototype for armada_37xx_fill_funcs(). Prototype was for armada_37xx_fill_func() instead

Fix this by updating function name in the kernel doc.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: armada-37xx: Correct PWM pins definitions</title>
<updated>2021-07-23T15:54:42Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2021-07-19T11:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=baf8d6899b1e8906dc076ef26cc633e96a8bb0c3'/>
<id>urn:sha1:baf8d6899b1e8906dc076ef26cc633e96a8bb0c3</id>
<content type='text'>
The PWM pins on North Bridge on Armada 37xx can be configured into PWM
or GPIO functions. When in PWM function, each pin can also be configured
to drive low on 0 and tri-state on 1 (LED mode).

The current definitions handle this by declaring two pin groups for each
pin:
- group "pwmN" with functions "pwm" and "gpio"
- group "ledN_od" ("od" for open drain) with functions "led" and "gpio"

This is semantically incorrect. The correct definition for each pin
should be one group with three functions: "pwm", "led" and "gpio".

Change the "pwmN" groups to support "led" function.

Remove "ledN_od" groups. This cannot break backwards compatibility with
older device trees: no device tree uses it since there is no PWM driver
for this SOC yet. Also "ledN_od" groups are not even documented.

Fixes: b835d6953009 ("pinctrl: armada-37xx: swap polarity on LED group")
Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20210719112938.27594-1-kabel@kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
