<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/pinctrl/stm32, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/pinctrl/stm32?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/pinctrl/stm32?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-20T09:16:42Z</updated>
<entry>
<title>pinctrl: stm32: Switch to use dev_err_probe() helper</title>
<updated>2022-09-20T09:16:42Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-09-17T12:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=790cf9e3da3f16d65d389d714f6e18f27cf18704'/>
<id>urn:sha1:790cf9e3da3f16d65d389d714f6e18f27cf18704</id>
<content type='text'>
In the probe path, dev_err() can be replace with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20220917122015.1893880-1-yangyingliang@huawei.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: fix optional IRQ support to gpios</title>
<updated>2022-06-28T14:12:40Z</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@foss.st.com</email>
</author>
<published>2022-06-27T14:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a1d4ef1adf8bbd302067534ead671a94759687ed'/>
<id>urn:sha1:a1d4ef1adf8bbd302067534ead671a94759687ed</id>
<content type='text'>
To act as an interrupt controller, a gpio bank relies on the
"interrupt-parent" of the pin controller.
When this optional "interrupt-parent" misses, do not create any IRQ domain.

This fixes a "NULL pointer in stm32_gpio_domain_alloc()" kernel crash when
the interrupt-parent = &lt;exti&gt; property is not declared in the Device Tree.

Fixes: 0eb9f683336d ("pinctrl: Add IRQ support to STM32 gpios")
Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220627142350.742973-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Unshadow np variable in stm32_pctl_probe()</title>
<updated>2022-05-13T23:13:42Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-05-07T10:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8b3dd882bfd2cf00da986bb0cf5c607e23c0f110'/>
<id>urn:sha1:8b3dd882bfd2cf00da986bb0cf5c607e23c0f110</id>
<content type='text'>
The np variable is used globally for stm32_pctl_probe() and in one of
its code branches. cppcheck is not happy with that:

  pinctrl-stm32.c:1530:23: warning: Local variable 'np' shadows outer variable [shadowVariable]

Instead of simply renaming one of the variables convert some code to
use a device pointer directly.

Fixes: bb949ed9b16b ("pinctrl: stm32: Switch to use for_each_gpiochip_node() helper")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220507102257.26414-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Fix up errorpath after merge</title>
<updated>2022-05-05T14:24:06Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-05-05T14:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f4b09d8d67efcc0620a9395b7a180bbd44066939'/>
<id>urn:sha1:f4b09d8d67efcc0620a9395b7a180bbd44066939</id>
<content type='text'>
When merging the for_each_gpiochip_node() changes, I made
some mistakes by not disabling the clocks on the errorpath,
fix it up.

Fixes: a0912083086d ("Merge tag 'intel-gpio-v5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel")
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Reported-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: prevent the use of the secure protected pins</title>
<updated>2022-05-04T22:04:04Z</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@foss.st.com</email>
</author>
<published>2022-05-02T15:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3389b09878dddd58ef52bd0bf43cc42ea5a9ea2a'/>
<id>urn:sha1:3389b09878dddd58ef52bd0bf43cc42ea5a9ea2a</id>
<content type='text'>
The hardware denies any access from the Linux non-secure world to the
secure-protected pins. Hence, prevent any driver to request such a pin.

Mark the secure-protected GPIO lines as invalid (.init_valid_mask) and
prevent the pinmux request / pinconf setting operations.
Identify the secure pins with "NO ACCESS" in the pinconf sysfs.

Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220502153114.283618-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: improve debugfs information of pinconf-pins entry</title>
<updated>2022-05-04T22:02:48Z</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@foss.st.com</email>
</author>
<published>2022-05-02T15:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3296c473d9aada9b8ca1f47d395727595c01cff7'/>
<id>urn:sha1:3296c473d9aada9b8ca1f47d395727595c01cff7</id>
<content type='text'>
Print the name of the selected alternate function in addition to its
number. Ex:
   "pin 135 (PI7): alternate 10 (SAI2_FS_A) - ..."

Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220502152524.283374-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'intel-gpio-v5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel</title>
<updated>2022-05-04T21:15:21Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-05-04T21:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a0912083086d7b6bd7f0f1b4c2ffa6c8283a9f98'/>
<id>urn:sha1:a0912083086d7b6bd7f0f1b4c2ffa6c8283a9f98</id>
<content type='text'>
intel-gpio for v5.19-1

