aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-single.c
diff options
context:
space:
mode:
authorChao Xie <chao.xie@marvell.com>2014-01-28 02:20:44 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-10 04:13:08 -0500
commit4bd7547756af5c71d55e4d77f41db3d06c18b3e0 (patch)
treea6806ff2060fd5f3b9d52753ab56884079f46e47 /drivers/pinctrl/pinctrl-single.c
parentb81e57e6ac35242ba59206b303ba6c7585764ee1 (diff)
pinctrl: single: add low power mode support
For some silicons, the pin configuration register can control the output of the pin when the pad including the pin enter low power mode. For example, the pin can be "Drive 1", "Drive 0", "Float" when the pad including the pin enter low power mode. It is very useful when you want to control the power leakeage when the SOC enter low power mode, and can save more power for the low power mode. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r--drivers/pinctrl/pinctrl-single.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index de6459628b4f..81075f2a1d3f 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -662,6 +662,7 @@ static int pcs_pinconf_get(struct pinctrl_dev *pctldev,
662 break; 662 break;
663 case PIN_CONFIG_DRIVE_STRENGTH: 663 case PIN_CONFIG_DRIVE_STRENGTH:
664 case PIN_CONFIG_SLEW_RATE: 664 case PIN_CONFIG_SLEW_RATE:
665 case PIN_CONFIG_LOW_POWER_MODE:
665 default: 666 default:
666 *config = data; 667 *config = data;
667 break; 668 break;
@@ -699,6 +700,7 @@ static int pcs_pinconf_set(struct pinctrl_dev *pctldev,
699 case PIN_CONFIG_INPUT_SCHMITT: 700 case PIN_CONFIG_INPUT_SCHMITT:
700 case PIN_CONFIG_DRIVE_STRENGTH: 701 case PIN_CONFIG_DRIVE_STRENGTH:
701 case PIN_CONFIG_SLEW_RATE: 702 case PIN_CONFIG_SLEW_RATE:
703 case PIN_CONFIG_LOW_POWER_MODE:
702 shift = ffs(func->conf[i].mask) - 1; 704 shift = ffs(func->conf[i].mask) - 1;
703 data &= ~func->conf[i].mask; 705 data &= ~func->conf[i].mask;
704 data |= (arg << shift) & func->conf[i].mask; 706 data |= (arg << shift) & func->conf[i].mask;
@@ -1101,6 +1103,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
1101 { "pinctrl-single,drive-strength", PIN_CONFIG_DRIVE_STRENGTH, }, 1103 { "pinctrl-single,drive-strength", PIN_CONFIG_DRIVE_STRENGTH, },
1102 { "pinctrl-single,slew-rate", PIN_CONFIG_SLEW_RATE, }, 1104 { "pinctrl-single,slew-rate", PIN_CONFIG_SLEW_RATE, },
1103 { "pinctrl-single,input-schmitt", PIN_CONFIG_INPUT_SCHMITT, }, 1105 { "pinctrl-single,input-schmitt", PIN_CONFIG_INPUT_SCHMITT, },
1106 { "pinctrl-single,low-power-mode", PIN_CONFIG_LOW_POWER_MODE, },
1104 }; 1107 };
1105 struct pcs_conf_type prop4[] = { 1108 struct pcs_conf_type prop4[] = {
1106 { "pinctrl-single,bias-pullup", PIN_CONFIG_BIAS_PULL_UP, }, 1109 { "pinctrl-single,bias-pullup", PIN_CONFIG_BIAS_PULL_UP, },