2016-12-06 14:08:31

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH] pinctrl: meson: fix gpio request disabling other modes

The pinctrl_gpio_request is called with the "full" gpio number, already
containing the base, then meson_pmx_request_gpio is then called with the
final pin number.
Remove the base addition when calling meson_pmx_disable_other_groups.

Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
CC: Beniamino Galvani <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
drivers/pinctrl/meson/pinctrl-meson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index a579126..620c231a 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -212,7 +212,7 @@ static int meson_pmx_request_gpio(struct pinctrl_dev *pcdev,
{
struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev);

- meson_pmx_disable_other_groups(pc, range->pin_base + offset, -1);
+ meson_pmx_disable_other_groups(pc, offset, -1);

return 0;
}
--
2.7.0


2016-12-07 00:47:45

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] pinctrl: meson: fix gpio request disabling other modes

Neil Armstrong <[email protected]> writes:

> The pinctrl_gpio_request is called with the "full" gpio number, already
> containing the base, then meson_pmx_request_gpio is then called with the
> final pin number.
> Remove the base addition when calling meson_pmx_disable_other_groups.
>
> Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
> CC: Beniamino Galvani <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>

Acked-by: Kevin Hilman <[email protected]>

2016-12-11 21:50:44

by Beniamino Galvani

[permalink] [raw]
Subject: Re: [PATCH] pinctrl: meson: fix gpio request disabling other modes

On Tue, Dec 06, 2016 at 03:08:16PM +0100, Neil Armstrong wrote:
> The pinctrl_gpio_request is called with the "full" gpio number, already
> containing the base, then meson_pmx_request_gpio is then called with the
> final pin number.
> Remove the base addition when calling meson_pmx_disable_other_groups.
>
> Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
> CC: Beniamino Galvani <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>

Acked-by: Beniamino Galvani <[email protected]>

2016-12-28 12:41:15

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] pinctrl: meson: fix gpio request disabling other modes

On Tue, Dec 6, 2016 at 3:08 PM, Neil Armstrong <[email protected]> wrote:

> The pinctrl_gpio_request is called with the "full" gpio number, already
> containing the base, then meson_pmx_request_gpio is then called with the
> final pin number.
> Remove the base addition when calling meson_pmx_disable_other_groups.
>
> Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
> CC: Beniamino Galvani <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>

Patch applied for fixes. Sorry for the delay, merge window appeared inbetween.

Yours,
Linus Walleij