* Introduce helpers to iterate over GPIO chip nodes and covert some drivers

The following is an automated git shortlog grouped by driver:

gpiolib:
 -  Introduce a helper to get first GPIO controller node
 -  Introduce gpiochip_node_count() helper
 -  Introduce for_each_gpiochip_node() loop helper

pinctrl:
 -  meson: Replace custom code by gpiochip_node_count() call
 -  meson: Enable COMPILE_TEST
 -  meson: Rename REG_* to MESON_REG_*
 -  armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register()
 -  armada-37xx: Switch to use fwnode instead of of_node
 -  samsung: Switch to use for_each_gpiochip_node() helper
 -  samsung: Drop redundant node parameter in samsung_banks_of_node_get()
 -  npcm7xx: Switch to use for_each_gpiochip_node() helper
 -  renesas: rza1: Switch to use for_each_gpiochip_node() helper
 -  renesas: rza1: Replace custom code by gpiochip_node_count() call
 -  stm32: Switch to use for_each_gpiochip_node() helper
 -  stm32: Replace custom code by gpiochip_node_count() call
</content>
</entry>
<entry>
<title>pinctrl: stm32: improve bank clocks management</title>
<updated>2022-05-01T21:25:58Z</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@foss.st.com</email>
</author>
<published>2022-04-22T14:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c954531bc5d84fc13e035204750c3761c5fc93b0'/>
<id>urn:sha1:c954531bc5d84fc13e035204750c3761c5fc93b0</id>
<content type='text'>
Instead of enabling/disabling the clock at each IO configuration update,
just keep the clock enabled from the probe.
This makes things simpler and more efficient (e.g. the time required to
toggle an output IO is drastically decreased) without significantly
increasing the power consumption.

Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Reviewed-by: Marek Vasut &lt;marex@denx.de&gt;
Link: https://lore.kernel.org/r/20220422143608.226580-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested</title>
<updated>2022-04-22T22:10:11Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-04-21T14:08:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=05d8af449d93e04547b4c6b328e39c890bc803f4'/>
<id>urn:sha1:05d8af449d93e04547b4c6b328e39c890bc803f4</id>
<content type='text'>
The current EOI handler for LEVEL triggered interrupts calls clk_enable(),
register IO, clk_disable(). The clock manipulation requires locking which
happens with IRQs disabled in clk_enable_lock(). Instead of turning the
clock on and off all the time, enable the clock in case LEVEL interrupt is
requested and keep the clock enabled until all LEVEL interrupts are freed.
The LEVEL interrupts are an exception on this platform and seldom used, so
this does not affect the common case.

