diff options
-rw-r--r-- | drivers/pinctrl/pinctrl-rockchip.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 2ac194370b73..96c60d230c13 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c | |||
@@ -350,6 +350,20 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux) | |||
350 | u8 bit; | 350 | u8 bit; |
351 | u32 data; | 351 | u32 data; |
352 | 352 | ||
353 | /* | ||
354 | * The first 16 pins of rk3188_bank0 are always gpios and do not have | ||
355 | * a mux register at all. | ||
356 | */ | ||
357 | if (bank->bank_type == RK3188_BANK0 && pin < 16) { | ||
358 | if (mux != RK_FUNC_GPIO) { | ||
359 | dev_err(info->dev, | ||
360 | "pin %d only supports a gpio mux\n", pin); | ||
361 | return -ENOTSUPP; | ||
362 | } else { | ||
363 | return 0; | ||
364 | } | ||
365 | } | ||
366 | |||
353 | dev_dbg(info->dev, "setting mux of GPIO%d-%d to %d\n", | 367 | dev_dbg(info->dev, "setting mux of GPIO%d-%d to %d\n", |
354 | bank->bank_num, pin, mux); | 368 | bank->bank_num, pin, mux); |
355 | 369 | ||