Commit | Line | Data |
---|---|---|
0f5f7078 SK |
1 | /* s5m87xx.h |
2 | * | |
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | |
4 | * http://www.samsung.com | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License version 2 as | |
8 | * published by the Free Software Foundation. | |
9 | */ | |
10 | ||
11 | #ifndef __LINUX_MFD_S5M_PMIC_H | |
12 | #define __LINUX_MFD_S5M_PMIC_H | |
13 | ||
14 | #include <linux/regulator/machine.h> | |
15 | ||
16 | /* S5M8767 regulator ids */ | |
17 | enum s5m8767_regulators { | |
18 | S5M8767_LDO1, | |
19 | S5M8767_LDO2, | |
20 | S5M8767_LDO3, | |
21 | S5M8767_LDO4, | |
22 | S5M8767_LDO5, | |
23 | S5M8767_LDO6, | |
24 | S5M8767_LDO7, | |
25 | S5M8767_LDO8, | |
26 | S5M8767_LDO9, | |
27 | S5M8767_LDO10, | |
28 | S5M8767_LDO11, | |
29 | S5M8767_LDO12, | |
30 | S5M8767_LDO13, | |
31 | S5M8767_LDO14, | |
32 | S5M8767_LDO15, | |
33 | S5M8767_LDO16, | |
34 | S5M8767_LDO17, | |
35 | S5M8767_LDO18, | |
36 | S5M8767_LDO19, | |
37 | S5M8767_LDO20, | |
38 | S5M8767_LDO21, | |
39 | S5M8767_LDO22, | |
40 | S5M8767_LDO23, | |
41 | S5M8767_LDO24, | |
42 | S5M8767_LDO25, | |
43 | S5M8767_LDO26, | |
44 | S5M8767_LDO27, | |
45 | S5M8767_LDO28, | |
46 | S5M8767_BUCK1, | |
47 | S5M8767_BUCK2, | |
48 | S5M8767_BUCK3, | |
49 | S5M8767_BUCK4, | |
50 | S5M8767_BUCK5, | |
51 | S5M8767_BUCK6, | |
52 | S5M8767_BUCK7, | |
53 | S5M8767_BUCK8, | |
54 | S5M8767_BUCK9, | |
55 | S5M8767_AP_EN32KHZ, | |
56 | S5M8767_CP_EN32KHZ, | |
57 | ||
58 | S5M8767_REG_MAX, | |
59 | }; | |
60 | ||
62fe8cd5 SK |
61 | #define S5M8767_ENCTRL_SHIFT 6 |
62 | ||
0f5f7078 SK |
63 | /* S5M8763 regulator ids */ |
64 | enum s5m8763_regulators { | |
65 | S5M8763_LDO1, | |
66 | S5M8763_LDO2, | |
67 | S5M8763_LDO3, | |
68 | S5M8763_LDO4, | |
69 | S5M8763_LDO5, | |
70 | S5M8763_LDO6, | |
71 | S5M8763_LDO7, | |
72 | S5M8763_LDO8, | |
73 | S5M8763_LDO9, | |
74 | S5M8763_LDO10, | |
75 | S5M8763_LDO11, | |
76 | S5M8763_LDO12, | |
77 | S5M8763_LDO13, | |
78 | S5M8763_LDO14, | |
79 | S5M8763_LDO15, | |
80 | S5M8763_LDO16, | |
81 | S5M8763_BUCK1, | |
82 | S5M8763_BUCK2, | |
83 | S5M8763_BUCK3, | |
84 | S5M8763_BUCK4, | |
85 | S5M8763_AP_EN32KHZ, | |
86 | S5M8763_CP_EN32KHZ, | |
87 | S5M8763_ENCHGVI, | |
88 | S5M8763_ESAFEUSB1, | |
89 | S5M8763_ESAFEUSB2, | |
90 | }; | |
91 | ||
92 | /** | |
93 | * s5m87xx_regulator_data - regulator data | |
94 | * @id: regulator id | |
95 | * @initdata: regulator init data (contraints, supplies, ...) | |
96 | */ | |
63063bfb | 97 | struct sec_regulator_data { |
0f5f7078 SK |
98 | int id; |
99 | struct regulator_init_data *initdata; | |
100 | }; | |
101 | ||
62fe8cd5 SK |
102 | /* |
103 | * s5m_opmode_data - regulator operation mode data | |
104 | * @id: regulator id | |
105 | * @mode: regulator operation mode | |
106 | */ | |
63063bfb | 107 | struct sec_opmode_data { |
62fe8cd5 SK |
108 | int id; |
109 | int mode; | |
110 | }; | |
111 | ||
112 | /* | |
63063bfb SK |
113 | * samsung regulator operation mode |
114 | * SEC_OPMODE_OFF Regulator always OFF | |
115 | * SEC_OPMODE_ON Regulator always ON | |
116 | * SEC_OPMODE_LOWPOWER Regulator is on in low-power mode | |
117 | * SEC_OPMODE_SUSPEND Regulator is changed by PWREN pin | |
62fe8cd5 SK |
118 | * If PWREN is high, regulator is on |
119 | * If PWREN is low, regulator is off | |
120 | */ | |
121 | ||
63063bfb SK |
122 | enum sec_opmode { |
123 | SEC_OPMODE_OFF, | |
124 | SEC_OPMODE_ON, | |
125 | SEC_OPMODE_LOWPOWER, | |
126 | SEC_OPMODE_SUSPEND, | |
62fe8cd5 SK |
127 | }; |
128 | ||
0f5f7078 | 129 | #endif /* __LINUX_MFD_S5M_PMIC_H */ |