diff options
| author | Amit Daniel Kachhap <amit.daniel@samsung.com> | 2014-07-15 07:02:51 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-08-16 17:51:16 -0400 |
| commit | 0e4f417857083f399769491f6e7773d111debd0f (patch) | |
| tree | 65bfad849d60347445e3142dab5ae20381707a76 /include/linux/mfd | |
| parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) | |
regulator: s2mpxxx: Move regulator min/step voltages in common place
This is a cleanup patch and moves min/step voltages in a common samsung
header file so that they can be used by other s2mpxxx PMIC drivers. Only
few required macros are added currently and others can be added if needed.
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/samsung/core.h | 21 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s2mpa01.h | 12 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s2mps11.h | 9 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s2mps14.h | 10 |
4 files changed, 21 insertions, 31 deletions
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index b5f73de81aad..1825edacbda7 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -14,6 +14,27 @@ | |||
| 14 | #ifndef __LINUX_MFD_SEC_CORE_H | 14 | #ifndef __LINUX_MFD_SEC_CORE_H |
| 15 | #define __LINUX_MFD_SEC_CORE_H | 15 | #define __LINUX_MFD_SEC_CORE_H |
| 16 | 16 | ||
| 17 | /* Macros to represent minimum voltages for LDO/BUCK */ | ||
| 18 | #define MIN_3000_MV 3000000 | ||
| 19 | #define MIN_2500_MV 2500000 | ||
| 20 | #define MIN_2000_MV 2000000 | ||
| 21 | #define MIN_1800_MV 1800000 | ||
| 22 | #define MIN_1500_MV 1500000 | ||
| 23 | #define MIN_1400_MV 1400000 | ||
| 24 | #define MIN_1000_MV 1000000 | ||
| 25 | |||
| 26 | #define MIN_900_MV 900000 | ||
| 27 | #define MIN_850_MV 850000 | ||
| 28 | #define MIN_800_MV 800000 | ||
| 29 | #define MIN_750_MV 750000 | ||
| 30 | #define MIN_600_MV 600000 | ||
| 31 | |||
| 32 | /* Macros to represent steps for LDO/BUCK */ | ||
| 33 | #define STEP_50_MV 50000 | ||
| 34 | #define STEP_25_MV 25000 | ||
| 35 | #define STEP_12_5_MV 12500 | ||
| 36 | #define STEP_6_25_MV 6250 | ||
| 37 | |||
| 17 | enum sec_device_type { | 38 | enum sec_device_type { |
| 18 | S5M8751X, | 39 | S5M8751X, |
| 19 | S5M8763X, | 40 | S5M8763X, |
diff --git a/include/linux/mfd/samsung/s2mpa01.h b/include/linux/mfd/samsung/s2mpa01.h index fbc63bc0d6a2..2766108bca2f 100644 --- a/include/linux/mfd/samsung/s2mpa01.h +++ b/include/linux/mfd/samsung/s2mpa01.h | |||
| @@ -155,18 +155,6 @@ enum s2mpa01_regulators { | |||
| 155 | S2MPA01_REGULATOR_MAX, | 155 | S2MPA01_REGULATOR_MAX, |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | #define S2MPA01_BUCK_MIN1 600000 | ||
| 159 | #define S2MPA01_BUCK_MIN2 800000 | ||
| 160 | #define S2MPA01_BUCK_MIN3 1000000 | ||
| 161 | #define S2MPA01_BUCK_MIN4 1500000 | ||
| 162 | #define S2MPA01_LDO_MIN 800000 | ||
| 163 | |||
| 164 | #define S2MPA01_BUCK_STEP1 6250 | ||
| 165 | #define S2MPA01_BUCK_STEP2 12500 | ||
| 166 | |||
| 167 | #define S2MPA01_LDO_STEP1 50000 | ||
| 168 | #define S2MPA01_LDO_STEP2 25000 | ||
| 169 | |||
| 170 | #define S2MPA01_LDO_VSEL_MASK 0x3F | 158 | #define S2MPA01_LDO_VSEL_MASK 0x3F |
| 171 | #define S2MPA01_BUCK_VSEL_MASK 0xFF | 159 | #define S2MPA01_BUCK_VSEL_MASK 0xFF |
| 172 | #define S2MPA01_ENABLE_MASK (0x03 << S2MPA01_ENABLE_SHIFT) | 160 | #define S2MPA01_ENABLE_MASK (0x03 << S2MPA01_ENABLE_SHIFT) |
diff --git a/include/linux/mfd/samsung/s2mps11.h b/include/linux/mfd/samsung/s2mps11.h index b3ddf98dec37..7981a9d77d3f 100644 --- a/include/linux/mfd/samsung/s2mps11.h +++ b/include/linux/mfd/samsung/s2mps11.h | |||
| @@ -171,15 +171,6 @@ enum s2mps11_regulators { | |||
| 171 | S2MPS11_REGULATOR_MAX, | 171 | S2MPS11_REGULATOR_MAX, |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | #define S2MPS11_BUCK_MIN1 600000 | ||
| 175 | #define S2MPS11_BUCK_MIN2 750000 | ||
| 176 | #define S2MPS11_BUCK_MIN3 3000000 | ||
| 177 | #define S2MPS11_LDO_MIN 800000 | ||
| 178 | #define S2MPS11_BUCK_STEP1 6250 | ||
| 179 | #define S2MPS11_BUCK_STEP2 12500 | ||
| 180 | #define S2MPS11_BUCK_STEP3 25000 | ||
| 181 | #define S2MPS11_LDO_STEP1 50000 | ||
| 182 | #define S2MPS11_LDO_STEP2 25000 | ||
| 183 | #define S2MPS11_LDO_VSEL_MASK 0x3F | 174 | #define S2MPS11_LDO_VSEL_MASK 0x3F |
| 184 | #define S2MPS11_BUCK_VSEL_MASK 0xFF | 175 | #define S2MPS11_BUCK_VSEL_MASK 0xFF |
| 185 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) | 176 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) |
diff --git a/include/linux/mfd/samsung/s2mps14.h b/include/linux/mfd/samsung/s2mps14.h index 900cd7a04314..c92f4782afb5 100644 --- a/include/linux/mfd/samsung/s2mps14.h +++ b/include/linux/mfd/samsung/s2mps14.h | |||
| @@ -123,10 +123,6 @@ enum s2mps14_regulators { | |||
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | /* Regulator constraints for BUCKx */ | 125 | /* Regulator constraints for BUCKx */ |
| 126 | #define S2MPS14_BUCK1235_MIN_600MV 600000 | ||
| 127 | #define S2MPS14_BUCK4_MIN_1400MV 1400000 | ||
| 128 | #define S2MPS14_BUCK1235_STEP_6_25MV 6250 | ||
| 129 | #define S2MPS14_BUCK4_STEP_12_5MV 12500 | ||
| 130 | #define S2MPS14_BUCK1235_START_SEL 0x20 | 126 | #define S2MPS14_BUCK1235_START_SEL 0x20 |
| 131 | #define S2MPS14_BUCK4_START_SEL 0x40 | 127 | #define S2MPS14_BUCK4_START_SEL 0x40 |
| 132 | /* | 128 | /* |
| @@ -136,12 +132,6 @@ enum s2mps14_regulators { | |||
| 136 | */ | 132 | */ |
| 137 | #define S2MPS14_BUCK_RAMP_DELAY 12500 | 133 | #define S2MPS14_BUCK_RAMP_DELAY 12500 |
| 138 | 134 | ||
| 139 | /* Regulator constraints for different types of LDOx */ | ||
| 140 | #define S2MPS14_LDO_MIN_800MV 800000 | ||
| 141 | #define S2MPS14_LDO_MIN_1800MV 1800000 | ||
| 142 | #define S2MPS14_LDO_STEP_12_5MV 12500 | ||
| 143 | #define S2MPS14_LDO_STEP_25MV 25000 | ||
| 144 | |||
| 145 | #define S2MPS14_LDO_VSEL_MASK 0x3F | 135 | #define S2MPS14_LDO_VSEL_MASK 0x3F |
| 146 | #define S2MPS14_BUCK_VSEL_MASK 0xFF | 136 | #define S2MPS14_BUCK_VSEL_MASK 0xFF |
| 147 | #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT) | 137 | #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT) |
