diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-01-24 08:37:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-27 15:24:17 -0500 |
commit | ee1e0994ab1bd302fd03432de79c07751df47ffa (patch) | |
tree | 04ecbe1f9b036da25496727fd2d4ced15f8f22dd /include/linux/mfd/samsung | |
parent | 07b19808486054f356dbf3495a277f51af062b35 (diff) |
regulator: s5m8767: Use GPIO for controlling Buck9/eMMC
Add support for GPIO control (enable/disable) over Buck9. The Buck9
Converter is used as a supply for eMMC Host Controller.
BUCK9EN GPIO of S5M8767 chip may be used by application processor to
enable or disable the Buck9. This has two benefits:
- It is faster than toggling it over I2C bus.
- It allows disabling the regulator during suspend to RAM; The AP will
enable it during resume; Without the patch the regulator supplying
eMMC must be defined as fixed-regulator.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/mfd/samsung')
-rw-r--r-- | include/linux/mfd/samsung/core.h | 3 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s5m8767.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 41c9bde410c5..55510444b9fd 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
@@ -119,7 +119,8 @@ struct sec_platform_data { | |||
119 | struct sec_regulator_data { | 119 | struct sec_regulator_data { |
120 | int id; | 120 | int id; |
121 | struct regulator_init_data *initdata; | 121 | struct regulator_init_data *initdata; |
122 | struct device_node *reg_node; | 122 | struct device_node *reg_node; |
123 | int ext_control_gpio; | ||
123 | }; | 124 | }; |
124 | 125 | ||
125 | /* | 126 | /* |
diff --git a/include/linux/mfd/samsung/s5m8767.h b/include/linux/mfd/samsung/s5m8767.h index 2ab0b0f03641..243b58fec33d 100644 --- a/include/linux/mfd/samsung/s5m8767.h +++ b/include/linux/mfd/samsung/s5m8767.h | |||
@@ -183,10 +183,17 @@ enum s5m8767_regulators { | |||
183 | S5M8767_REG_MAX, | 183 | S5M8767_REG_MAX, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | /* LDO_EN/BUCK_EN field in registers */ | ||
186 | #define S5M8767_ENCTRL_SHIFT 6 | 187 | #define S5M8767_ENCTRL_SHIFT 6 |
187 | #define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) | 188 | #define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) |
188 | 189 | ||
189 | /* | 190 | /* |
191 | * LDO_EN/BUCK_EN register value for controlling this Buck or LDO | ||
192 | * by GPIO (PWREN, BUCKEN). | ||
193 | */ | ||
194 | #define S5M8767_ENCTRL_USE_GPIO 0x1 | ||
195 | |||
196 | /* | ||
190 | * Values for BUCK_RAMP field in DVS_RAMP register, matching raw values | 197 | * Values for BUCK_RAMP field in DVS_RAMP register, matching raw values |
191 | * in mV/us. | 198 | * in mV/us. |
192 | */ | 199 | */ |