mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
pinctrl: ingenic: Fix bias config for X2000(E)
The ingenic_set_bias() function's "bias" argument is not a
"enum pin_config_param", so its value should not be compared against
values of that enum.
This should fix the bias config not working on the X2000(E) SoCs.
Fixes: 943e0da153 ("pinctrl: Ingenic: Add pinctrl driver for X2000.")
Cc: <[email protected]> # v5.12
Signed-off-by: Paul Cercueil <[email protected]>
Tested-by: 周琰杰 (Zhou Yanjie)<[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
1 parent
d5e9314039
commit
7261851e93
1 file changed
+3
-3
@@ -3830,17 +3830,17 @@ static void ingenic_set_bias(struct ingenic_pinctrl *jzpc,
|
||||
{
|
||||
if (jzpc->info->version >= ID_X2000) {
|
||||
switch (bias) {
|
||||
case PIN_CONFIG_BIAS_PULL_UP:
|
||||
case GPIO_PULL_UP:
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false);
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, true);
|
||||
break;
|
||||
|
||||
case PIN_CONFIG_BIAS_PULL_DOWN:
|
||||
case GPIO_PULL_DOWN:
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false);
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, true);
|
||||
break;
|
||||
|
||||
case PIN_CONFIG_BIAS_DISABLE:
|
||||
case GPIO_PULL_DIS:
|
||||
default:
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false);
|
||||
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false);
|
||||
|
||||
Reference in new issue
Block a user