pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readback
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 8 Mar 2022 10:09:47 +0000 (18:09 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Mar 2022 00:24:15 +0000 (01:24 +0100)
commit3e8c6bc608480010f360c4a59578d7841726137d
tree9aee6199ff2c9cc6b05cde4c177b4ca7b19a69d1
parent188e5834b930acd03ad3cf7c5e7aa24db9665a29
pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readback

When reading back pin bias settings, if the pin is not in the
corresponding bias state, the function should return -EINVAL.

Fix this in the mediatek-paris pinctrl library so that the read back
state is not littered with bogus a "input bias disabled" combined with
"pull up" or "pull down" states.

Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220308100956.2750295-3-wenst@chromium.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-paris.c