From: Wolfram Sang Date: Fri, 10 Dec 2021 11:32:26 +0000 (+0100) Subject: pinctrl: renesas: rcar: Do not enforce GPIO if already muxed X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9ca70f4202eab573ca9e427dd5ec08ae9c945bcb;p=linux.git pinctrl: renesas: rcar: Do not enforce GPIO if already muxed For Renesas PFCs not setting .strict, we can snoop GPIOs which are already muxed to some other function. To actually make use of that, we shouldn't mux them back to GPIO if they have been already muxed to something. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20211210113226.40111-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven --- diff --git a/drivers/pinctrl/renesas/pinctrl.c b/drivers/pinctrl/renesas/pinctrl.c index 96b9de974246a..401e647250326 100644 --- a/drivers/pinctrl/renesas/pinctrl.c +++ b/drivers/pinctrl/renesas/pinctrl.c @@ -397,7 +397,7 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev, spin_lock_irqsave(&pfc->lock, flags); - if (!pfc->gpio) { + if (!pfc->gpio && !cfg->mux_mark) { /* If GPIOs are handled externally the pin mux type needs to be * set to GPIO here. */