Skip to content

Commit 16d74eb

Browse files
committed
sh: pfc: Fix up GPIO mux type reconfig case.
Some drivers need to switch pin states between GPIO and pin function at runtime, which was inadvertently broken in the pinctrl driver for GPIOs being bound to a specific direction. This fixes up the request path to ensure that previously configured GPIOs don't cause us to inadvertently error out with an unsupported mux on reconfig, which in practice is primarily aimed at trapping pull-up/down users that have yet to be implemented under the new API. Fixes up regressions in the TPU PWM driver, amongst others. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 56d27ad commit 16d74eb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/sh/pfc/pinctrl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev,
208208

209209
break;
210210
case PINMUX_TYPE_GPIO:
211+
case PINMUX_TYPE_INPUT:
212+
case PINMUX_TYPE_OUTPUT:
211213
break;
212214
default:
213215
pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type);

0 commit comments

Comments
 (0)