aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndy Gross <agross@codeaurora.org>2014-06-18 00:49:11 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-07-11 08:08:31 -0400
commitb831a15e2b9690b4d7a4dbe028dc2970485d0a2c (patch)
treeaab12e13997b0a32aafe908e0e9fe84af0ad0fa4 /drivers/pinctrl
parentd22bf40f46380c105aecef8a38106dcfaba88907 (diff)
pinctrl: qcom: Add BUS_HOLD pin bias
This patch adds the BUS_HOLD (Keeper) bias option for pins. Signed-off-by: Andy Gross <agross@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-msm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-msm.c b/drivers/pinctrl/pinctrl-msm.c
index bdfaba4430f2..43d47b7cff92 100644
--- a/drivers/pinctrl/pinctrl-msm.c
+++ b/drivers/pinctrl/pinctrl-msm.c
@@ -181,6 +181,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
181 switch (param) { 181 switch (param) {
182 case PIN_CONFIG_BIAS_DISABLE: 182 case PIN_CONFIG_BIAS_DISABLE:
183 case PIN_CONFIG_BIAS_PULL_DOWN: 183 case PIN_CONFIG_BIAS_PULL_DOWN:
184 case PIN_CONFIG_BIAS_BUS_HOLD:
184 case PIN_CONFIG_BIAS_PULL_UP: 185 case PIN_CONFIG_BIAS_PULL_UP:
185 *bit = g->pull_bit; 186 *bit = g->pull_bit;
186 *mask = 3; 187 *mask = 3;
@@ -218,6 +219,7 @@ static int msm_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
218 219
219#define MSM_NO_PULL 0 220#define MSM_NO_PULL 0
220#define MSM_PULL_DOWN 1 221#define MSM_PULL_DOWN 1
222#define MSM_KEEPER 2
221#define MSM_PULL_UP 3 223#define MSM_PULL_UP 3
222 224
223static unsigned msm_regval_to_drive(u32 val) 225static unsigned msm_regval_to_drive(u32 val)
@@ -255,6 +257,9 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
255 case PIN_CONFIG_BIAS_PULL_DOWN: 257 case PIN_CONFIG_BIAS_PULL_DOWN:
256 arg = arg == MSM_PULL_DOWN; 258 arg = arg == MSM_PULL_DOWN;
257 break; 259 break;
260 case PIN_CONFIG_BIAS_BUS_HOLD:
261 arg = arg == MSM_KEEPER;
262 break;
258 case PIN_CONFIG_BIAS_PULL_UP: 263 case PIN_CONFIG_BIAS_PULL_UP:
259 arg = arg == MSM_PULL_UP; 264 arg = arg == MSM_PULL_UP;
260 break; 265 break;
@@ -314,6 +319,9 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
314 case PIN_CONFIG_BIAS_PULL_DOWN: 319 case PIN_CONFIG_BIAS_PULL_DOWN:
315 arg = MSM_PULL_DOWN; 320 arg = MSM_PULL_DOWN;
316 break; 321 break;
322 case PIN_CONFIG_BIAS_BUS_HOLD:
323 arg = MSM_KEEPER;
324 break;
317 case PIN_CONFIG_BIAS_PULL_UP: 325 case PIN_CONFIG_BIAS_PULL_UP:
318 arg = MSM_PULL_UP; 326 arg = MSM_PULL_UP;
319 break; 327 break;