Re: [PATCH] pinctrl: meson: amlogic-a4: fix gpio output glitch

From: Xianwei Zhao

Date: Mon May 25 2026 - 07:22:05 EST


Hi Linus,
Thanks for your review.

On 2026/5/25 16:34, Linus Walleij wrote:
On Mon, May 18, 2026 at 10:26 AM Xianwei Zhao via B4 Relay
<devnull+xianwei.zhao.amlogic.com@xxxxxxxxxx> wrote:

From: Xianwei Zhao<xianwei.zhao@xxxxxxxxxxx>

When the system transitions from bootloader to kernel, the GPIO is
expected to keep driving high.

However, the Linux kernel first configures the pin direction and then
sets the output value. This may cause a brief low-level glitch on the
GPIO line, which can be problematic for regulator control.

By configuring the output value before switching the pin direction to
output, the glitch can be avoided.

This commit fixes the issue by swapping the configuration order.

Fixes: 6e9be3abb78c ("pinctrl: Add driver support for Amlogic SoCs")
Signed-off-by: Xianwei Zhao<xianwei.zhao@xxxxxxxxxxx>
Is this a regression? I.e. does it cause problems on a supported
system with mainline?

Linus (the big penguin) is unhappy with too many non-critical fixes
so I wanna check this before this goes into fixes.


The issue only occurs when the critical power supply uses GPIO control. Otherwise, it is not significant.

Yours,
Linus Walleij