Skip to content

Commit 7261851

Browse files
pcercueilinusw
authored andcommitted
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: 943e0da ("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]>
1 parent d5e9314 commit 7261851

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pinctrl/pinctrl-ingenic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3830,17 +3830,17 @@ static void ingenic_set_bias(struct ingenic_pinctrl *jzpc,
38303830
{
38313831
if (jzpc->info->version >= ID_X2000) {
38323832
switch (bias) {
3833-
case PIN_CONFIG_BIAS_PULL_UP:
3833+
case GPIO_PULL_UP:
38343834
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false);
38353835
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, true);
38363836
break;
38373837

3838-
case PIN_CONFIG_BIAS_PULL_DOWN:
3838+
case GPIO_PULL_DOWN:
38393839
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false);
38403840
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, true);
38413841
break;
38423842

3843-
case PIN_CONFIG_BIAS_DISABLE:
3843+
case GPIO_PULL_DIS:
38443844
default:
38453845
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false);
38463846
ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false);

0 commit comments

Comments
 (0)