Re: [PATCH] pinctrl: mediatek: Fix fallback call path
From: Sean Wang
Date: Mon Jan 04 2021 - 06:17:33 EST
On Mon, Dec 28, 2020 at 5:04 PM Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx> wrote:
>
> Some SoCs, eg. mt8183, are using a pinconfig operation bias_set_combo.
> The fallback path in mtk_pinconf_adv_pull_set() should also try this
> operation.
>
> Fixes: cafe19db7751 ("pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage")
> Signed-off-by: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
Acked-by: Sean Wang <sean.wang@xxxxxxxxxx>
> ---
> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> index 7aeb552d16ce9..72f17f26acd80 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> @@ -920,6 +920,10 @@ int mtk_pinconf_adv_pull_set(struct mtk_pinctrl *hw,
> err = hw->soc->bias_set(hw, desc, pullup);
> if (err)
> return err;
> + } else if (hw->soc->bias_set_combo) {
> + err = hw->soc->bias_set_combo(hw, desc, pullup, arg);
> + if (err)
> + return err;
> } else {
> return -ENOTSUPP;
> }
> --
> 2.29.2.729.g45daf8777d-goog
>