[PATCH] pinctrl: airoha: fix bias readback in airoha_pinconf_get()
Linus Walleij
linusw at kernel.org
Wed Nov 4 05:28:25 PST 2026
On Fri, Oct 23, 2026 at 7:57 PM Vikrant Yadav
<vikrantyadav4802 at gmail.com> wrote:
> In airoha_pinconf_get(), the last branch of bias check
> "else if (pull_up || pull_down)", has no check on the requested
> parameter. It was meant to reject PIN_CONFIG_BIAS_DISABLE when a pull
> is enabled, but it also runs for PIN_CONFIG_BIAS_PULL_UP and
> PIN_CONFIG_BIAS_PULL_DOWN. When the pin really has that pull set, the
> earlier PULL_UP/PULL_DOWN checks do not reject it, so the execution
> reaches this branch, which returns -EINVAL. Reading back a pull-up or
> pull-down therefore always fails.
>
> Signed-off-by: Vikrant Yadav <vikrantyadav4802 at gmail.com>
Maybe Christian can ACK this patch if it looks right?
Yours,
Linus Walleij
More information about the Linux-mediatek
mailing list