aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt13
-rw-r--r--Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt6
-rw-r--r--drivers/regulator/Kconfig6
-rw-r--r--drivers/regulator/Makefile1
-rw-r--r--drivers/regulator/s5m8767.c171
-rw-r--r--drivers/regulator/st-pwm.c190
-rw-r--r--drivers/regulator/ti-abb-regulator.c140
-rw-r--r--drivers/regulator/tps51632-regulator.c8
-rw-r--r--drivers/regulator/tps62360-regulator.c9
-rw-r--r--drivers/regulator/tps6507x-regulator.c29
-rw-r--r--drivers/regulator/tps65090-regulator.c13
-rw-r--r--drivers/regulator/tps65217-regulator.c17
-rw-r--r--include/linux/mfd/samsung/core.h3
-rw-r--r--include/linux/mfd/samsung/s5m8767.h7
14 files changed, 426 insertions, 187 deletions
diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
index fc6b38f035bd..d290988ed975 100644
--- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
@@ -69,13 +69,16 @@ sub-node should be of the format as listed below.
69 }; 69 };
70 }; 70 };
71The above regulator entries are defined in regulator bindings documentation 71The above regulator entries are defined in regulator bindings documentation
72except op_mode description. 72except these properties:
73 - op_mode: describes the different operating modes of the LDO's with 73 - op_mode: describes the different operating modes of the LDO's with
74 power mode change in SOC. The different possible values are, 74 power mode change in SOC. The different possible values are,
75 0 - always off mode 75 0 - always off mode
76 1 - on in normal mode 76 1 - on in normal mode
77 2 - low power mode 77 2 - low power mode
78 3 - suspend mode 78 3 - suspend mode
79 - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
80 GPIO controlling this regulator (enable/disable); This is
81 valid only for buck9.
79 82
80The following are the names of the regulators that the s5m8767 pmic block 83The following are the names of the regulators that the s5m8767 pmic block
81supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 84supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
@@ -148,5 +151,13 @@ Example:
148 regulator-always-on; 151 regulator-always-on;
149 regulator-boot-on; 152 regulator-boot-on;
150 }; 153 };
154
155 vemmc_reg: BUCK9 {
156 regulator-name = "VMEM_VDD_2.8V";
157 regulator-min-microvolt = <2800000>;
158 regulator-max-microvolt = <2800000>;
159 op_mode = <3>; /* Standby Mode */
160 s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
161 };
151 }; 162 };
152 }; 163 };
diff --git a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt
index 2e57a33e9029..c58db75f959e 100644
--- a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt
@@ -4,10 +4,14 @@ Required Properties:
4- compatible: Should be one of: 4- compatible: Should be one of:
5 - "ti,abb-v1" for older SoCs like OMAP3 5 - "ti,abb-v1" for older SoCs like OMAP3
6 - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5 6 - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5
7 - "ti,abb-v3" for a generic definition where setup and control registers are
8 provided (example: DRA7)
7- reg: Address and length of the register set for the device. It contains 9- reg: Address and length of the register set for the device. It contains
8 the information of registers in the same order as described by reg-names 10 the information of registers in the same order as described by reg-names
9- reg-names: Should contain the reg names 11- reg-names: Should contain the reg names
10 - "base-address" - contains base address of ABB module 12 - "base-address" - contains base address of ABB module (ti,abb-v1,ti,abb-v2)
13 - "control-address" - contains control register address of ABB module (ti,abb-v3)
14 - "setup-address" - contains setup register address of ABB module (ti,abb-v3)
11 - "int-address" - contains address of interrupt register for ABB module 15 - "int-address" - contains address of interrupt register for ABB module
12 (also see Optional properties) 16 (also see Optional properties)
13- #address-cell: should be 0 17- #address-cell: should be 0
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index e5e4017b1011..8f3866c44a3f 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -448,6 +448,12 @@ config REGULATOR_S5M8767
448 via I2C bus. S5M8767A have 9 Bucks and 28 LDOs output and 448 via I2C bus. S5M8767A have 9 Bucks and 28 LDOs output and
449 supports DVS mode with 8bits of output voltage control. 449 supports DVS mode with 8bits of output voltage control.
450 450
451config REGULATOR_ST_PWM
452 tristate "STMicroelectronics PWM voltage regulator"
453 depends on ARCH_STI
454 help
455 This driver supports ST's PWM controlled voltage regulators.
456
451config REGULATOR_TI_ABB 457config REGULATOR_TI_ABB
452 tristate "TI Adaptive Body Bias on-chip LDO" 458 tristate "TI Adaptive Body Bias on-chip LDO"
453 depends on ARCH_OMAP 459 depends on ARCH_OMAP
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index c3416728c14d..0cfca37941ec 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
61obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o 61obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o
62obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o 62obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
63obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o 63obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
64obj-$(CONFIG_REGULATOR_ST_PWM) += st-pwm.o
64obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o 65obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
65obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o 66obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
66obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o 67obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index d958dfa05125..f05badabd69e 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -11,11 +11,8 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/bug.h>
15#include <linux/err.h> 14#include <linux/err.h>
16#include <linux/gpio.h>
17#include <linux/of_gpio.h> 15#include <linux/of_gpio.h>
18#include <linux/slab.h>
19#include <linux/module.h> 16#include <linux/module.h>
20#include <linux/platform_device.h> 17#include <linux/platform_device.h>
21#include <linux/regulator/driver.h> 18#include <linux/regulator/driver.h>
@@ -170,12 +167,11 @@ static unsigned int s5m8767_opmode_reg[][4] = {
170 {0x0, 0x3, 0x1, 0x1}, /* BUCK9 */ 167 {0x0, 0x3, 0x1, 0x1}, /* BUCK9 */
171}; 168};
172 169
173static int s5m8767_get_register(struct regulator_dev *rdev, int *reg, 170static int s5m8767_get_register(struct s5m8767_info *s5m8767, int reg_id,
174 int *enable_ctrl) 171 int *reg, int *enable_ctrl)
175{ 172{
176 int i, reg_id = rdev_get_id(rdev); 173 int i;
177 unsigned int mode; 174 unsigned int mode;
178 struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
179 175
180 switch (reg_id) { 176 switch (reg_id) {
181 case S5M8767_LDO1 ... S5M8767_LDO2: 177 case S5M8767_LDO1 ... S5M8767_LDO2:
@@ -214,53 +210,6 @@ static int s5m8767_get_register(struct regulator_dev *rdev, int *reg,
214 return 0; 210 return 0;
215} 211}
216 212
217static int s5m8767_reg_is_enabled(struct regulator_dev *rdev)
218{
219 struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
220 int ret, reg;
221 int enable_ctrl;
222 unsigned int val;
223
224 ret = s5m8767_get_register(rdev, &reg, &enable_ctrl);
225 if (ret == -EINVAL)
226 return 1;
227 else if (ret)
228 return ret;
229
230 ret = regmap_read(s5m8767->iodev->regmap_pmic, reg, &val);
231 if (ret)
232 return ret;
233
234 return (val & S5M8767_ENCTRL_MASK) == enable_ctrl;
235}
236
237static int s5m8767_reg_enable(struct regulator_dev *rdev)
238{
239 struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
240 int ret, reg;
241 int enable_ctrl;
242
243 ret = s5m8767_get_register(rdev, &reg, &enable_ctrl);
244 if (ret)