From: Jonas Karlman Date: Sun, 12 May 2024 12:16:14 +0000 (+0000) Subject: pinctrl: rockchip: rk3188: Fix support for IOMUX_GPIO_ONLY flag X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=4b488940f5d10833d8bd898db4b7615587a5f86e;p=u-boot.git pinctrl: rockchip: rk3188: Fix support for IOMUX_GPIO_ONLY flag GPIO0_A0-A7 on RK3188 is IOMUX_GPIO_ONLY, however, trying to set gpio mux return an -ENOTSUPP error code. Fix this by validating using the mux function type and not the iomux flag. Based on Linux commit c4a532dee6b6 ("pinctrl: rockchip: handle first half of rk3188-bank0 correctly"). Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c index 8ef089994f..a3cdadb86b 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c @@ -172,7 +172,7 @@ static int rockchip_verify_mux(struct rockchip_pin_bank *bank, } if (bank->iomux[iomux_num].type & IOMUX_GPIO_ONLY) { - if (mux != IOMUX_GPIO_ONLY) { + if (mux != RK_FUNC_GPIO) { debug("pin %d only supports a gpio mux\n", pin); return -ENOTSUPP; }