Skip to content

Commit 9906a93

Browse files
bebarinogregkh
authored andcommitted
pinctrl: qcom: spmi-mpp: Fix drive strength setting
[ Upstream commit 89c68b1 ] It looks like we parse the drive strength setting here, but never actually write it into the hardware to update it. Parse the setting and then write it at the end of the pinconf setting function so that it actually sticks in the hardware. Fixes: 0e94804 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Cc: Doug Anderson <dianders@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fe68a58 commit 9906a93

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/pinctrl/qcom/pinctrl-spmi-mpp.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
457457
pad->dtest = arg;
458458
break;
459459
case PIN_CONFIG_DRIVE_STRENGTH:
460-
arg = pad->drive_strength;
460+
pad->drive_strength = arg;
461461
break;
462462
case PMIC_MPP_CONF_AMUX_ROUTE:
463463
if (arg >= PMIC_MPP_AMUX_ROUTE_ABUS4)
@@ -504,6 +504,10 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
504504
if (ret < 0)
505505
return ret;
506506

507+
ret = pmic_mpp_write(state, pad, PMIC_MPP_REG_SINK_CTL, pad->drive_strength);
508+
if (ret < 0)
509+
return ret;
510+
507511
val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT;
508512

509513
return pmic_mpp_write(state, pad, PMIC_MPP_REG_EN_CTL, val);

0 commit comments

Comments
 (0)