diff options
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/arizona/registers.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/as3722.h | 423 | ||||
-rw-r--r-- | include/linux/mfd/core.h | 8 | ||||
-rw-r--r-- | include/linux/mfd/da9052/da9052.h | 20 | ||||
-rw-r--r-- | include/linux/mfd/dbx500-prcmu.h | 70 | ||||
-rw-r--r-- | include/linux/mfd/max14577-private.h | 330 | ||||
-rw-r--r-- | include/linux/mfd/max14577.h | 69 | ||||
-rw-r--r-- | include/linux/mfd/max77693-private.h | 1 | ||||
-rw-r--r-- | include/linux/mfd/max77693.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/mc13xxx.h | 7 | ||||
-rw-r--r-- | include/linux/mfd/rtsx_pci.h | 53 | ||||
-rw-r--r-- | include/linux/mfd/samsung/core.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/samsung/rtc.h | 11 | ||||
-rw-r--r-- | include/linux/mfd/si476x-core.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/stw481x.h | 56 | ||||
-rw-r--r-- | include/linux/mfd/syscon.h | 25 | ||||
-rw-r--r-- | include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 13 | ||||
-rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 29 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/core.h | 47 |
19 files changed, 1073 insertions, 99 deletions
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index cdf1f5acbe53..b40960d8d365 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -1910,7 +1910,7 @@ | |||
1910 | #define ARIZONA_FLL2_SYNC_GAIN_MASK 0x003c /* FLL2_SYNC_GAIN */ | 1910 | #define ARIZONA_FLL2_SYNC_GAIN_MASK 0x003c /* FLL2_SYNC_GAIN */ |
1911 | #define ARIZONA_FLL2_SYNC_GAIN_SHIFT 2 /* FLL2_SYNC_GAIN */ | 1911 | #define ARIZONA_FLL2_SYNC_GAIN_SHIFT 2 /* FLL2_SYNC_GAIN */ |
1912 | #define ARIZONA_FLL2_SYNC_GAIN_WIDTH 4 /* FLL2_SYNC_GAIN */ | 1912 | #define ARIZONA_FLL2_SYNC_GAIN_WIDTH 4 /* FLL2_SYNC_GAIN */ |
1913 | #define ARIZONA_FLL2_SYNC_BW_MASK 0x0001 /* FLL2_SYNC_BW */ | 1913 | #define ARIZONA_FLL2_SYNC_BW 0x0001 /* FLL2_SYNC_BW */ |
1914 | #define ARIZONA_FLL2_SYNC_BW_MASK 0x0001 /* FLL2_SYNC_BW */ | 1914 | #define ARIZONA_FLL2_SYNC_BW_MASK 0x0001 /* FLL2_SYNC_BW */ |
1915 | #define ARIZONA_FLL2_SYNC_BW_SHIFT 0 /* FLL2_SYNC_BW */ | 1915 | #define ARIZONA_FLL2_SYNC_BW_SHIFT 0 /* FLL2_SYNC_BW */ |
1916 | #define ARIZONA_FLL2_SYNC_BW_WIDTH 1 /* FLL2_SYNC_BW */ | 1916 | #define ARIZONA_FLL2_SYNC_BW_WIDTH 1 /* FLL2_SYNC_BW */ |
diff --git a/include/linux/mfd/as3722.h b/include/linux/mfd/as3722.h new file mode 100644 index 000000000000..16bf8a0dcd97 --- /dev/null +++ b/include/linux/mfd/as3722.h | |||
@@ -0,0 +1,423 @@ | |||
1 | /* | ||
2 | * as3722 definitions | ||
3 | * | ||
4 | * Copyright (C) 2013 ams | ||
5 | * Copyright (c) 2013, NVIDIA Corporation. All rights reserved. | ||
6 | * | ||
7 | * Author: Florian Lobmaier <florian.lobmaier@ams.com> | ||
8 | * Author: Laxman Dewangan <ldewangan@nvidia.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #ifndef __LINUX_MFD_AS3722_H__ | ||
27 | #define __LINUX_MFD_AS3722_H__ | ||
28 | |||
29 | #include <linux/regmap.h> | ||
30 | |||
31 | /* AS3722 registers */ | ||
32 | #define AS3722_SD0_VOLTAGE_REG 0x00 | ||
33 | #define AS3722_SD1_VOLTAGE_REG 0x01 | ||
34 | #define AS3722_SD2_VOLTAGE_REG 0x02 | ||
35 | #define AS3722_SD3_VOLTAGE_REG 0x03 | ||
36 | #define AS3722_SD4_VOLTAGE_REG 0x04 | ||
37 | #define AS3722_SD5_VOLTAGE_REG 0x05 | ||
38 | #define AS3722_SD6_VOLTAGE_REG 0x06 | ||
39 | #define AS3722_GPIO0_CONTROL_REG 0x08 | ||
40 | #define AS3722_GPIO1_CONTROL_REG 0x09 | ||
41 | #define AS3722_GPIO2_CONTROL_REG 0x0A | ||
42 | #define AS3722_GPIO3_CONTROL_REG 0x0B | ||
43 | #define AS3722_GPIO4_CONTROL_REG 0x0C | ||
44 | #define AS3722_GPIO5_CONTROL_REG 0x0D | ||
45 | #define AS3722_GPIO6_CONTROL_REG 0x0E | ||
46 | #define AS3722_GPIO7_CONTROL_REG 0x0F | ||
47 | #define AS3722_LDO0_VOLTAGE_REG 0x10 | ||
48 | #define AS3722_LDO1_VOLTAGE_REG 0x11 | ||
49 | #define AS3722_LDO2_VOLTAGE_REG 0x12 | ||
50 | #define AS3722_LDO3_VOLTAGE_REG 0x13 | ||
51 | #define AS3722_LDO4_VOLTAGE_REG 0x14 | ||
52 | #define AS3722_LDO5_VOLTAGE_REG 0x15 | ||
53 | #define AS3722_LDO6_VOLTAGE_REG 0x16 | ||
54 | #define AS3722_LDO7_VOLTAGE_REG 0x17 | ||
55 | #define AS3722_LDO9_VOLTAGE_REG 0x19 | ||
56 | #define AS3722_LDO10_VOLTAGE_REG 0x1A | ||
57 | #define AS3722_LDO11_VOLTAGE_REG 0x1B | ||
58 | #define AS3722_GPIO_DEB1_REG 0x1E | ||
59 | #define AS3722_GPIO_DEB2_REG 0x1F | ||
60 | #define AS3722_GPIO_SIGNAL_OUT_REG 0x20 | ||
61 | #define AS3722_GPIO_SIGNAL_IN_REG 0x21 | ||
62 | #define AS3722_REG_SEQU_MOD1_REG 0x22 | ||
63 | #define AS3722_REG_SEQU_MOD2_REG 0x23 | ||
64 | #define AS3722_REG_SEQU_MOD3_REG 0x24 | ||
65 | #define AS3722_SD_PHSW_CTRL_REG 0x27 | ||
66 | #define AS3722_SD_PHSW_STATUS 0x28 | ||
67 | #define AS3722_SD0_CONTROL_REG 0x29 | ||
68 | #define AS3722_SD1_CONTROL_REG 0x2A | ||
69 | #define AS3722_SDmph_CONTROL_REG 0x2B | ||
70 | #define AS3722_SD23_CONTROL_REG 0x2C | ||
71 | #define AS3722_SD4_CONTROL_REG 0x2D | ||
72 | #define AS3722_SD5_CONTROL_REG 0x2E | ||
73 | #define AS3722_SD6_CONTROL_REG 0x2F | ||
74 | #define AS3722_SD_DVM_REG 0x30 | ||
75 | #define AS3722_RESET_REASON_REG 0x31 | ||
76 | #define AS3722_BATTERY_VOLTAGE_MONITOR_REG 0x32 | ||
77 | #define AS3722_STARTUP_CONTROL_REG 0x33 | ||
78 | #define AS3722_RESET_TIMER_REG 0x34 | ||
79 | #define AS3722_REFERENCE_CONTROL_REG 0x35 | ||
80 | #define AS3722_RESET_CONTROL_REG 0x36 | ||
81 | #define AS3722_OVER_TEMP_CONTROL_REG 0x37 | ||
82 | #define AS3722_WATCHDOG_CONTROL_REG 0x38 | ||
83 | #define AS3722_REG_STANDBY_MOD1_REG 0x39 | ||
84 | #define AS3722_REG_STANDBY_MOD2_REG 0x3A | ||
85 | #define AS3722_REG_STANDBY_MOD3_REG 0x3B | ||
86 | #define AS3722_ENABLE_CTRL1_REG 0x3C | ||
87 | #define AS3722_ENABLE_CTRL2_REG 0x3D | ||
88 | #define AS3722_ENABLE_CTRL3_REG 0x3E | ||
89 | #define AS3722_ENABLE_CTRL4_REG 0x3F | ||
90 | #define AS3722_ENABLE_CTRL5_REG 0x40 | ||
91 | #define AS3722_PWM_CONTROL_L_REG 0x41 | ||
92 | #define AS3722_PWM_CONTROL_H_REG 0x42 | ||
93 | #define AS3722_WATCHDOG_TIMER_REG 0x46 | ||
94 | #define AS3722_WATCHDOG_SOFTWARE_SIGNAL_REG 0x48 | ||
95 | #define AS3722_IOVOLTAGE_REG 0x49 | ||
96 | #define AS3722_BATTERY_VOLTAGE_MONITOR2_REG 0x4A | ||
97 | #define AS3722_SD_CONTROL_REG 0x4D | ||
98 | #define AS3722_LDOCONTROL0_REG 0x4E | ||
99 | #define AS3722_LDOCONTROL1_REG 0x4F | ||
100 | #define AS3722_SD0_PROTECT_REG 0x50 | ||
101 | #define AS3722_SD6_PROTECT_REG 0x51 | ||
102 | #define AS3722_PWM_VCONTROL1_REG 0x52 | ||
103 | #define AS3722_PWM_VCONTROL2_REG 0x53 | ||
104 | #define AS3722_PWM_VCONTROL3_REG 0x54 | ||
105 | #define AS3722_PWM_VCONTROL4_REG 0x55 | ||
106 | #define AS3722_BB_CHARGER_REG 0x57 | ||
107 | #define AS3722_CTRL_SEQU1_REG 0x58 | ||
108 | #define AS3722_CTRL_SEQU2_REG 0x59 | ||
109 | #define AS3722_OVCURRENT_REG 0x5A | ||
110 | #define AS3722_OVCURRENT_DEB_REG 0x5B | ||
111 | #define AS3722_SDLV_DEB_REG 0x5C | ||
112 | #define AS3722_OC_PG_CTRL_REG 0x5D | ||
113 | #define AS3722_OC_PG_CTRL2_REG 0x5E | ||
114 | #define AS3722_CTRL_STATUS 0x5F | ||
115 | #define AS3722_RTC_CONTROL_REG 0x60 | ||
116 | #define AS3722_RTC_SECOND_REG 0x61 | ||
117 | #define AS3722_RTC_MINUTE_REG 0x62 | ||
118 | #define AS3722_RTC_HOUR_REG 0x63 | ||
119 | #define AS3722_RTC_DAY_REG 0x64 | ||
120 | #define AS3722_RTC_MONTH_REG 0x65 | ||
121 | #define AS3722_RTC_YEAR_REG 0x66 | ||
122 | #define AS3722_RTC_ALARM_SECOND_REG 0x67 | ||
123 | #define AS3722_RTC_ALARM_MINUTE_REG 0x68 | ||
124 | #define AS3722_RTC_ALARM_HOUR_REG 0x69 | ||
125 | #define AS3722_RTC_ALARM_DAY_REG 0x6A | ||
126 | #define AS3722_RTC_ALARM_MONTH_REG 0x6B | ||
127 | #define AS3722_RTC_ALARM_YEAR_REG 0x6C | ||
128 | #define AS3722_SRAM_REG 0x6D | ||
129 | #define AS3722_RTC_ACCESS_REG 0x6F | ||
130 | #define AS3722_RTC_STATUS_REG 0x73 | ||
131 | #define AS3722_INTERRUPT_MASK1_REG 0x74 | ||
132 | #define AS3722_INTERRUPT_MASK2_REG 0x75 | ||
133 | #define AS3722_INTERRUPT_MASK3_REG 0x76 | ||
134 | #define AS3722_INTERRUPT_MASK4_REG 0x77 | ||
135 | #define AS3722_INTERRUPT_STATUS1_REG 0x78 | ||
136 | #define AS3722_INTERRUPT_STATUS2_REG 0x79 | ||
137 | #define AS3722_INTERRUPT_STATUS3_REG 0x7A | ||
138 | #define AS3722_INTERRUPT_STATUS4_REG 0x7B | ||
139 | #define AS3722_TEMP_STATUS_REG 0x7D | ||
140 | #define AS3722_ADC0_CONTROL_REG 0x80 | ||
141 | #define AS3722_ADC1_CONTROL_REG 0x81 | ||
142 | #define AS3722_ADC0_MSB_RESULT_REG 0x82 | ||
143 | #define AS3722_ADC0_LSB_RESULT_REG 0x83 | ||
144 | #define AS3722_ADC1_MSB_RESULT_REG 0x84 | ||
145 | #define AS3722_ADC1_LSB_RESULT_REG 0x85 | ||
146 | #define AS3722_ADC1_THRESHOLD_HI_MSB_REG 0x86 | ||
147 | #define AS3722_ADC1_THRESHOLD_HI_LSB_REG 0x87 | ||
148 | #define AS3722_ADC1_THRESHOLD_LO_MSB_REG 0x88 | ||
149 | #define AS3722_ADC1_THRESHOLD_LO_LSB_REG 0x89 | ||
150 | #define AS3722_ADC_CONFIGURATION_REG 0x8A | ||
151 | #define AS3722_ASIC_ID1_REG 0x90 | ||
152 | #define AS3722_ASIC_ID2_REG 0x91 | ||
153 | #define AS3722_LOCK_REG 0x9E | ||
154 | #define AS3722_MAX_REGISTER 0xF4 | ||
155 | |||
156 | #define AS3722_SD0_EXT_ENABLE_MASK 0x03 | ||
157 | #define AS3722_SD1_EXT_ENABLE_MASK 0x0C | ||
158 | #define AS3722_SD2_EXT_ENABLE_MASK 0x30 | ||
159 | #define AS3722_SD3_EXT_ENABLE_MASK 0xC0 | ||
160 | #define AS3722_SD4_EXT_ENABLE_MASK 0x03 | ||
161 | #define AS3722_SD5_EXT_ENABLE_MASK 0x0C | ||
162 | #define AS3722_SD6_EXT_ENABLE_MASK 0x30 | ||
163 | #define AS3722_LDO0_EXT_ENABLE_MASK 0x03 | ||
164 | #define AS3722_LDO1_EXT_ENABLE_MASK 0x0C | ||
165 | #define AS3722_LDO2_EXT_ENABLE_MASK 0x30 | ||
166 | #define AS3722_LDO3_EXT_ENABLE_MASK 0xC0 | ||
167 | #define AS3722_LDO4_EXT_ENABLE_MASK 0x03 | ||
168 | #define AS3722_LDO5_EXT_ENABLE_MASK 0x0C | ||
169 | #define AS3722_LDO6_EXT_ENABLE_MASK 0x30 | ||
170 | #define AS3722_LDO7_EXT_ENABLE_MASK 0xC0 | ||
171 | #define AS3722_LDO9_EXT_ENABLE_MASK 0x0C | ||
172 | #define AS3722_LDO10_EXT_ENABLE_MASK 0x30 | ||
173 | #define AS3722_LDO11_EXT_ENABLE_MASK 0xC0 | ||
174 | |||
175 | #define AS3722_OVCURRENT_SD0_ALARM_MASK 0x07 | ||
176 | #define AS3722_OVCURRENT_SD0_ALARM_SHIFT 0x01 | ||
177 | #define AS3722_OVCURRENT_SD0_TRIP_MASK 0x18 | ||
178 | #define AS3722_OVCURRENT_SD0_TRIP_SHIFT 0x03 | ||
179 | #define AS3722_OVCURRENT_SD1_TRIP_MASK 0x60 | ||
180 | #define AS3722_OVCURRENT_SD1_TRIP_SHIFT 0x05 | ||
181 | |||
182 | #define AS3722_OVCURRENT_SD6_ALARM_MASK 0x07 | ||
183 | #define AS3722_OVCURRENT_SD6_ALARM_SHIFT 0x01 | ||
184 | #define AS3722_OVCURRENT_SD6_TRIP_MASK 0x18 | ||
185 | #define AS3722_OVCURRENT_SD6_TRIP_SHIFT 0x03 | ||
186 | |||
187 | /* AS3722 register bits and bit masks */ | ||
188 | #define AS3722_LDO_ILIMIT_MASK BIT(7) | ||
189 | #define AS3722_LDO_ILIMIT_BIT BIT(7) | ||
190 | #define AS3722_LDO0_VSEL_MASK 0x1F | ||
191 | #define AS3722_LDO0_VSEL_MIN 0x01 | ||
192 | #define AS3722_LDO0_VSEL_MAX 0x12 | ||
193 | #define AS3722_LDO0_NUM_VOLT 0x12 | ||
194 | #define AS3722_LDO3_VSEL_MASK 0x3F | ||
195 | #define AS3722_LDO3_VSEL_MIN 0x01 | ||
196 | #define AS3722_LDO3_VSEL_MAX 0x2D | ||
197 | #define AS3722_LDO3_NUM_VOLT 0x2D | ||
198 | #define AS3722_LDO_VSEL_MASK 0x7F | ||
199 | #define AS3722_LDO_VSEL_MIN 0x01 | ||
200 | #define AS3722_LDO_VSEL_MAX 0x7F | ||
201 | #define AS3722_LDO_VSEL_DNU_MIN 0x25 | ||
202 | #define AS3722_LDO_VSEL_DNU_MAX 0x3F | ||
203 | #define AS3722_LDO_NUM_VOLT 0x80 | ||
204 | |||
205 | #define AS3722_LDO0_CTRL BIT(0) | ||
206 | #define AS3722_LDO1_CTRL BIT(1) | ||
207 | #define AS3722_LDO2_CTRL BIT(2) | ||
208 | #define AS3722_LDO3_CTRL BIT(3) | ||
209 | #define AS3722_LDO4_CTRL BIT(4) | ||
210 | #define AS3722_LDO5_CTRL BIT(5) | ||
211 | #define AS3722_LDO6_CTRL BIT(6) | ||
212 | #define AS3722_LDO7_CTRL BIT(7) | ||
213 | #define AS3722_LDO9_CTRL BIT(1) | ||
214 | #define AS3722_LDO10_CTRL BIT(2) | ||
215 | #define AS3722_LDO11_CTRL BIT(3) | ||
216 | |||
217 | #define AS3722_LDO3_MODE_MASK (3 << 6) | ||
218 | #define AS3722_LDO3_MODE_VAL(n) (((n) & 0x3) << 6) | ||
219 | #define AS3722_LDO3_MODE_PMOS AS3722_LDO3_MODE_VAL(0) | ||
220 | #define AS3722_LDO3_MODE_PMOS_TRACKING AS3722_LDO3_MODE_VAL(1) | ||
221 | #define AS3722_LDO3_MODE_NMOS AS3722_LDO3_MODE_VAL(2) | ||
222 | #define AS3722_LDO3_MODE_SWITCH AS3722_LDO3_MODE_VAL(3) | ||
223 | |||
224 | #define AS3722_SD_VSEL_MASK 0x7F | ||
225 | #define AS3722_SD0_VSEL_MIN 0x01 | ||
226 | #define AS3722_SD0_VSEL_MAX 0x5A | ||
227 | #define AS3722_SD2_VSEL_MIN 0x01 | ||
228 | #define AS3722_SD2_VSEL_MAX 0x7F | ||
229 | |||
230 | #define AS3722_SDn_CTRL(n) BIT(n) | ||
231 | |||
232 | #define AS3722_SD0_MODE_FAST BIT(4) | ||
233 | #define AS3722_SD1_MODE_FAST BIT(4) | ||
234 | #define AS3722_SD2_MODE_FAST BIT(2) | ||
235 | #define AS3722_SD3_MODE_FAST BIT(6) | ||
236 | #define AS3722_SD4_MODE_FAST BIT(2) | ||
237 | #define AS3722_SD5_MODE_FAST BIT(2) | ||
238 | #define AS3722_SD6_MODE_FAST BIT(4) | ||
239 | |||
240 | #define AS3722_POWER_OFF BIT(1) | ||
241 | |||
242 | #define AS3722_INTERRUPT_MASK1_LID BIT(0) | ||
243 | #define AS3722_INTERRUPT_MASK1_ACOK BIT(1) | ||
244 | #define AS3722_INTERRUPT_MASK1_ENABLE1 BIT(2) | ||
245 | #define AS3722_INTERRUPT_MASK1_OCURR_ALARM_SD0 BIT(3) | ||
246 | #define AS3722_INTERRUPT_MASK1_ONKEY_LONG BIT(4) | ||
247 | #define AS3722_INTERRUPT_MASK1_ONKEY BIT(5) | ||
248 | #define AS3722_INTERRUPT_MASK1_OVTMP BIT(6) | ||
249 | #define AS3722_INTERRUPT_MASK1_LOWBAT BIT(7) | ||
250 | |||
251 | #define AS3722_INTERRUPT_MASK2_SD0_LV BIT(0) | ||
252 | #define AS3722_INTERRUPT_MASK2_SD1_LV BIT(1) | ||
253 | #define AS3722_INTERRUPT_MASK2_SD2345_LV BIT(2) | ||
254 | #define AS3722_INTERRUPT_MASK2_PWM1_OV_PROT BIT(3) | ||
255 | #define AS3722_INTERRUPT_MASK2_PWM2_OV_PROT BIT(4) | ||
256 | #define AS3722_INTERRUPT_MASK2_ENABLE2 BIT(5) | ||
257 | #define AS3722_INTERRUPT_MASK2_SD6_LV BIT(6) | ||
258 | #define AS3722_INTERRUPT_MASK2_RTC_REP BIT(7) | ||
259 | |||
260 | #define AS3722_INTERRUPT_MASK3_RTC_ALARM BIT(0) | ||
261 | #define AS3722_INTERRUPT_MASK3_GPIO1 BIT(1) | ||
262 | #define AS3722_INTERRUPT_MASK3_GPIO2 BIT(2) | ||
263 | #define AS3722_INTERRUPT_MASK3_GPIO3 BIT(3) | ||
264 | #define AS3722_INTERRUPT_MASK3_GPIO4 BIT(4) | ||
265 | #define AS3722_INTERRUPT_MASK3_GPIO5 BIT(5) | ||
266 | #define AS3722_INTERRUPT_MASK3_WATCHDOG BIT(6) | ||
267 | #define AS3722_INTERRUPT_MASK3_ENABLE3 BIT(7) | ||
268 | |||
269 | #define AS3722_INTERRUPT_MASK4_TEMP_SD0_SHUTDOWN BIT(0) | ||
270 | #define AS3722_INTERRUPT_MASK4_TEMP_SD1_SHUTDOWN BIT(1) | ||
271 | #define AS3722_INTERRUPT_MASK4_TEMP_SD6_SHUTDOWN BIT(2) | ||
272 | #define AS3722_INTERRUPT_MASK4_TEMP_SD0_ALARM BIT(3) | ||
273 | #define AS3722_INTERRUPT_MASK4_TEMP_SD1_ALARM BIT(4) | ||
274 | #define AS3722_INTERRUPT_MASK4_TEMP_SD6_ALARM BIT(5) | ||
275 | #define AS3722_INTERRUPT_MASK4_OCCUR_ALARM_SD6 BIT(6) | ||
276 | #define AS3722_INTERRUPT_MASK4_ADC BIT(7) | ||
277 | |||
278 | #define AS3722_ADC1_INTERVAL_TIME BIT(0) | ||
279 | #define AS3722_ADC1_INT_MODE_ON BIT(1) | ||
280 | #define AS3722_ADC_BUF_ON BIT(2) | ||
281 | #define AS3722_ADC1_LOW_VOLTAGE_RANGE BIT(5) | ||
282 | #define AS3722_ADC1_INTEVAL_SCAN BIT(6) | ||
283 | #define AS3722_ADC1_INT_MASK BIT(7) | ||
284 | |||
285 | #define AS3722_ADC_MSB_VAL_MASK 0x7F | ||
286 | #define AS3722_ADC_LSB_VAL_MASK 0x07 | ||
287 | |||
288 | #define AS3722_ADC0_CONV_START BIT(7) | ||
289 | #define AS3722_ADC0_CONV_NOTREADY BIT(7) | ||
290 | #define AS3722_ADC0_SOURCE_SELECT_MASK 0x1F | ||
291 | |||
292 | #define AS3722_ADC1_CONV_START BIT(7) | ||
293 | #define AS3722_ADC1_CONV_NOTREADY BIT(7) | ||
294 | #define AS3722_ADC1_SOURCE_SELECT_MASK 0x1F | ||
295 | |||
296 | /* GPIO modes */ | ||
297 | #define AS3722_GPIO_MODE_MASK 0x07 | ||
298 | #define AS3722_GPIO_MODE_INPUT 0x00 | ||
299 | #define AS3722_GPIO_MODE_OUTPUT_VDDH 0x01 | ||
300 | #define AS3722_GPIO_MODE_IO_OPEN_DRAIN 0x02 | ||
301 | #define AS3722_GPIO_MODE_ADC_IN 0x03 | ||
302 | #define AS3722_GPIO_MODE_INPUT_PULL_UP 0x04 | ||
303 | #define AS3722_GPIO_MODE_INPUT_PULL_DOWN 0x05 | ||
304 | #define AS3722_GPIO_MODE_IO_OPEN_DRAIN_PULL_UP 0x06 | ||
305 | #define AS3722_GPIO_MODE_OUTPUT_VDDL 0x07 | ||
306 | #define AS3722_GPIO_MODE_VAL(n) ((n) & AS3722_GPIO_MODE_MASK) | ||
307 | |||
308 | #define AS3722_GPIO_INV BIT(7) | ||
309 | #define AS3722_GPIO_IOSF_MASK 0x78 | ||
310 | #define AS3722_GPIO_IOSF_VAL(n) (((n) & 0xF) << 3) | ||
311 | #define AS3722_GPIO_IOSF_NORMAL AS3722_GPIO_IOSF_VAL(0) | ||
312 | #define AS3722_GPIO_IOSF_INTERRUPT_OUT AS3722_GPIO_IOSF_VAL(1) | ||
313 | #define AS3722_GPIO_IOSF_VSUP_LOW_OUT AS3722_GPIO_IOSF_VAL(2) | ||
314 | #define AS3722_GPIO_IOSF_GPIO_INTERRUPT_IN AS3722_GPIO_IOSF_VAL(3) | ||
315 | #define AS3722_GPIO_IOSF_ISINK_PWM_IN AS3722_GPIO_IOSF_VAL(4) | ||
316 | #define AS3722_GPIO_IOSF_VOLTAGE_STBY AS3722_GPIO_IOSF_VAL(5) | ||
317 | #define AS3722_GPIO_IOSF_PWR_GOOD_OUT AS3722_GPIO_IOSF_VAL(7) | ||
318 | #define AS3722_GPIO_IOSF_Q32K_OUT AS3722_GPIO_IOSF_VAL(8) | ||
319 | #define AS3722_GPIO_IOSF_WATCHDOG_IN AS3722_GPIO_IOSF_VAL(9) | ||
320 | #define AS3722_GPIO_IOSF_SOFT_RESET_IN AS3722_GPIO_IOSF_VAL(11) | ||
321 | #define AS3722_GPIO_IOSF_PWM_OUT AS3722_GPIO_IOSF_VAL(12) | ||
322 | #define AS3722_GPIO_IOSF_VSUP_LOW_DEB_OUT AS3722_GPIO_IOSF_VAL(13) | ||
323 | #define AS3722_GPIO_IOSF_SD6_LOW_VOLT_LOW AS3722_GPIO_IOSF_VAL(14) | ||
324 | |||
325 | #define AS3722_GPIOn_SIGNAL(n) BIT(n) | ||
326 | #define AS3722_GPIOn_CONTROL_REG(n) (AS3722_GPIO0_CONTROL_REG + n) | ||
327 | #define AS3722_I2C_PULL_UP BIT(4) | ||
328 | #define AS3722_INT_PULL_UP BIT(5) | ||
329 | |||
330 | #define AS3722_RTC_REP_WAKEUP_EN BIT(0) | ||
331 | #define AS3722_RTC_ALARM_WAKEUP_EN BIT(1) | ||
332 | #define AS3722_RTC_ON BIT(2) | ||
333 | #define AS3722_RTC_IRQMODE BIT(3) | ||
334 | #define AS3722_RTC_CLK32K_OUT_EN BIT(5) | ||
335 | |||
336 | #define AS3722_WATCHDOG_TIMER_MAX 0x7F | ||
337 | #define AS3722_WATCHDOG_ON BIT(0) | ||
338 | #define AS3722_WATCHDOG_SW_SIG BIT(0) | ||
339 | |||
340 | #define AS3722_EXT_CONTROL_ENABLE1 0x1 | ||
341 | #define AS3722_EXT_CONTROL_ENABLE2 0x2 | ||
342 | #define AS3722_EXT_CONTROL_ENABLE3 0x3 | ||
343 | |||
344 | /* Interrupt IDs */ | ||
345 | enum as3722_irq { | ||
346 | AS3722_IRQ_LID, | ||
347 | AS3722_IRQ_ACOK, | ||
348 | AS3722_IRQ_ENABLE1, | ||
349 | AS3722_IRQ_OCCUR_ALARM_SD0, | ||
350 | AS3722_IRQ_ONKEY_LONG_PRESS, | ||
351 | AS3722_IRQ_ONKEY, | ||
352 | AS3722_IRQ_OVTMP, | ||
353 | AS3722_IRQ_LOWBAT, | ||
354 | AS3722_IRQ_SD0_LV, | ||
355 | AS3722_IRQ_SD1_LV, | ||
356 | AS3722_IRQ_SD2_LV, | ||
357 | AS3722_IRQ_PWM1_OV_PROT, | ||
358 | AS3722_IRQ_PWM2_OV_PROT, | ||
359 | AS3722_IRQ_ENABLE2, | ||
360 | AS3722_IRQ_SD6_LV, | ||
361 | AS3722_IRQ_RTC_REP, | ||
362 | AS3722_IRQ_RTC_ALARM, | ||
363 | AS3722_IRQ_GPIO1, | ||
364 | AS3722_IRQ_GPIO2, | ||
365 | AS3722_IRQ_GPIO3, | ||
366 | AS3722_IRQ_GPIO4, | ||
367 | AS3722_IRQ_GPIO5, | ||
368 | AS3722_IRQ_WATCHDOG, | ||
369 | AS3722_IRQ_ENABLE3, | ||
370 | AS3722_IRQ_TEMP_SD0_SHUTDOWN, | ||
371 | AS3722_IRQ_TEMP_SD1_SHUTDOWN, | ||
372 | AS3722_IRQ_TEMP_SD2_SHUTDOWN, | ||
373 | AS3722_IRQ_TEMP_SD0_ALARM, | ||
374 | AS3722_IRQ_TEMP_SD1_ALARM, | ||
375 | AS3722_IRQ_TEMP_SD6_ALARM, | ||
376 | AS3722_IRQ_OCCUR_ALARM_SD6, | ||
377 | AS3722_IRQ_ADC, | ||
378 | AS3722_IRQ_MAX, | ||
379 | }; | ||
380 | |||
381 | struct as3722 { | ||
382 | struct device *dev; | ||
383 | struct regmap *regmap; | ||
384 | int chip_irq; | ||
385 | unsigned long irq_flags; | ||
386 | bool en_intern_int_pullup; | ||
387 | bool en_intern_i2c_pullup; | ||
388 | struct regmap_irq_chip_data *irq_data; | ||
389 | }; | ||
390 | |||
391 | static inline int as3722_read(struct as3722 *as3722, u32 reg, u32 *dest) | ||
392 | { | ||
393 | return regmap_read(as3722->regmap, reg, dest); | ||
394 | } | ||
395 | |||
396 | static inline int as3722_write(struct as3722 *as3722, u32 reg, u32 value) | ||
397 | { | ||
398 | return regmap_write(as3722->regmap, reg, value); | ||
399 | } | ||
400 | |||
401 | static inline int as3722_block_read(struct as3722 *as3722, u32 reg, | ||
402 | int count, u8 *buf) | ||
403 | { | ||
404 | return regmap_bulk_read(as3722->regmap, reg, buf, count); | ||
405 | } | ||
406 | |||
407 | static inline int as3722_block_write(struct as3722 *as3722, u32 reg, | ||
408 | int count, u8 *data) | ||
409 | { | ||
410 | return regmap_bulk_write(as3722->regmap, reg, data, count); | ||
411 | } | ||
412 | |||
413 | static inline int as3722_update_bits(struct as3722 *as3722, u32 reg, | ||
414 | u32 mask, u8 val) | ||
415 | { | ||
416 | return regmap_update_bits(as3722->regmap, reg, mask, val); | ||
417 | } | ||
418 | |||
419 | static inline int as3722_irq_get_virq(struct as3722 *as3722, int irq) | ||
420 | { | ||
421 | return regmap_irq_get_virq(as3722->irq_data, irq); | ||
422 | } | ||
423 | #endif /* __LINUX_MFD_AS3722_H__ */ | ||
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index cebe97ee98b8..bdba8c61207b 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -59,6 +59,12 @@ struct mfd_cell { | |||
59 | * pm_runtime_no_callbacks(). | 59 | * pm_runtime_no_callbacks(). |
60 | */ | 60 | */ |
61 | bool pm_runtime_no_callbacks; | 61 | bool pm_runtime_no_callbacks; |
62 | |||
63 | /* A list of regulator supplies that should be mapped to the MFD | ||
64 | * device rather than the child device when requested | ||
65 | */ | ||
66 | const char **parent_supplies; | ||
67 | int num_parent_supplies; | ||
62 | }; | 68 | }; |
63 | 69 | ||
64 | /* | 70 | /* |
@@ -98,7 +104,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
98 | } | 104 | } |
99 | 105 | ||
100 | extern int mfd_add_devices(struct device *parent, int id, | 106 | extern int mfd_add_devices(struct device *parent, int id, |
101 | struct mfd_cell *cells, int n_devs, | 107 | const struct mfd_cell *cells, int n_devs, |
102 | struct resource *mem_base, | 108 | struct resource *mem_base, |
103 | int irq_base, struct irq_domain *irq_domain); | 109 | int irq_base, struct irq_domain *irq_domain); |
104 | 110 | ||
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h index 786d02eb79d2..21e21b81cc75 100644 --- a/include/linux/mfd/da9052/da9052.h +++ b/include/linux/mfd/da9052/da9052.h | |||
@@ -148,10 +148,15 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, | |||
148 | unsigned reg_cnt, unsigned char *val) | 148 | unsigned reg_cnt, unsigned char *val) |
149 | { | 149 | { |
150 | int ret; | 150 | int ret; |
151 | unsigned int tmp; | ||
152 | int i; | ||
151 | 153 | ||
152 | ret = regmap_bulk_read(da9052->regmap, reg, val, reg_cnt); | 154 | for (i = 0; i < reg_cnt; i++) { |
153 | if (ret < 0) | 155 | ret = regmap_read(da9052->regmap, reg + i, &tmp); |
154 | return ret; | 156 | val[i] = (unsigned char)tmp; |
157 | if (ret < 0) | ||
158 | return ret; | ||
159 | } | ||
155 | 160 | ||
156 | if (da9052->fix_io) { | 161 | if (da9052->fix_io) { |
157 | ret = da9052->fix_io(da9052, reg); | 162 | ret = da9052->fix_io(da9052, reg); |
@@ -166,10 +171,13 @@ static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, | |||
166 | unsigned reg_cnt, unsigned char *val) | 171 | unsigned reg_cnt, unsigned char *val) |
167 | { | 172 | { |
168 | int ret; | 173 | int ret; |
174 | int i; | ||
169 | 175 | ||
170 | ret = regmap_raw_write(da9052->regmap, reg, val, reg_cnt); | 176 | for (i = 0; i < reg_cnt; i++) { |
171 | if (ret < 0) | 177 | ret = regmap_write(da9052->regmap, reg + i, val[i]); |
172 | return ret; | 178 | if (ret < 0) |
179 | return ret; | ||
180 | } | ||
173 | 181 | ||
174 | if (da9052->fix_io) { | 182 | if (da9052->fix_io) { |
175 | ret = da9052->fix_io(da9052, reg); | 183 | ret = da9052->fix_io(da9052, reg); |
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index ca0790fba2f5..060e11256fbc 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/notifier.h> | 12 | #include <linux/notifier.h> |
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | 14 | ||
15 | #include <dt-bindings/mfd/dbx500-prcmu.h> /* For clock identifiers */ | ||
16 | |||
15 | /* Offset for the firmware version within the TCPM */ | 17 | /* Offset for the firmware version within the TCPM */ |
16 | #define DB8500_PRCMU_FW_VERSION_OFFSET 0xA4 | 18 | #define DB8500_PRCMU_FW_VERSION_OFFSET 0xA4 |
17 | #define DBX540_PRCMU_FW_VERSION_OFFSET 0xA8 | 19 | #define DBX540_PRCMU_FW_VERSION_OFFSET 0xA8 |
@@ -94,74 +96,6 @@ enum prcmu_wakeup_index { | |||
94 | #define PRCMU_CLKSRC_ARMCLKFIX 0x46 | 96 | #define PRCMU_CLKSRC_ARMCLKFIX 0x46 |
95 | #define PRCMU_CLKSRC_HDMICLK 0x47 | 97 | #define PRCMU_CLKSRC_HDMICLK 0x47 |
96 | 98 | ||
97 | /* | ||
98 | * Clock identifiers. | ||
99 | */ | ||
100 | enum prcmu_clock { | ||
101 | PRCMU_SGACLK, | ||
102 | PRCMU_UARTCLK, | ||
103 | PRCMU_MSP02CLK, | ||
104 | PRCMU_MSP1CLK, | ||
105 | PRCMU_I2CCLK, | ||
106 | PRCMU_SDMMCCLK, | ||
107 | PRCMU_SPARE1CLK, | ||
108 | PRCMU_SLIMCLK, | ||
109 | PRCMU_PER1CLK, | ||
110 | PRCMU_PER2CLK, | ||
111 | PRCMU_PER3CLK, | ||
112 | PRCMU_PER5CLK, | ||
113 | PRCMU_PER6CLK, | ||
114 | PRCMU_PER7CLK, | ||
115 | PRCMU_LCDCLK, | ||
116 | PRCMU_BMLCLK, | ||
117 | PRCMU_HSITXCLK, | ||
118 | PRCMU_HSIRXCLK, | ||
119 | PRCMU_HDMICLK, | ||
120 | PRCMU_APEATCLK, | ||
121 | PRCMU_APETRACECLK, | ||
122 | PRCMU_MCDECLK, | ||
123 | PRCMU_IPI2CCLK, | ||
124 | PRCMU_DSIALTCLK, | ||
125 | PRCMU_DMACLK, | ||
126 | PRCMU_B2R2CLK, | ||
127 | PRCMU_TVCLK, | ||
128 | PRCMU_SSPCLK, | ||
129 | PRCMU_RNGCLK, | ||
130 | PRCMU_UICCCLK, | ||
131 | PRCMU_PWMCLK, | ||
132 | PRCMU_IRDACLK, | ||
133 | PRCMU_IRRCCLK, | ||
134 | PRCMU_SIACLK, | ||
135 | PRCMU_SVACLK, | ||
136 | PRCMU_ACLK, | ||
137 | PRCMU_HVACLK, /* Ux540 only */ | ||
138 | PRCMU_G1CLK, /* Ux540 only */ | ||
139 | PRCMU_SDMMCHCLK, | ||
140 | PRCMU_CAMCLK, | ||
141 | PRCMU_BML8580CLK, | ||
142 | PRCMU_NUM_REG_CLOCKS, | ||
143 | PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, | ||
144 | PRCMU_CDCLK, | ||
145 | PRCMU_TIMCLK, | ||
146 | PRCMU_PLLSOC0, | ||
147 | PRCMU_PLLSOC1, | ||
148 | PRCMU_ARMSS, | ||
149 | PRCMU_PLLDDR, | ||
150 | PRCMU_PLLDSI, | ||
151 | PRCMU_DSI0CLK, | ||
152 | PRCMU_DSI1CLK, | ||
153 | PRCMU_DSI0ESCCLK, | ||
154 | PRCMU_DSI1ESCCLK, | ||
155 | PRCMU_DSI2ESCCLK, | ||
156 | /* LCD DSI PLL - Ux540 only */ | ||
157 | PRCMU_PLLDSI_LCD, | ||
158 | PRCMU_DSI0CLK_LCD, | ||
159 | PRCMU_DSI1CLK_LCD, | ||
160 | PRCMU_DSI0ESCCLK_LCD, | ||
161 | PRCMU_DSI1ESCCLK_LCD, | ||
162 | PRCMU_DSI2ESCCLK_LCD, | ||
163 | }; | ||
164 | |||
165 | /** | 99 | /** |
166 | * enum prcmu_wdog_id - PRCMU watchdog IDs | 100 | * enum prcmu_wdog_id - PRCMU watchdog IDs |
167 | * @PRCMU_WDOG_ALL: use all timers | 101 | * @PRCMU_WDOG_ALL: use all timers |
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h new file mode 100644 index 000000000000..a3d0185196d3 --- /dev/null +++ b/include/linux/mfd/max14577-private.h | |||
@@ -0,0 +1,330 @@ | |||
1 | /* | ||
2 | * max14577-private.h - Common API for the Maxim 14577 internal sub chip | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electrnoics | ||
5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MAX14577_PRIVATE_H__ | ||
20 | #define __MAX14577_PRIVATE_H__ | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | #include <linux/regmap.h> | ||
24 | |||
25 | #define MAX14577_REG_INVALID (0xff) | ||
26 | |||
27 | /* Slave addr = 0x4A: Interrupt */ | ||
28 | enum max14577_reg { | ||
29 | MAX14577_REG_DEVICEID = 0x00, | ||
30 | MAX14577_REG_INT1 = 0x01, | ||
31 | MAX14577_REG_INT2 = 0x02, | ||
32 | MAX14577_REG_INT3 = 0x03, | ||
33 | MAX14577_REG_STATUS1 = 0x04, | ||
34 | MAX14577_REG_STATUS2 = 0x05, | ||
35 | MAX14577_REG_STATUS3 = 0x06, | ||
36 | MAX14577_REG_INTMASK1 = 0x07, | ||
37 | MAX14577_REG_INTMASK2 = 0x08, | ||
38 | MAX14577_REG_INTMASK3 = 0x09, | ||
39 | MAX14577_REG_CDETCTRL1 = 0x0A, | ||
40 | MAX14577_REG_RFU = 0x0B, | ||
41 | MAX14577_REG_CONTROL1 = 0x0C, | ||
42 | MAX14577_REG_CONTROL2 = 0x0D, | ||
43 | MAX14577_REG_CONTROL3 = 0x0E, | ||
44 | MAX14577_REG_CHGCTRL1 = 0x0F, | ||
45 | MAX14577_REG_CHGCTRL2 = 0x10, | ||
46 | MAX14577_REG_CHGCTRL3 = 0x11, | ||
47 | MAX14577_REG_CHGCTRL4 = 0x12, | ||
48 | MAX14577_REG_CHGCTRL5 = 0x13, | ||
49 | MAX14577_REG_CHGCTRL6 = 0x14, | ||
50 | MAX14577_REG_CHGCTRL7 = 0x15, | ||
51 | |||
52 | MAX14577_REG_END, | ||
53 | }; | ||
54 | |||
55 | /* Slave addr = 0x4A: MUIC */ | ||
56 | enum max14577_muic_reg { | ||
57 | MAX14577_MUIC_REG_STATUS1 = 0x04, | ||
58 | MAX14577_MUIC_REG_STATUS2 = 0x05, | ||
59 | MAX14577_MUIC_REG_CONTROL1 = 0x0C, | ||
60 | MAX14577_MUIC_REG_CONTROL3 = 0x0E, | ||
61 | |||
62 | MAX14577_MUIC_REG_END, | ||
63 | }; | ||
64 | |||
65 | enum max14577_muic_charger_type { | ||
66 | MAX14577_CHARGER_TYPE_NONE = 0, | ||
67 | MAX14577_CHARGER_TYPE_USB, | ||
68 | MAX14577_CHARGER_TYPE_DOWNSTREAM_PORT, | ||
69 | MAX14577_CHARGER_TYPE_DEDICATED_CHG, | ||
70 | MAX14577_CHARGER_TYPE_SPECIAL_500MA, | ||
71 | MAX14577_CHARGER_TYPE_SPECIAL_1A, | ||
72 | MAX14577_CHARGER_TYPE_RESERVED, | ||
73 | MAX14577_CHARGER_TYPE_DEAD_BATTERY = 7, | ||
74 | }; | ||
75 | |||
76 | /* MAX14577 interrupts */ | ||
77 | #define INT1_ADC_MASK (0x1 << 0) | ||
78 | #define INT1_ADCLOW_MASK (0x1 << 1) | ||
79 | #define INT1_ADCERR_MASK (0x1 << 2) | ||
80 | |||
81 | #define INT2_CHGTYP_MASK (0x1 << 0) | ||
82 | #define INT2_CHGDETRUN_MASK (0x1 << 1) | ||
83 | #define INT2_DCDTMR_MASK (0x1 << 2) | ||
84 | #define INT2_DBCHG_MASK (0x1 << 3) | ||
85 | #define INT2_VBVOLT_MASK (0x1 << 4) | ||
86 | |||
87 | #define INT3_EOC_MASK (0x1 << 0) | ||
88 | #define INT3_CGMBC_MASK (0x1 << 1) | ||
89 | #define INT3_OVP_MASK (0x1 << 2) | ||
90 | #define INT3_MBCCHGERR_MASK (0x1 << 3) | ||
91 | |||
92 | /* MAX14577 DEVICE ID register */ | ||
93 | #define DEVID_VENDORID_SHIFT 0 | ||
94 | #define DEVID_DEVICEID_SHIFT 3 | ||
95 | #define DEVID_VENDORID_MASK (0x07 << DEVID_VENDORID_SHIFT) | ||
96 | #define DEVID_DEVICEID_MASK (0x1f << DEVID_DEVICEID_SHIFT) | ||
97 | |||
98 | /* MAX14577 STATUS1 register */ | ||
99 | #define STATUS1_ADC_SHIFT 0 | ||
100 | #define STATUS1_ADCLOW_SHIFT 5 | ||
101 | #define STATUS1_ADCERR_SHIFT 6 | ||
102 | #define STATUS1_ADC_MASK (0x1f << STATUS1_ADC_SHIFT) | ||
103 | #define STATUS1_ADCLOW_MASK (0x1 << STATUS1_ADCLOW_SHIFT) | ||
104 | #define STATUS1_ADCERR_MASK (0x1 << STATUS1_ADCERR_SHIFT) | ||
105 | |||
106 | /* MAX14577 STATUS2 register */ | ||
107 | #define STATUS2_CHGTYP_SHIFT 0 | ||
108 | #define STATUS2_CHGDETRUN_SHIFT 3 | ||
109 | #define STATUS2_DCDTMR_SHIFT 4 | ||
110 | #define STATUS2_DBCHG_SHIFT 5 | ||
111 | #define STATUS2_VBVOLT_SHIFT 6 | ||
112 | #define STATUS2_CHGTYP_MASK (0x7 << STATUS2_CHGTYP_SHIFT) | ||
113 | #define STATUS2_CHGDETRUN_MASK (0x1 << STATUS2_CHGDETRUN_SHIFT) | ||
114 | #define STATUS2_DCDTMR_MASK (0x1 << STATUS2_DCDTMR_SHIFT) | ||
115 | #define STATUS2_DBCHG_MASK (0x1 << STATUS2_DBCHG_SHIFT) | ||
116 | #define STATUS2_VBVOLT_MASK (0x1 << STATUS2_VBVOLT_SHIFT) | ||
117 | |||
118 | /* MAX14577 CONTROL1 register */ | ||
119 | #define COMN1SW_SHIFT 0 | ||
120 | #define COMP2SW_SHIFT 3 | ||
121 | #define MICEN_SHIFT 6 | ||
122 | #define IDBEN_SHIFT 7 | ||
123 | #define COMN1SW_MASK (0x7 << COMN1SW_SHIFT) | ||
124 | #define COMP2SW_MASK (0x7 << COMP2SW_SHIFT) | ||
125 | #define MICEN_MASK (0x1 << MICEN_SHIFT) | ||
126 | #define IDBEN_MASK (0x1 << IDBEN_SHIFT) | ||
127 | #define CLEAR_IDBEN_MICEN_MASK (COMN1SW_MASK | COMP2SW_MASK) | ||
128 | #define CTRL1_SW_USB ((1 << COMP2SW_SHIFT) \ | ||
129 | | (1 << COMN1SW_SHIFT)) | ||
130 | #define CTRL1_SW_AUDIO ((2 << COMP2SW_SHIFT) \ | ||
131 | | (2 << COMN1SW_SHIFT)) | ||
132 | #define CTRL1_SW_UART ((3 << COMP2SW_SHIFT) \ | ||
133 | | (3 << COMN1SW_SHIFT)) | ||
134 | #define CTRL1_SW_OPEN ((0 << COMP2SW_SHIFT) \ | ||
135 | | (0 << COMN1SW_SHIFT)) | ||
136 | |||
137 | /* MAX14577 CONTROL2 register */ | ||
138 | #define CTRL2_LOWPWR_SHIFT (0) | ||
139 | #define CTRL2_ADCEN_SHIFT (1) | ||
140 | #define CTRL2_CPEN_SHIFT (2) | ||
141 | #define CTRL2_SFOUTASRT_SHIFT (3) | ||
142 | #define CTRL2_SFOUTORD_SHIFT (4) | ||
143 | #define CTRL2_ACCDET_SHIFT (5) | ||
144 | #define CTRL2_USBCPINT_SHIFT (6) | ||
145 | #define CTRL2_RCPS_SHIFT (7) | ||
146 | #define CTRL2_LOWPWR_MASK (0x1 << CTRL2_LOWPWR_SHIFT) | ||
147 | #define CTRL2_ADCEN_MASK (0x1 << CTRL2_ADCEN_SHIFT) | ||
148 | #define CTRL2_CPEN_MASK (0x1 << CTRL2_CPEN_SHIFT) | ||
149 | #define CTRL2_SFOUTASRT_MASK (0x1 << CTRL2_SFOUTASRT_SHIFT) | ||
150 | #define CTRL2_SFOUTORD_MASK (0x1 << CTRL2_SFOUTORD_SHIFT) | ||
151 | #define CTRL2_ACCDET_MASK (0x1 << CTRL2_ACCDET_SHIFT) | ||
152 | #define CTRL2_USBCPINT_MASK (0x1 << CTRL2_USBCPINT_SHIFT) | ||
153 | #define CTRL2_RCPS_MASK (0x1 << CTR2_RCPS_SHIFT) | ||
154 | |||
155 | #define CTRL2_CPEN1_LOWPWR0 ((1 << CTRL2_CPEN_SHIFT) | \ | ||
156 | (0 << CTRL2_LOWPWR_SHIFT)) | ||
157 | #define CTRL2_CPEN0_LOWPWR1 ((0 << CTRL2_CPEN_SHIFT) | \ | ||
158 | (1 << CTRL2_LOWPWR_SHIFT)) | ||
159 | |||
160 | /* MAX14577 CONTROL3 register */ | ||
161 | #define CTRL3_JIGSET_SHIFT 0 | ||
162 | #define CTRL3_BOOTSET_SHIFT 2 | ||
163 | #define CTRL3_ADCDBSET_SHIFT 4 | ||
164 | #define CTRL3_JIGSET_MASK (0x3 << CTRL3_JIGSET_SHIFT) | ||
165 | #define CTRL3_BOOTSET_MASK (0x3 << CTRL3_BOOTSET_SHIFT) | ||
166 | #define CTRL3_ADCDBSET_MASK (0x3 << CTRL3_ADCDBSET_SHIFT) | ||
167 | |||
168 | /* Slave addr = 0x4A: Charger */ | ||
169 | enum max14577_charger_reg { | ||
170 | MAX14577_CHG_REG_STATUS3 = 0x06, | ||
171 | MAX14577_CHG_REG_CHG_CTRL1 = 0x0F, | ||
172 | MAX14577_CHG_REG_CHG_CTRL2 = 0x10, | ||
173 | MAX14577_CHG_REG_CHG_CTRL3 = 0x11, | ||
174 | MAX14577_CHG_REG_CHG_CTRL4 = 0x12, | ||
175 | MAX14577_CHG_REG_CHG_CTRL5 = 0x13, | ||
176 | MAX14577_CHG_REG_CHG_CTRL6 = 0x14, | ||
177 | MAX14577_CHG_REG_CHG_CTRL7 = 0x15, | ||
178 | |||
179 | MAX14577_CHG_REG_END, | ||
180 | }; | ||
181 | |||
182 | /* MAX14577 STATUS3 register */ | ||
183 | #define STATUS3_EOC_SHIFT 0 | ||
184 | #define STATUS3_CGMBC_SHIFT 1 | ||
185 | #define STATUS3_OVP_SHIFT 2 | ||
186 | #define STATUS3_MBCCHGERR_SHIFT 3 | ||
187 | #define STATUS3_EOC_MASK (0x1 << STATUS3_EOC_SHIFT) | ||
188 | #define STATUS3_CGMBC_MASK (0x1 << STATUS3_CGMBC_SHIFT) | ||
189 | #define STATUS3_OVP_MASK (0x1 << STATUS3_OVP_SHIFT) | ||
190 | #define STATUS3_MBCCHGERR_MASK (0x1 << STATUS3_MBCCHGERR_SHIFT) | ||
191 | |||
192 | /* MAX14577 CDETCTRL1 register */ | ||
193 | #define CDETCTRL1_CHGDETEN_SHIFT 0 | ||
194 | #define CDETCTRL1_CHGTYPMAN_SHIFT 1 | ||
195 | #define CDETCTRL1_DCDEN_SHIFT 2 | ||
196 | #define CDETCTRL1_DCD2SCT_SHIFT 3 | ||
197 | #define CDETCTRL1_DCHKTM_SHIFT 4 | ||
198 | #define CDETCTRL1_DBEXIT_SHIFT 5 | ||
199 | #define CDETCTRL1_DBIDLE_SHIFT 6 | ||
200 | #define CDETCTRL1_CDPDET_SHIFT 7 | ||
201 | #define CDETCTRL1_CHGDETEN_MASK (0x1 << CDETCTRL1_CHGDETEN_SHIFT) | ||
202 | #define CDETCTRL1_CHGTYPMAN_MASK (0x1 << CDETCTRL1_CHGTYPMAN_SHIFT) | ||
203 | #define CDETCTRL1_DCDEN_MASK (0x1 << CDETCTRL1_DCDEN_SHIFT) | ||
204 | #define CDETCTRL1_DCD2SCT_MASK (0x1 << CDETCTRL1_DCD2SCT_SHIFT) | ||
205 | #define CDETCTRL1_DCHKTM_MASK (0x1 << CDETCTRL1_DCHKTM_SHIFT) | ||
206 | #define CDETCTRL1_DBEXIT_MASK (0x1 << CDETCTRL1_DBEXIT_SHIFT) | ||
207 | #define CDETCTRL1_DBIDLE_MASK (0x1 << CDETCTRL1_DBIDLE_SHIFT) | ||
208 | #define CDETCTRL1_CDPDET_MASK (0x1 << CDETCTRL1_CDPDET_SHIFT) | ||
209 | |||
210 | /* MAX14577 CHGCTRL1 register */ | ||
211 | #define CHGCTRL1_TCHW_SHIFT 4 | ||
212 | #define CHGCTRL1_TCHW_MASK (0x7 << CHGCTRL1_TCHW_SHIFT) | ||
213 | |||
214 | /* MAX14577 CHGCTRL2 register */ | ||
215 | #define CHGCTRL2_MBCHOSTEN_SHIFT 6 | ||
216 | #define CHGCTRL2_MBCHOSTEN_MASK (0x1 << CHGCTRL2_MBCHOSTEN_SHIFT) | ||
217 | #define CHGCTRL2_VCHGR_RC_SHIFT 7 | ||
218 | #define CHGCTRL2_VCHGR_RC_MASK (0x1 << CHGCTRL2_VCHGR_RC_SHIFT) | ||
219 | |||
220 | /* MAX14577 CHGCTRL3 register */ | ||
221 | #define CHGCTRL3_MBCCVWRC_SHIFT 0 | ||
222 | #define CHGCTRL3_MBCCVWRC_MASK (0xf << CHGCTRL3_MBCCVWRC_SHIFT) | ||
223 | |||
224 | /* MAX14577 CHGCTRL4 register */ | ||
225 | #define CHGCTRL4_MBCICHWRCH_SHIFT 0 | ||
226 | #define CHGCTRL4_MBCICHWRCH_MASK (0xf << CHGCTRL4_MBCICHWRCH_SHIFT) | ||
227 | #define CHGCTRL4_MBCICHWRCL_SHIFT 4 | ||
228 | #define CHGCTRL4_MBCICHWRCL_MASK (0x1 << CHGCTRL4_MBCICHWRCL_SHIFT) | ||
229 | |||
230 | /* MAX14577 CHGCTRL5 register */ | ||
231 | #define CHGCTRL5_EOCS_SHIFT 0 | ||
232 | #define CHGCTRL5_EOCS_MASK (0xf << CHGCTRL5_EOCS_SHIFT) | ||
233 | |||
234 | /* MAX14577 CHGCTRL6 register */ | ||
235 | #define CHGCTRL6_AUTOSTOP_SHIFT 5 | ||
236 | #define CHGCTRL6_AUTOSTOP_MASK (0x1 << CHGCTRL6_AUTOSTOP_SHIFT) | ||
237 | |||
238 | /* MAX14577 CHGCTRL7 register */ | ||
239 | #define CHGCTRL7_OTPCGHCVS_SHIFT 0 | ||
240 | #define CHGCTRL7_OTPCGHCVS_MASK (0x3 << CHGCTRL7_OTPCGHCVS_SHIFT) | ||
241 | |||
242 | /* MAX14577 regulator current limits (as in CHGCTRL4 register), uA */ | ||
243 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MIN 90000 | ||
244 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_START 200000 | ||
245 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_STEP 50000 | ||
246 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MAX 950000 | ||
247 | |||
248 | /* MAX14577 regulator SFOUT LDO voltage, fixed, uV */ | ||
249 | #define MAX14577_REGULATOR_SAFEOUT_VOLTAGE 4900000 | ||
250 | |||
251 | enum max14577_irq_source { | ||
252 | MAX14577_IRQ_INT1 = 0, | ||
253 | MAX14577_IRQ_INT2, | ||
254 | MAX14577_IRQ_INT3, | ||
255 | |||
256 | MAX14577_IRQ_REGS_NUM, | ||
257 | }; | ||
258 | |||
259 | enum max14577_irq { | ||
260 | /* INT1 */ | ||
261 | MAX14577_IRQ_INT1_ADC, | ||
262 | MAX14577_IRQ_INT1_ADCLOW, | ||
263 | MAX14577_IRQ_INT1_ADCERR, | ||
264 | |||
265 | /* INT2 */ | ||
266 | MAX14577_IRQ_INT2_CHGTYP, | ||
267 | MAX14577_IRQ_INT2_CHGDETRUN, | ||
268 | MAX14577_IRQ_INT2_DCDTMR, | ||
269 | MAX14577_IRQ_INT2_DBCHG, | ||
270 | MAX14577_IRQ_INT2_VBVOLT, | ||
271 | |||
272 | /* INT3 */ | ||
273 | MAX14577_IRQ_INT3_EOC, | ||
274 | MAX14577_IRQ_INT3_CGMBC, | ||
275 | MAX14577_IRQ_INT3_OVP, | ||
276 | MAX14577_IRQ_INT3_MBCCHGERR, | ||
277 | |||
278 | MAX14577_IRQ_NUM, | ||
279 | }; | ||
280 | |||
281 | struct max14577 { | ||
282 | struct device *dev; | ||
283 | struct i2c_client *i2c; /* Slave addr = 0x4A */ | ||
284 | |||
285 | struct regmap *regmap; | ||
286 | |||
287 | struct regmap_irq_chip_data *irq_data; | ||
288 | int irq; | ||
289 | |||
290 | /* Device ID */ | ||
291 | u8 vendor_id; /* Vendor Identification */ | ||
292 | u8 device_id; /* Chip Version */ | ||
293 | }; | ||
294 | |||
295 | /* MAX14577 shared regmap API function */ | ||
296 | static inline int max14577_read_reg(struct regmap *map, u8 reg, u8 *dest) | ||
297 | { | ||
298 | unsigned int val; | ||
299 | int ret; | ||
300 | |||
301 | ret = regmap_read(map, reg, &val); | ||
302 | *dest = val; | ||
303 | |||
304 | return ret; | ||
305 | } | ||
306 | |||
307 | static inline int max14577_bulk_read(struct regmap *map, u8 reg, u8 *buf, | ||
308 | int count) | ||
309 | { | ||
310 | return regmap_bulk_read(map, reg, buf, count); | ||
311 | } | ||
312 | |||
313 | static inline int max14577_write_reg(struct regmap *map, u8 reg, u8 value) | ||
314 | { | ||
315 | return regmap_write(map, reg, value); | ||
316 | } | ||
317 | |||
318 | static inline int max14577_bulk_write(struct regmap *map, u8 reg, u8 *buf, | ||
319 | int count) | ||
320 | { | ||
321 | return regmap_bulk_write(map, reg, buf, count); | ||
322 | } | ||
323 | |||
324 | static inline int max14577_update_reg(struct regmap *map, u8 reg, u8 mask, | ||
325 | u8 val) | ||
326 | { | ||
327 | return regmap_update_bits(map, reg, mask, val); | ||
328 | } | ||
329 | |||
330 | #endif /* __MAX14577_PRIVATE_H__ */ | ||
diff --git a/include/linux/mfd/max14577.h b/include/linux/mfd/max14577.h new file mode 100644 index 000000000000..247b021dfaaf --- /dev/null +++ b/include/linux/mfd/max14577.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * max14577.h - Driver for the Maxim 14577 | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electrnoics | ||
5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * This driver is based on max8997.h | ||
19 | * | ||
20 | * MAX14577 has MUIC, Charger devices. | ||
21 | * The devices share the same I2C bus and interrupt line | ||
22 | * included in this mfd driver. | ||
23 | */ | ||
24 | |||
25 | #ifndef __MAX14577_H__ | ||
26 | #define __MAX14577_H__ | ||
27 | |||
28 | #include <linux/mfd/max14577-private.h> | ||
29 | #include <linux/regulator/consumer.h> | ||
30 | |||
31 | /* | ||
32 | * MAX14577 Regulator | ||
33 | */ | ||
34 | |||
35 | /* MAX14577 regulator IDs */ | ||
36 | enum max14577_regulators { | ||
37 | MAX14577_SAFEOUT = 0, | ||
38 | MAX14577_CHARGER, | ||
39 | |||
40 | MAX14577_REG_MAX, | ||
41 | }; | ||
42 | |||
43 | struct max14577_regulator_platform_data { | ||
44 | int id; | ||
45 | struct regulator_init_data *initdata; | ||
46 | struct device_node *of_node; | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * MAX14577 MFD platform data | ||
51 | */ | ||
52 | struct max14577_platform_data { | ||
53 | /* IRQ */ | ||
54 | int irq_base; | ||
55 | |||
56 | /* current control GPIOs */ | ||
57 | int gpio_pogo_vbatt_en; | ||
58 | int gpio_pogo_vbus_en; | ||
59 | |||
60 | /* current control GPIO control function */ | ||
61 | int (*set_gpio_pogo_vbatt_en) (int gpio_val); | ||
62 | int (*set_gpio_pogo_vbus_en) (int gpio_val); | ||
63 | |||
64 | int (*set_gpio_pogo_cb) (int new_dev); | ||
65 | |||
66 | struct max14577_regulator_platform_data *regulators; | ||
67 | }; | ||
68 | |||
69 | #endif /* __MAX14577_H__ */ | ||
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 244fb0d51589..3e050b933dd0 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
@@ -323,7 +323,6 @@ struct max77693_dev { | |||
323 | 323 | ||
324 | int irq; | 324 | int irq; |
325 | int irq_gpio; | 325 | int irq_gpio; |
326 | bool wakeup; | ||
327 | struct mutex irqlock; | 326 | struct mutex irqlock; |
328 | int irq_masks_cur[MAX77693_IRQ_GROUP_NR]; | 327 | int irq_masks_cur[MAX77693_IRQ_GROUP_NR]; |
329 | int irq_masks_cache[MAX77693_IRQ_GROUP_NR]; | 328 | int irq_masks_cache[MAX77693_IRQ_GROUP_NR]; |
diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h index 676f0f388992..3f3dc45f93ee 100644 --- a/include/linux/mfd/max77693.h +++ b/include/linux/mfd/max77693.h | |||
@@ -64,8 +64,6 @@ struct max77693_muic_platform_data { | |||
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct max77693_platform_data { | 66 | struct max77693_platform_data { |
67 | int wakeup; | ||
68 | |||
69 | /* regulator data */ | 67 | /* regulator data */ |
70 | struct max77693_regulator_data *regulators; | 68 | struct max77693_regulator_data *regulators; |
71 | int num_regulators; | 69 | int num_regulators; |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index 41ed59276c00..67c17b5a6f44 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -41,6 +41,13 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, | |||
41 | unsigned int mode, unsigned int channel, | 41 | unsigned int mode, unsigned int channel, |
42 | u8 ato, bool atox, unsigned int *sample); | 42 | u8 ato, bool atox, unsigned int *sample); |
43 | 43 | ||
44 | #define MC13783_AUDIO_RX0 36 | ||
45 | #define MC13783_AUDIO_RX1 37 | ||
46 | #define MC13783_AUDIO_TX 38 | ||
47 | #define MC13783_SSI_NETWORK 39 | ||
48 | #define MC13783_AUDIO_CODEC 40 | ||
49 | #define MC13783_AUDIO_DAC 41 | ||
50 | |||
44 | #define MC13XXX_IRQ_ADCDONE 0 | 51 | #define MC13XXX_IRQ_ADCDONE 0 |
45 | #define MC13XXX_IRQ_ADCBISDONE 1 | 52 | #define MC13XXX_IRQ_ADCBISDONE 1 |
46 | #define MC13XXX_IRQ_TS 2 | 53 | #define MC13XXX_IRQ_TS 2 |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index d1382dfbeff0..0ce772105508 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
@@ -756,6 +756,59 @@ | |||
756 | #define PCR_SETTING_REG2 0x814 | 756 | #define PCR_SETTING_REG2 0x814 |
757 | #define PCR_SETTING_REG3 0x747 | 757 | #define PCR_SETTING_REG3 0x747 |
758 | 758 | ||
759 | /* Phy bits */ | ||
760 | #define PHY_PCR_FORCE_CODE 0xB000 | ||
761 | #define PHY_PCR_OOBS_CALI_50 0x0800 | ||
762 | #define PHY_PCR_OOBS_VCM_08 0x0200 | ||
763 | #define PHY_PCR_OOBS_SEN_90 0x0040 | ||
764 | #define PHY_PCR_RSSI_EN 0x0002 | ||
765 | |||
766 | #define PHY_RCR1_ADP_TIME 0x0100 | ||
767 | #define PHY_RCR1_VCO_COARSE 0x001F | ||
768 | |||
769 | #define PHY_RCR2_EMPHASE_EN 0x8000 | ||
770 | #define PHY_RCR2_NADJR 0x4000 | ||
771 | #define PHY_RCR2_CDR_CP_10 0x0400 | ||
772 | #define PHY_RCR2_CDR_SR_2 0x0100 | ||
773 | #define PHY_RCR2_FREQSEL_12 0x0040 | ||
774 | #define PHY_RCR2_CPADJEN 0x0020 | ||
775 | #define PHY_RCR2_CDR_SC_8 0x0008 | ||
776 | #define PHY_RCR2_CALIB_LATE 0x0002 | ||
777 | |||
778 | #define PHY_RDR_RXDSEL_1_9 0x4000 | ||
779 | |||
780 | #define PHY_TUNE_TUNEREF_1_0 0x4000 | ||
781 | #define PHY_TUNE_VBGSEL_1252 0x0C00 | ||
782 | #define PHY_TUNE_SDBUS_33 0x0200 | ||
783 | #define PHY_TUNE_TUNED18 0x01C0 | ||
784 | #define PHY_TUNE_TUNED12 0X0020 | ||
785 | |||
786 | #define PHY_BPCR_IBRXSEL 0x0400 | ||
787 | #define PHY_BPCR_IBTXSEL 0x0100 | ||
788 | #define PHY_BPCR_IB_FILTER 0x0080 | ||
789 | #define PHY_BPCR_CMIRROR_EN 0x0040 | ||
790 | |||
791 | #define PHY_REG_REV_RESV 0xE000 | ||
792 | #define PHY_REG_REV_RXIDLE_LATCHED 0x1000 | ||
793 | #define PHY_REG_REV_P1_EN 0x0800 | ||
794 | #define PHY_REG_REV_RXIDLE_EN 0x0400 | ||
795 | #define PHY_REG_REV_CLKREQ_DLY_TIMER_1_0 0x0040 | ||
796 | #define PHY_REG_REV_STOP_CLKRD 0x0020 | ||
797 | #define PHY_REG_REV_RX_PWST 0x0008 | ||
798 | #define PHY_REG_REV_STOP_CLKWR 0x0004 | ||
799 | |||
800 | #define PHY_FLD3_TIMER_4 0x7800 | ||
801 | #define PHY_FLD3_TIMER_6 0x00E0 | ||
802 | #define PHY_FLD3_RXDELINK 0x0004 | ||
803 | |||
804 | #define PHY_FLD4_FLDEN_SEL 0x4000 | ||
805 | #define PHY_FLD4_REQ_REF 0x2000 | ||
806 | #define PHY_FLD4_RXAMP_OFF 0x1000 | ||
807 | #define PHY_FLD4_REQ_ADDA 0x0800 | ||
808 | #define PHY_FLD4_BER_COUNT 0x00E0 | ||
809 | #define PHY_FLD4_BER_TIMER 0x000A | ||
810 | #define PHY_FLD4_BER_CHK_EN 0x0001 | ||
811 | |||
759 | #define rtsx_pci_init_cmd(pcr) ((pcr)->ci = 0) | 812 | #define rtsx_pci_init_cmd(pcr) ((pcr)->ci = 0) |
760 | 813 | ||
761 | struct rtsx_pcr; | 814 | struct rtsx_pcr; |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 378ae8a04c6a..cab2dd279076 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
@@ -39,7 +39,8 @@ enum sec_device_type { | |||
39 | struct sec_pmic_dev { | 39 | struct sec_pmic_dev { |
40 | struct device *dev; | 40 | struct device *dev; |
41 | struct sec_platform_data *pdata; | 41 | struct sec_platform_data *pdata; |
42 | struct regmap *regmap; | 42 | struct regmap *regmap_pmic; |
43 | struct regmap *regmap_rtc; | ||
43 | struct i2c_client *i2c; | 44 | struct i2c_client *i2c; |
44 | struct i2c_client *rtc; | 45 | struct i2c_client *rtc; |
45 | 46 | ||
@@ -51,6 +52,7 @@ struct sec_pmic_dev { | |||
51 | int ono; | 52 | int ono; |
52 | int type; | 53 | int type; |
53 | bool wakeup; | 54 | bool wakeup; |
55 | bool wtsr_smpl; | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | int sec_irq_init(struct sec_pmic_dev *sec_pmic); | 58 | int sec_irq_init(struct sec_pmic_dev *sec_pmic); |
diff --git a/include/linux/mfd/samsung/rtc.h b/include/linux/mfd/samsung/rtc.h index 71597e20cddb..94b7cd6d8891 100644 --- a/include/linux/mfd/samsung/rtc.h +++ b/include/linux/mfd/samsung/rtc.h | |||
@@ -62,6 +62,11 @@ enum sec_rtc_reg { | |||
62 | /* RTC Update Register1 */ | 62 | /* RTC Update Register1 */ |
63 | #define RTC_UDR_SHIFT 0 | 63 | #define RTC_UDR_SHIFT 0 |
64 | #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT) | 64 | #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT) |
65 | #define RTC_TCON_SHIFT 1 | ||
66 | #define RTC_TCON_MASK (1 << RTC_TCON_SHIFT) | ||
67 | #define RTC_TIME_EN_SHIFT 3 | ||
68 | #define RTC_TIME_EN_MASK (1 << RTC_TIME_EN_SHIFT) | ||
69 | |||
65 | /* RTC Hour register */ | 70 | /* RTC Hour register */ |
66 | #define HOUR_PM_SHIFT 6 | 71 | #define HOUR_PM_SHIFT 6 |
67 | #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT) | 72 | #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT) |
@@ -69,6 +74,12 @@ enum sec_rtc_reg { | |||
69 | #define ALARM_ENABLE_SHIFT 7 | 74 | #define ALARM_ENABLE_SHIFT 7 |
70 | #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT) | 75 | #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT) |
71 | 76 | ||
77 | #define SMPL_ENABLE_SHIFT 7 | ||
78 | #define SMPL_ENABLE_MASK (1 << SMPL_ENABLE_SHIFT) | ||
79 | |||
80 | #define WTSR_ENABLE_SHIFT 6 | ||
81 | #define WTSR_ENABLE_MASK (1 << WTSR_ENABLE_SHIFT) | ||
82 | |||
72 | enum { | 83 | enum { |
73 | RTC_SEC = 0, | 84 | RTC_SEC = 0, |
74 | RTC_MIN, | 85 | RTC_MIN, |
diff --git a/include/linux/mfd/si476x-core.h b/include/linux/mfd/si476x-core.h index ba89b94e4a56..674b45d5a757 100644 --- a/include/linux/mfd/si476x-core.h +++ b/include/linux/mfd/si476x-core.h | |||
@@ -316,7 +316,7 @@ enum si476x_smoothmetrics { | |||
316 | * response to 'FM_RD_STATUS' command | 316 | * response to 'FM_RD_STATUS' command |
317 | * @rdstpptyint: Traffic program flag(TP) and/or program type(PTY) | 317 | * @rdstpptyint: Traffic program flag(TP) and/or program type(PTY) |
318 | * code has changed. | 318 | * code has changed. |
319 | * @rdspiint: Program indentifiaction(PI) code has changed. | 319 | * @rdspiint: Program identification(PI) code has changed. |
320 | * @rdssyncint: RDS synchronization has changed. | 320 | * @rdssyncint: RDS synchronization has changed. |
321 | * @rdsfifoint: RDS was received and the RDS FIFO has at least | 321 | * @rdsfifoint: RDS was received and the RDS FIFO has at least |
322 | * 'FM_RDS_INTERRUPT_FIFO_COUNT' elements in it. | 322 | * 'FM_RDS_INTERRUPT_FIFO_COUNT' elements in it. |
diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h new file mode 100644 index 000000000000..eda121556e5d --- /dev/null +++ b/include/linux/mfd/stw481x.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 ST-Ericsson SA | ||
3 | * Written on behalf of Linaro for ST-Ericsson | ||
4 | * | ||
5 | * Author: Linus Walleij <linus.walleij@linaro.org> | ||
6 | * | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | */ | ||
9 | #ifndef MFD_STW481X_H | ||
10 | #define MFD_STW481X_H | ||
11 | |||
12 | #include <linux/i2c.h> | ||
13 | #include <linux/regulator/machine.h> | ||
14 | #include <linux/regmap.h> | ||
15 | #include <linux/bitops.h> | ||
16 | |||
17 | /* These registers are accessed from more than one driver */ | ||
18 | #define STW_CONF1 0x11U | ||
19 | #define STW_CONF1_PDN_VMMC 0x01U | ||
20 | #define STW_CONF1_VMMC_MASK 0x0eU | ||
21 | #define STW_CONF1_VMMC_1_8V 0x02U | ||
22 | #define STW_CONF1_VMMC_2_85V 0x04U | ||
23 | #define STW_CONF1_VMMC_3V 0x06U | ||
24 | #define STW_CONF1_VMMC_1_85V 0x08U | ||
25 | #define STW_CONF1_VMMC_2_6V 0x0aU | ||
26 | #define STW_CONF1_VMMC_2_7V 0x0cU | ||
27 | #define STW_CONF1_VMMC_3_3V 0x0eU | ||
28 | #define STW_CONF1_MMC_LS_STATUS 0x10U | ||
29 | #define STW_PCTL_REG_LO 0x1eU | ||
30 | #define STW_PCTL_REG_HI 0x1fU | ||
31 | #define STW_CONF1_V_MONITORING 0x20U | ||
32 | #define STW_CONF1_IT_WARN 0x40U | ||
33 | #define STW_CONF1_PDN_VAUX 0x80U | ||
34 | #define STW_CONF2 0x20U | ||
35 | #define STW_CONF2_MASK_TWARN 0x01U | ||
36 | #define STW_CONF2_VMMC_EXT 0x02U | ||
37 | #define STW_CONF2_MASK_IT_WAKE_UP 0x04U | ||
38 | #define STW_CONF2_GPO1 0x08U | ||
39 | #define STW_CONF2_GPO2 0x10U | ||
40 | #define STW_VCORE_SLEEP 0x21U | ||
41 | |||
42 | /** | ||
43 | * struct stw481x - state holder for the Stw481x drivers | ||
44 | * @mutex: mutex to serialize I2C accesses | ||
45 | * @i2c_client: corresponding I2C client | ||
46 | * @regulator: regulator device for regulator children | ||
47 | * @map: regmap handle to access device registers | ||
48 | */ | ||
49 | struct stw481x { | ||
50 | struct mutex lock; | ||
51 | struct i2c_client *client; | ||
52 | struct regulator_dev *vmmc_regulator; | ||
53 | struct regmap *map; | ||
54 | }; | ||
55 | |||
56 | #endif | ||
diff --git a/include/linux/mfd/syscon.h b/include/linux/mfd/syscon.h index b473577f36db..8789fa3c7fd9 100644 --- a/include/linux/mfd/syscon.h +++ b/include/linux/mfd/syscon.h | |||
@@ -17,10 +17,35 @@ | |||
17 | 17 | ||
18 | struct device_node; | 18 | struct device_node; |
19 | 19 | ||
20 | #ifdef CONFIG_MFD_SYSCON | ||
20 | extern struct regmap *syscon_node_to_regmap(struct device_node *np); | 21 | extern struct regmap *syscon_node_to_regmap(struct device_node *np); |
21 | extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); | 22 | extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); |
22 | extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); | 23 | extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); |
23 | extern struct regmap *syscon_regmap_lookup_by_phandle( | 24 | extern struct regmap *syscon_regmap_lookup_by_phandle( |
24 | struct device_node *np, | 25 | struct device_node *np, |
25 | const char *property); | 26 | const char *property); |
27 | #else | ||
28 | static inline struct regmap *syscon_node_to_regmap(struct device_node *np) | ||
29 | { | ||
30 | return ERR_PTR(-ENOSYS); | ||
31 | } | ||
32 | |||
33 | static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) | ||
34 | { | ||
35 | return ERR_PTR(-ENOSYS); | ||
36 | } | ||
37 | |||
38 | static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) | ||
39 | { | ||
40 | return ERR_PTR(-ENOSYS); | ||
41 | } | ||
42 | |||
43 | static inline struct regmap *syscon_regmap_lookup_by_phandle( | ||
44 | struct device_node *np, | ||
45 | const char *property) | ||
46 | { | ||
47 | return ERR_PTR(-ENOSYS); | ||
48 | } | ||
49 | #endif | ||
50 | |||
26 | #endif /* __LINUX_MFD_SYSCON_H__ */ | 51 | #endif /* __LINUX_MFD_SYSCON_H__ */ |
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index b6bdcd66c07d..b6d36b38b99c 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | |||
@@ -241,6 +241,12 @@ | |||
241 | 241 | ||
242 | #define IMX6Q_GPR5_L2_CLK_STOP BIT(8) | 242 | #define IMX6Q_GPR5_L2_CLK_STOP BIT(8) |
243 | 243 | ||
244 | #define IMX6Q_GPR8_TX_SWING_LOW (0x7f << 25) | ||
245 | #define IMX6Q_GPR8_TX_SWING_FULL (0x7f << 18) | ||
246 | #define IMX6Q_GPR8_TX_DEEMPH_GEN2_6DB (0x3f << 12) | ||
247 | #define IMX6Q_GPR8_TX_DEEMPH_GEN2_3P5DB (0x3f << 6) | ||
248 | #define IMX6Q_GPR8_TX_DEEMPH_GEN1 (0x3f << 0) | ||
249 | |||
244 | #define IMX6Q_GPR9_TZASC2_BYP BIT(1) | 250 | #define IMX6Q_GPR9_TZASC2_BYP BIT(1) |
245 | #define IMX6Q_GPR9_TZASC1_BYP BIT(0) | 251 | #define IMX6Q_GPR9_TZASC1_BYP BIT(0) |
246 | 252 | ||
@@ -273,7 +279,9 @@ | |||
273 | #define IMX6Q_GPR12_ARMP_AHB_CLK_EN BIT(26) | 279 | #define IMX6Q_GPR12_ARMP_AHB_CLK_EN BIT(26) |
274 | #define IMX6Q_GPR12_ARMP_ATB_CLK_EN BIT(25) | 280 | #define IMX6Q_GPR12_ARMP_ATB_CLK_EN BIT(25) |
275 | #define IMX6Q_GPR12_ARMP_APB_CLK_EN BIT(24) | 281 | #define IMX6Q_GPR12_ARMP_APB_CLK_EN BIT(24) |
282 | #define IMX6Q_GPR12_DEVICE_TYPE (0xf << 12) | ||
276 | #define IMX6Q_GPR12_PCIE_CTL_2 BIT(10) | 283 | #define IMX6Q_GPR12_PCIE_CTL_2 BIT(10) |
284 | #define IMX6Q_GPR12_LOS_LEVEL (0x1f << 4) | ||
277 | 285 | ||
278 | #define IMX6Q_GPR13_SDMA_STOP_REQ BIT(30) | 286 | #define IMX6Q_GPR13_SDMA_STOP_REQ BIT(30) |
279 | #define IMX6Q_GPR13_CAN2_STOP_REQ BIT(29) | 287 | #define IMX6Q_GPR13_CAN2_STOP_REQ BIT(29) |
@@ -363,4 +371,9 @@ | |||
363 | #define IMX6Q_GPR13_SATA_TX_LVL_1_240_V (0x1f << 2) | 371 | #define IMX6Q_GPR13_SATA_TX_LVL_1_240_V (0x1f << 2) |
364 | #define IMX6Q_GPR13_SATA_MPLL_CLK_EN BIT(1) | 372 | #define IMX6Q_GPR13_SATA_MPLL_CLK_EN BIT(1) |
365 | #define IMX6Q_GPR13_SATA_TX_EDGE_RATE BIT(0) | 373 | #define IMX6Q_GPR13_SATA_TX_EDGE_RATE BIT(0) |
374 | |||
375 | /* For imx6sl iomux gpr register field define */ | ||
376 | #define IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK (0x3 << 17) | ||
377 | #define IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK (0x1 << 14) | ||
378 | |||
366 | #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ | 379 | #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index 25f2c611ab01..d498d98f0c2c 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
@@ -46,16 +46,24 @@ | |||
46 | /* Step Enable */ | 46 | /* Step Enable */ |
47 | #define STEPENB_MASK (0x1FFFF << 0) | 47 | #define STEPENB_MASK (0x1FFFF << 0) |
48 | #define STEPENB(val) ((val) << 0) | 48 | #define STEPENB(val) ((val) << 0) |
49 | #define ENB(val) (1 << (val)) | ||
50 | #define STPENB_STEPENB STEPENB(0x1FFFF) | ||
51 | #define STPENB_STEPENB_TC STEPENB(0x1FFF) | ||
49 | 52 | ||
50 | /* IRQ enable */ | 53 | /* IRQ enable */ |
51 | #define IRQENB_HW_PEN BIT(0) | 54 | #define IRQENB_HW_PEN BIT(0) |
52 | #define IRQENB_FIFO0THRES BIT(2) | 55 | #define IRQENB_FIFO0THRES BIT(2) |
56 | #define IRQENB_FIFO0OVRRUN BIT(3) | ||
57 | #define IRQENB_FIFO0UNDRFLW BIT(4) | ||
53 | #define IRQENB_FIFO1THRES BIT(5) | 58 | #define IRQENB_FIFO1THRES BIT(5) |
59 | #define IRQENB_FIFO1OVRRUN BIT(6) | ||
60 | #define IRQENB_FIFO1UNDRFLW BIT(7) | ||
54 | #define IRQENB_PENUP BIT(9) | 61 | #define IRQENB_PENUP BIT(9) |
55 | 62 | ||
56 | /* Step Configuration */ | 63 | /* Step Configuration */ |
57 | #define STEPCONFIG_MODE_MASK (3 << 0) | 64 | #define STEPCONFIG_MODE_MASK (3 << 0) |
58 | #define STEPCONFIG_MODE(val) ((val) << 0) | 65 | #define STEPCONFIG_MODE(val) ((val) << 0) |
66 | #define STEPCONFIG_MODE_SWCNT STEPCONFIG_MODE(1) | ||
59 | #define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2) | 67 | #define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2) |
60 | #define STEPCONFIG_AVG_MASK (7 << 2) | 68 | #define STEPCONFIG_AVG_MASK (7 << 2) |
61 | #define STEPCONFIG_AVG(val) ((val) << 2) | 69 | #define STEPCONFIG_AVG(val) ((val) << 2) |
@@ -123,15 +131,21 @@ | |||
123 | #define ADC_CLK 3000000 | 131 | #define ADC_CLK 3000000 |
124 | #define TOTAL_STEPS 16 | 132 | #define TOTAL_STEPS 16 |
125 | #define TOTAL_CHANNELS 8 | 133 | #define TOTAL_CHANNELS 8 |
134 | #define FIFO1_THRESHOLD 19 | ||
126 | 135 | ||
127 | /* | 136 | /* |
128 | * ADC runs at 3MHz, and it takes | 137 | * time in us for processing a single channel, calculated as follows: |
129 | * 15 cycles to latch one data output. | 138 | * |
130 | * Hence the idle time for ADC to | 139 | * num cycles = open delay + (sample delay + conv time) * averaging |
131 | * process one sample data would be | 140 | * |
132 | * around 5 micro seconds. | 141 | * num cycles: 152 + (1 + 13) * 16 = 376 |
133 | */ | 142 | * |
134 | #define IDLE_TIMEOUT 5 /* microsec */ | 143 | * clock frequency: 26MHz / 8 = 3.25MHz |
144 | * clock period: 1 / 3.25MHz = 308ns | ||
145 | * | ||
146 | * processing time: 376 * 308ns = 116us | ||
147 | */ | ||
148 | #define IDLE_TIMEOUT 116 /* microsec */ | ||
135 | 149 | ||
136 | #define TSCADC_CELLS 2 | 150 | #define TSCADC_CELLS 2 |
137 | 151 | ||
@@ -146,6 +160,7 @@ struct ti_tscadc_dev { | |||
146 | struct mfd_cell cells[TSCADC_CELLS]; | 160 | struct mfd_cell cells[TSCADC_CELLS]; |
147 | u32 reg_se_cache; | 161 | u32 reg_se_cache; |
148 | spinlock_t reg_lock; | 162 | spinlock_t reg_lock; |
163 | unsigned int clk_div; | ||
149 | 164 | ||
150 | /* tsc device */ | 165 | /* tsc device */ |
151 | struct titsc *tsc; | 166 | struct titsc *tsc; |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index 40854ac0ba3d..eefafa62d304 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
@@ -56,8 +56,6 @@ struct irq_domain; | |||
56 | #define WM8994_IRQ_GPIO(x) (x + WM8994_IRQ_TEMP_WARN) | 56 | #define WM8994_IRQ_GPIO(x) (x + WM8994_IRQ_TEMP_WARN) |
57 | 57 | ||
58 | struct wm8994 { | 58 | struct wm8994 { |
59 | struct mutex irq_lock; | ||
60 | |||
61 | struct wm8994_pdata pdata; | 59 | struct wm8994_pdata pdata; |
62 | 60 | ||
63 | enum wm8994_type type; | 61 | enum wm8994_type type; |
@@ -85,16 +83,43 @@ struct wm8994 { | |||
85 | }; | 83 | }; |
86 | 84 | ||
87 | /* Device I/O API */ | 85 | /* Device I/O API */ |
88 | int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg); | ||
89 | int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg, | ||
90 | unsigned short val); | ||
91 | int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg, | ||
92 | unsigned short mask, unsigned short val); | ||
93 | int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, | ||
94 | int count, u16 *buf); | ||
95 | int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg, | ||
96 | int count, const u16 *buf); | ||
97 | 86 | ||
87 | static inline int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg) | ||
88 | { | ||
89 | unsigned int val; | ||
90 | int ret; | ||
91 | |||
92 | ret = regmap_read(wm8994->regmap, reg, &val); | ||
93 | |||
94 | if (ret < 0) | ||
95 | return ret; | ||
96 | else | ||
97 | return val; | ||
98 | } | ||
99 | |||
100 | static inline int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg, | ||
101 | unsigned short val) | ||
102 | { | ||
103 | return regmap_write(wm8994->regmap, reg, val); | ||
104 | } | ||
105 | |||
106 | static inline int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, | ||
107 | int count, u16 *buf) | ||
108 | { | ||
109 | return regmap_bulk_read(wm8994->regmap, reg, buf, count); | ||
110 | } | ||
111 | |||
112 | static inline int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg, | ||
113 | int count, const u16 *buf) | ||
114 | { | ||
115 | return regmap_raw_write(wm8994->regmap, reg, buf, count * sizeof(u16)); | ||
116 | } | ||
117 | |||
118 | static inline int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg, | ||
119 | unsigned short mask, unsigned short val) | ||
120 | { | ||
121 | return regmap_update_bits(wm8994->regmap, reg, mask, val); | ||
122 | } | ||
98 | 123 | ||
99 | /* Helper to save on boilerplate */ | 124 | /* Helper to save on boilerplate */ |
100 | static inline int wm8994_request_irq(struct wm8994 *wm8994, int irq, | 125 | static inline int wm8994_request_irq(struct wm8994 *wm8994, int irq, |