aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2013-06-24 21:08:38 -0400
committerMark Brown <broonie@linaro.org>2013-06-25 06:31:29 -0400
commit80b022e29bfdffb6c9ac0a283bcad3e1030c4c7e (patch)
treeda245ac34d194fc608aad26c5f162860a8754397 /include/linux
parent9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff)
regulator: max77693: Add max77693 regualtor driver.
This patch adds new regulator driver to support max77693 chip's regulators. max77693 has two linear voltage regulators and one current regulator which can be controlled through I2C bus. This driver also supports device tree. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/max77693-private.h13
-rw-r--r--include/linux/mfd/max77693.h18
2 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index 1aa4f13cdfa6..244fb0d51589 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -85,6 +85,19 @@ enum max77693_pmic_reg {
85 MAX77693_PMIC_REG_END, 85 MAX77693_PMIC_REG_END,
86}; 86};
87 87
88/* MAX77693 CHG_CNFG_00 register */
89#define CHG_CNFG_00_CHG_MASK 0x1
90#define CHG_CNFG_00_BUCK_MASK 0x4
91
92/* MAX77693 CHG_CNFG_09 Register */
93#define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F
94
95/* MAX77693 CHG_CTRL Register */
96#define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3
97#define SAFEOUT_CTRL_SAFEOUT2_MASK 0xC
98#define SAFEOUT_CTRL_ENSAFEOUT1_MASK 0x40
99#define SAFEOUT_CTRL_ENSAFEOUT2_MASK 0x80
100
88/* Slave addr = 0x4A: MUIC */ 101/* Slave addr = 0x4A: MUIC */
89enum max77693_muic_reg { 102enum max77693_muic_reg {
90 MAX77693_MUIC_REG_ID = 0x00, 103 MAX77693_MUIC_REG_ID = 0x00,
diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h
index 3109a6c5c948..676f0f388992 100644
--- a/include/linux/mfd/max77693.h
+++ b/include/linux/mfd/max77693.h
@@ -30,6 +30,20 @@
30#ifndef __LINUX_MFD_MAX77693_H 30#ifndef __LINUX_MFD_MAX77693_H
31#define __LINUX_MFD_MAX77693_H 31#define __LINUX_MFD_MAX77693_H
32 32
33/* MAX77686 regulator IDs */
34enum max77693_regulators {
35 MAX77693_ESAFEOUT1 = 0,
36 MAX77693_ESAFEOUT2,
37 MAX77693_CHARGER,
38 MAX77693_REG_MAX,
39};
40
41struct max77693_regulator_data {
42 int id;
43 struct regulator_init_data *initdata;
44 struct device_node *of_node;
45};
46
33struct max77693_reg_data { 47struct max77693_reg_data {
34 u8 addr; 48 u8 addr;
35 u8 data; 49 u8 data;
@@ -52,6 +66,10 @@ struct max77693_muic_platform_data {
52struct max77693_platform_data { 66struct max77693_platform_data {
53 int wakeup; 67 int wakeup;
54 68
69 /* regulator data */
70 struct max77693_regulator_data *regulators;
71 int num_regulators;
72
55 /* muic data */ 73 /* muic data */
56 struct max77693_muic_platform_data *muic_data; 74 struct max77693_muic_platform_data *muic_data;
57}; 75};