This simplifies the LEVEL interrupt handling considerably and also fixes
the following splat found when using preempt-rt:
 ------------[ cut here ]------------
 WARNING: CPU: 0 PID: 0 at kernel/locking/rtmutex.c:2040 __rt_mutex_trylock+0x37/0x62
 Modules linked in:
 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.109-rt65-stable-standard-00068-g6a5afc4b1217 #85
 Hardware name: STM32 (Device Tree Support)
 [&lt;c010a45d&gt;] (unwind_backtrace) from [&lt;c010766f&gt;] (show_stack+0xb/0xc)
 [&lt;c010766f&gt;] (show_stack) from [&lt;c06353ab&gt;] (dump_stack+0x6f/0x84)
 [&lt;c06353ab&gt;] (dump_stack) from [&lt;c01145e3&gt;] (__warn+0x7f/0xa4)
 [&lt;c01145e3&gt;] (__warn) from [&lt;c063386f&gt;] (warn_slowpath_fmt+0x3b/0x74)
 [&lt;c063386f&gt;] (warn_slowpath_fmt) from [&lt;c063b43d&gt;] (__rt_mutex_trylock+0x37/0x62)
 [&lt;c063b43d&gt;] (__rt_mutex_trylock) from [&lt;c063c053&gt;] (rt_spin_trylock+0x7/0x16)
 [&lt;c063c053&gt;] (rt_spin_trylock) from [&lt;c036a2f3&gt;] (clk_enable_lock+0xb/0x80)
 [&lt;c036a2f3&gt;] (clk_enable_lock) from [&lt;c036ba69&gt;] (clk_core_enable_lock+0x9/0x18)
 [&lt;c036ba69&gt;] (clk_core_enable_lock) from [&lt;c034e9f3&gt;] (stm32_gpio_get+0x11/0x24)
 [&lt;c034e9f3&gt;] (stm32_gpio_get) from [&lt;c034ef43&gt;] (stm32_gpio_irq_trigger+0x1f/0x48)
 [&lt;c034ef43&gt;] (stm32_gpio_irq_trigger) from [&lt;c014aa53&gt;] (handle_fasteoi_irq+0x71/0xa8)
 [&lt;c014aa53&gt;] (handle_fasteoi_irq) from [&lt;c0147111&gt;] (generic_handle_irq+0x19/0x22)
 [&lt;c0147111&gt;] (generic_handle_irq) from [&lt;c014752d&gt;] (__handle_domain_irq+0x55/0x64)
 [&lt;c014752d&gt;] (__handle_domain_irq) from [&lt;c0346f13&gt;] (gic_handle_irq+0x53/0x64)
 [&lt;c0346f13&gt;] (gic_handle_irq) from [&lt;c0100ba5&gt;] (__irq_svc+0x65/0xc0)
 Exception stack(0xc0e01f18 to 0xc0e01f60)
 1f00:                                                       0000300c 00000000
 1f20: 0000300c c010ff01 00000000 00000000 c0e00000 c0e07714 00000001 c0e01f78
 1f40: c0e07758 00000000 ef7cd0ff c0e01f68 c010554b c0105542 40000033 ffffffff
 [&lt;c0100ba5&gt;] (__irq_svc) from [&lt;c0105542&gt;] (arch_cpu_idle+0xc/0x1e)
 [&lt;c0105542&gt;] (arch_cpu_idle) from [&lt;c063be95&gt;] (default_idle_call+0x21/0x3c)
 [&lt;c063be95&gt;] (default_idle_call) from [&lt;c01324f7&gt;] (do_idle+0xe3/0x1e4)
 [&lt;c01324f7&gt;] (do_idle) from [&lt;c01327b3&gt;] (cpu_startup_entry+0x13/0x14)
 [&lt;c01327b3&gt;] (cpu_startup_entry) from [&lt;c0a00c13&gt;] (start_kernel+0x397/0x3d4)
 [&lt;c0a00c13&gt;] (start_kernel) from [&lt;00000000&gt;] (0x0)
 ---[ end trace 0000000000000002 ]---

Power consumption measured on STM32MP157C DHCOM SoM is not increased or
is below noise threshold.

Fixes: 47beed513a85b ("pinctrl: stm32: Add level interrupt support to gpio irq chip")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
To: linux-gpio@vger.kernel.org
Reviewed-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220421140827.214088-1-marex@denx.de
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI</title>
<updated>2022-04-21T14:30:30Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-04-15T21:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e74200ebf7c4f6a7a7d1be9f63833ddba251effa'/>
<id>urn:sha1:e74200ebf7c4f6a7a7d1be9f63833ddba251effa</id>
<content type='text'>
The stm32_gpio_get() should only be called for LEVEL triggered interrupts,
skip calling it for EDGE triggered interrupts altogether to avoid wasting
CPU cycles in EOI handler. On this platform, EDGE triggered interrupts are
the majority and LEVEL triggered interrupts are the exception no less, and
the CPU cycles are not abundant.

Fixes: 47beed513a85b ("pinctrl: stm32: Add level interrupt support to gpio irq chip")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
To: linux-gpio@vger.kernel.org
Link: https://lore.kernel.org/r/20220415215410.498349-1-marex@denx.de
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
