In msm_config_group_get(), querying the PIN_CONFIG_BIAS_PULL_UP parameter on non-I2C pins incorrectly reports a strong I2C pull-up bias when the hardware is configured as PULL_UP or PULL_DOWN. For non-i2c pins, g->i2c_pull_bit is 0 and the condition is always true because BIT(0) is 1. Check if the pull bit is non-zero before comparing it against arg and match exactly what's written in msm_config_group_set(). Cc: stable@vger.kernel.org Fixes: 099f37a539e6 ("pinctrl: qcom: Add support for i2c specific pull feature") Closes: https://sashiko.dev/#/bug/linux-42fe82f8-2ab3-4bdf-9d87-6f46c976e49a Signed-off-by: Bartosz Golaszewski --- drivers/pinctrl/qcom/pinctrl-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index f953d3d9e0980c535e08ba1c1765d835b8abb88e..7230780ee8d2982c56f59738e5f92dca7ff5e991 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -396,7 +396,7 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev, case PIN_CONFIG_BIAS_PULL_UP: if (pctrl->soc->pull_no_keeper) arg = arg == MSM_PULL_UP_NO_KEEPER; - else if (arg & BIT(g->i2c_pull_bit)) + else if (g->i2c_pull_bit && arg == ((BIT(g->i2c_pull_bit) >> bit) | MSM_PULL_UP)) arg = MSM_I2C_STRONG_PULL_UP; else arg = arg == MSM_PULL_UP; --- base-commit: 6d582d78fad9d828e575ca0cdcff8ea47a77220b change-id: 20261110-qcom-pinctrl-msm-i2c-pull-up-93bca429d5a2 Best regards, -- Bartosz Golaszewski