Re: [PATCH] pinctrl: airoha: fix bias readback in airoha_pinconf_get()

From: John Crispin

Date: Tue Dec 01 2026 - 13:19:25 EST




On 30.11.26 22:25, Linus Walleij wrote:
> Hi Vikrankt,
>
> On Fri, Oct 23, 2026 at 7:57 PM Vikrant Yadav
> <vikrantyadav4802@xxxxxxxxx> 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@xxxxxxxxx>
>
> Patch applied, also looped in John if he has time to take a glance
> at it if something would be off.
>
> Yours,
> Linus Walleij


Reviewed-by: John Crispin <john@xxxxxxxxxxx>