[PATCH 1/2] pinctrl: meson-axg-pmx: fix gpio request
Mark Kettenis
mark.kettenis at xs4all.nl
Fri Oct 2 11:29:50 CEST 2020
> From: Neil Armstrong <narmstrong at baylibre.com>
> Date: Fri, 2 Oct 2020 11:05:39 +0200
>
> The AXG pmx driver gpio request offset needs the pin base to have the
> correct pin number.
>
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>
> ---
> drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
I had a very similar diff in one of my u-boot trees.
Reviewed-by: Mark Kettenis <kettenis at openbsd.org>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> index c6cb941d0a..cfe94cf9e1 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> @@ -165,7 +165,10 @@ const struct pinctrl_ops meson_axg_pinctrl_ops = {
> static int meson_axg_gpio_request(struct udevice *dev,
> unsigned int offset, const char *label)
> {
> - return meson_axg_pmx_update_function(dev->parent, offset, 0);
> + struct meson_pinctrl *priv = dev_get_priv(dev->parent);
> +
> + return meson_axg_pmx_update_function(dev->parent,
> + offset + priv->data->pin_base, 0);
> }
>
> static const struct dm_gpio_ops meson_axg_gpio_ops = {
> --
> 2.25.1
>
>
More information about the U-Boot
mailing list