/[packages]/cauldron/kernel/current/PATCHES/patches/0062-pinctrl-qcom-spmi-mpp-Fix-drive-strength-setting.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0062-pinctrl-qcom-spmi-mpp-Fix-drive-strength-setting.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 1888 byte(s)
add fixes from sashas autosel queue
1 From 881eaad34aaa61d318028f1c696815c510c8e110 Mon Sep 17 00:00:00 2001
2 From: Stephen Boyd <swboyd@chromium.org>
3 Date: Thu, 30 Aug 2018 17:58:52 -0700
4 Subject: [PATCH 062/145] pinctrl: qcom: spmi-mpp: Fix drive strength setting
5
6 [ Upstream commit 89c68b102f13f123aaef22b292526d6b92501334 ]
7
8 It looks like we parse the drive strength setting here, but never
9 actually write it into the hardware to update it. Parse the setting and
10 then write it at the end of the pinconf setting function so that it
11 actually sticks in the hardware.
12
13 Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode")
14 Cc: Doug Anderson <dianders@chromium.org>
15 Signed-off-by: Stephen Boyd <swboyd@chromium.org>
16 Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
17 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
18 Signed-off-by: Sasha Levin <sashal@kernel.org>
19 ---
20 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 6 +++++-
21 1 file changed, 5 insertions(+), 1 deletion(-)
22
23 diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
24 index 418bc40df7ca..7577f133d326 100644
25 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
26 +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
27 @@ -457,7 +457,7 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
28 pad->dtest = arg;
29 break;
30 case PIN_CONFIG_DRIVE_STRENGTH:
31 - arg = pad->drive_strength;
32 + pad->drive_strength = arg;
33 break;
34 case PMIC_MPP_CONF_AMUX_ROUTE:
35 if (arg >= PMIC_MPP_AMUX_ROUTE_ABUS4)
36 @@ -504,6 +504,10 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
37 if (ret < 0)
38 return ret;
39
40 + ret = pmic_mpp_write(state, pad, PMIC_MPP_REG_SINK_CTL, pad->drive_strength);
41 + if (ret < 0)
42 + return ret;
43 +
44 val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT;
45
46 return pmic_mpp_write(state, pad, PMIC_MPP_REG_EN_CTL, val);
47 --
48 2.19.1
49

  ViewVC Help
Powered by ViewVC 1.1.30