aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2013-07-24 23:33:18 -0400
committerMark Brown <broonie@linaro.org>2013-07-25 05:34:34 -0400
commit3784b6d64dc52ed3fbebad61a85ab9b7a687a167 (patch)
tree0cc7215371597c706017b648e3d1dfd22cf8bf51
parent82b736df4da2c6fdf2c0018938685cf36d112ecd (diff)
regulator: pfuze100: add pfuze100 regulator driver
Add pfuze100 regulator driver. Signed-off-by: Robin Gong <b38343@freescale.com> Tested-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/regulator/pfuze100.txt113
-rw-r--r--drivers/regulator/Kconfig7
-rw-r--r--drivers/regulator/Makefile1
-rw-r--r--drivers/regulator/pfuze100-regulator.c454
-rw-r--r--include/linux/regulator/pfuze100.h44
5 files changed, 619 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/regulator/pfuze100.txt b/Documentation/devicetree/bindings/regulator/pfuze100.txt
new file mode 100644
index 000000000000..22e1a48f7e83
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/pfuze100.txt
@@ -0,0 +1,113 @@
1PFUZE100 family of regulators
2
3Required properties:
4- compatible: "fsl,pfuze100"
5- reg: I2C slave address
6- regulators: This is the list of child nodes that specify the regulator
7 initialization data for defined regulators. Please refer to below doc
8 Documentation/devicetree/bindings/regulator/regulator.txt.
9
10 The valid names for regulators are:
11 sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
12
13Each regulator is defined using the standard binding for regulators.
14
15Example:
16
17 pmic: pfuze100@08 {
18 compatible = "fsl,pfuze100";
19 reg = <0x08>;
20
21 regulators {
22 sw1a_reg: sw1ab {
23 regulator-min-microvolt = <300000>;
24 regulator-max-microvolt = <1875000>;
25 regulator-boot-on;
26 regulator-always-on;
27 regulator-ramp-delay = <6250>;
28 };
29
30 sw1c_reg: sw1c {
31 regulator-min-microvolt = <300000>;
32 regulator-max-microvolt = <1875000>;
33 regulator-boot-on;
34 regulator-always-on;
35 };
36
37 sw2_reg: sw2 {
38 regulator-min-microvolt = <800000>;
39 regulator-max-microvolt = <3300000>;
40 regulator-boot-on;
41 regulator-always-on;
42 };
43
44 sw3a_reg: sw3a {
45 regulator-min-microvolt = <400000>;
46 regulator-max-microvolt = <1975000>;
47 regulator-boot-on;
48 regulator-always-on;
49 };
50
51 sw3b_reg: sw3b {
52 regulator-min-microvolt = <400000>;
53 regulator-max-microvolt = <1975000>;
54 regulator-boot-on;
55 regulator-always-on;
56 };
57
58 sw4_reg: sw4 {
59 regulator-min-microvolt = <800000>;
60 regulator-max-microvolt = <3300000>;
61 };
62
63 swbst_reg: swbst {
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5150000>;
66 };
67
68 snvs_reg: vsnvs {
69 regulator-min-microvolt = <1000000>;
70 regulator-max-microvolt = <3000000>;
71 regulator-boot-on;
72 regulator-always-on;
73 };
74
75 vref_reg: vrefddr {
76 regulator-boot-on;
77 regulator-always-on;
78 };
79
80 vgen1_reg: vgen1 {
81 regulator-min-microvolt = <800000>;
82 regulator-max-microvolt = <1550000>;
83 };
84
85 vgen2_reg: vgen2 {
86 regulator-min-microvolt = <800000>;
87 regulator-max-microvolt = <1550000>;
88 };
89
90 vgen3_reg: vgen3 {
91 regulator-min-microvolt = <1800000>;
92 regulator-max-microvolt = <3300000>;
93 };
94
95 vgen4_reg: vgen4 {
96 regulator-min-microvolt = <1800000>;
97 regulator-max-microvolt = <3300000>;
98 regulator-always-on;
99 };
100
101 vgen5_reg: vgen5 {
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <3300000>;
104 regulator-always-on;
105 };
106
107 vgen6_reg: vgen6 {
108 regulator-min-microvolt = <1800000>;
109 regulator-max-microvolt = <3300000>;
110 regulator-always-on;
111 };
112 };
113 };
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 759b601b54ef..f9d02aabe306 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -355,6 +355,13 @@ config REGULATOR_PCF50633
355 Say Y here to support the voltage regulators and convertors 355 Say Y here to support the voltage regulators and convertors
356 on PCF50633 356 on PCF50633
357 357
358config REGULATOR_PFUZE100
359 tristate "Support regulators on Freescale PFUZE100 PMIC"
360 depends on I2C
361 help
362 Say y here to support the regulators found on the Freescale PFUZE100
363 PMIC.
364
358config REGULATOR_RC5T583 365config REGULATOR_RC5T583
359 tristate "RICOH RC5T583 Power regulators" 366 tristate "RICOH RC5T583 Power regulators"
360 depends on MFD_RC5T583 367 depends on MFD_RC5T583
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index d240772d90ee..57838e2b0b8a 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
46obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o 46obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
47obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o 47obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
48obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o 48obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o
49obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o
49obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o 50obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o
50obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o 51obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
51obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o 52obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
new file mode 100644
index 000000000000..fcc7cd0d25cc
--- /dev/null
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -0,0 +1,454 @@
1/*
2 * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/init.h>
21#include <linux/err.h>
22#include <linux/of.h>
23#include <linux/of_device.h>
24#include <linux/regulator/of_regulator.h>
25#include <linux/platform_device.h>