pinctrl: mediatek: paris: Fix pingroup pin config state readback
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 8 Mar 2022 10:09:49 +0000 (18:09 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Mar 2022 00:24:15 +0000 (01:24 +0100)
commit54fe55fb384ade630ef20b9a8b8f3b2a89ad97f2
tree91c9d516988cd0c42c58b032753725b9bb727eef
parent19bce7ce0a593c7024030a0cda9e23facea3c93d
pinctrl: mediatek: paris: Fix pingroup pin config state readback

mtk_pconf_group_get(), used to read back pingroup pin config state,
simply returns a set of configs saved from a previous invocation of
mtk_pconf_group_set(). This is an unfiltered, unvalidated set passed
in from the pinconf core, which does not match the current hardware
state.

Since the driver library is designed to have one pin per group, pass
through mtk_pconf_group_get() to mtk_pinconf_get(), to read back the
current pin config state of the only pin in the group.

Also drop the assignment of pin config state to the group.

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-5-wenst@chromium.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-paris.c