[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97f46bb0-b446-92da-a83c-751f8b918570@collabora.com>
Date: Tue, 11 Jan 2022 14:42:23 +0100
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Chen-Yu Tsai <wenst@...omium.org>,
Sean Wang <sean.wang@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: linux-mediatek@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Zhiyong Tao <zhiyong.tao@...iatek.com>,
Guodong Liu <guodong.liu@...iatek.com>
Subject: Re: [PATCH 4/7] pinctrl: mediatek: paris: Fix pingroup pin config
state readback
Il 11/01/22 12:22, Chen-Yu Tsai ha scritto:
> 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 a 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.
>
> Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings")
> Signed-off-by: Chen-Yu Tsai <wenst@...omium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
> drivers/pinctrl/mediatek/pinctrl-paris.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> index d720624d8cd2..d259f075c62d 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-paris.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
> @@ -736,10 +736,10 @@ static int mtk_pconf_group_get(struct pinctrl_dev *pctldev, unsigned group,
> unsigned long *config)
> {
> struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev);
> + struct mtk_pinctrl_group *grp = &hw->groups[group];
>
> - *config = hw->groups[group].config;
> -
> - return 0;
> + /* One pin per group only */
> + return mtk_pinconf_get(pctldev, grp->pin, config);
> }
>
> static int mtk_pconf_group_set(struct pinctrl_dev *pctldev, unsigned group,
>
Powered by blists - more mailing lists