gpio: qcom_spmi_gpio: fix bias-pull-down
Subsystems (2)
PATCH 1/1 gpio: qcom_spmi_gpio: fix bias-pull-down
A small logic error resulted in bias-pull-down being interpreted as bias-pull-up, fix this.
Signed-off-by Casey Connolly <[email protected]>
--- drivers/gpio/qcom_spmi_gpio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpio/qcom_spmi_gpio.c +2 -5
@@ -795,9 +795,9 @@ static const struct pinconf_param qcom_spmi_pmic_pinctrl_conf_params[] = { { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 }, { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 }, { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, PMIC_GPIO_PULL_UP_30 }, - { "bias-pull-down", PIN_CONFIG_BIAS_PULL_UP, 0 }, + { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 0 }, { "bias-high-impedance", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0 }, { "power-source", PIN_CONFIG_POWER_SOURCE, 0 }, { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },
@@ -879,12 +879,9 @@ static int qcom_spmi_pmic_pinctrl_pinconf_set(struct udevice *dev, unsigned intcase PIN_CONFIG_BIAS_PULL_UP : pad->pullup =PMIC_GPIO_PULL_UP_30 ;break ;case PIN_CONFIG_BIAS_PULL_DOWN : -if (arg) - pad->pullup =PMIC_GPIO_PULL_DOWN ; -else - pad->pullup =PMIC_GPIO_PULL_DISABLE ; + pad->pullup =PMIC_GPIO_PULL_DOWN ;break ;case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : pad->is_enabled = false;break ;
Signature · 1 line
2.55.0
Quoted 27 lines · Casey Connolly
A small logic error resulted in bias-pull-down being interpreted as bias-pull-up, fix this.
Signed-off-by Casey Connolly <[email protected]>--- drivers/gpio/qcom_spmi_gpio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpio/qcom_spmi_gpio.c +1
-1@@ -795,9 +795,9 @@ static const struct pinconf_param qcom_spmi_pmic_pinctrl_conf_params[] = { { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 }, { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 }, { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, PMIC_GPIO_PULL_UP_30 }, - { "bias-pull-down", PIN_CONFIG_BIAS_PULL_UP, 0 }, + { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 0 }, { "bias-high-impedance", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0 }, { "power-source", PIN_CONFIG_POWER_SOURCE, 0 }, { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },@@ -879,12 +879,9 @@ static int qcom_spmi_pmic_pinctrl_pinconf_set(struct udevice *dev, unsigned intcase PIN_CONFIG_BIAS_PULL_UP : pad->pullup =PMIC_GPIO_PULL_UP_30 ;break ;
drivers/gpio/qcom_spmi_gpio.c static int qcom_spmi_pmic_pinctrl_pinconf_set(struct udevice *dev, unsigned int · line 887
Quoted 10 lines
drivers/gpio/qcom_spmi_gpio.c +1
-4case PIN_CONFIG_BIAS_PULL_DOWN : -if (arg) - pad->pullup =PMIC_GPIO_PULL_DOWN ; -else - pad->pullup =PMIC_GPIO_PULL_DISABLE ; + pad->pullup =PMIC_GPIO_PULL_DOWN ;break ;case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : pad->is_enabled = false;break ;
Good catch
Reviewed-by Neil Armstrong <[email protected]>
Thanks,
Neil
Casey Connolly
AppliedQuoted 2 lines · Casey Connolly
A small logic error resulted in bias-pull-down being interpreted as bias-pull-up, fix this.
Applied, thanks!
[1/1] gpio: qcom_spmi_gpio: fix bias-pull-down
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/904bb986c52e
Best regards,
Signature · 1 line
// Casey (she/they)