blob: 3547eee21aa4a801d1b8309bf90ce1857a83ad6c [file] [log] [blame]
Rabin Vincent62579262010-05-19 11:39:02 +02001/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 * Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
6 * Author: Rabin Vincent <rabin.vincent@stericsson.com>
Mattias Wallinadceed62011-03-02 11:51:11 +01007 * Author: Mattias Wallin <mattias.wallin@stericsson.com>
Rabin Vincent62579262010-05-19 11:39:02 +02008 */
9
10#include <linux/kernel.h>
11#include <linux/slab.h>
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/delay.h>
15#include <linux/interrupt.h>
16#include <linux/module.h>
17#include <linux/platform_device.h>
18#include <linux/mfd/core.h>
Mattias Wallin47c16972010-09-10 17:47:56 +020019#include <linux/mfd/abx500.h>
Linus Walleijee66e652011-12-02 14:16:33 +010020#include <linux/mfd/abx500/ab8500.h>
Sundar R Iyer549931f2010-07-13 11:51:28 +053021#include <linux/regulator/ab8500.h>
Rabin Vincent62579262010-05-19 11:39:02 +020022
23/*
24 * Interrupt register offsets
25 * Bank : 0x0E
26 */
Mattias Wallin47c16972010-09-10 17:47:56 +020027#define AB8500_IT_SOURCE1_REG 0x00
28#define AB8500_IT_SOURCE2_REG 0x01
29#define AB8500_IT_SOURCE3_REG 0x02
30#define AB8500_IT_SOURCE4_REG 0x03
31#define AB8500_IT_SOURCE5_REG 0x04
32#define AB8500_IT_SOURCE6_REG 0x05
33#define AB8500_IT_SOURCE7_REG 0x06
34#define AB8500_IT_SOURCE8_REG 0x07
35#define AB8500_IT_SOURCE19_REG 0x12
36#define AB8500_IT_SOURCE20_REG 0x13
37#define AB8500_IT_SOURCE21_REG 0x14
38#define AB8500_IT_SOURCE22_REG 0x15
39#define AB8500_IT_SOURCE23_REG 0x16
40#define AB8500_IT_SOURCE24_REG 0x17
Rabin Vincent62579262010-05-19 11:39:02 +020041
42/*
43 * latch registers
44 */
Mattias Wallin47c16972010-09-10 17:47:56 +020045#define AB8500_IT_LATCH1_REG 0x20
46#define AB8500_IT_LATCH2_REG 0x21
47#define AB8500_IT_LATCH3_REG 0x22
48#define AB8500_IT_LATCH4_REG 0x23
49#define AB8500_IT_LATCH5_REG 0x24
50#define AB8500_IT_LATCH6_REG 0x25
51#define AB8500_IT_LATCH7_REG 0x26
52#define AB8500_IT_LATCH8_REG 0x27
53#define AB8500_IT_LATCH9_REG 0x28
54#define AB8500_IT_LATCH10_REG 0x29
Mattias Wallin92d50a42010-12-07 11:20:47 +010055#define AB8500_IT_LATCH12_REG 0x2B
Mattias Wallin47c16972010-09-10 17:47:56 +020056#define AB8500_IT_LATCH19_REG 0x32
57#define AB8500_IT_LATCH20_REG 0x33
58#define AB8500_IT_LATCH21_REG 0x34
59#define AB8500_IT_LATCH22_REG 0x35
60#define AB8500_IT_LATCH23_REG 0x36
61#define AB8500_IT_LATCH24_REG 0x37
Rabin Vincent62579262010-05-19 11:39:02 +020062
63/*
64 * mask registers
65 */
66
Mattias Wallin47c16972010-09-10 17:47:56 +020067#define AB8500_IT_MASK1_REG 0x40
68#define AB8500_IT_MASK2_REG 0x41
69#define AB8500_IT_MASK3_REG 0x42
70#define AB8500_IT_MASK4_REG 0x43
71#define AB8500_IT_MASK5_REG 0x44
72#define AB8500_IT_MASK6_REG 0x45
73#define AB8500_IT_MASK7_REG 0x46
74#define AB8500_IT_MASK8_REG 0x47
75#define AB8500_IT_MASK9_REG 0x48
76#define AB8500_IT_MASK10_REG 0x49
77#define AB8500_IT_MASK11_REG 0x4A
78#define AB8500_IT_MASK12_REG 0x4B
79#define AB8500_IT_MASK13_REG 0x4C
80#define AB8500_IT_MASK14_REG 0x4D
81#define AB8500_IT_MASK15_REG 0x4E
82#define AB8500_IT_MASK16_REG 0x4F
83#define AB8500_IT_MASK17_REG 0x50
84#define AB8500_IT_MASK18_REG 0x51
85#define AB8500_IT_MASK19_REG 0x52
86#define AB8500_IT_MASK20_REG 0x53
87#define AB8500_IT_MASK21_REG 0x54
88#define AB8500_IT_MASK22_REG 0x55
89#define AB8500_IT_MASK23_REG 0x56
90#define AB8500_IT_MASK24_REG 0x57
Rabin Vincent62579262010-05-19 11:39:02 +020091
Mattias Wallin47c16972010-09-10 17:47:56 +020092#define AB8500_REV_REG 0x80
Linus Walleij0f6208372012-02-20 21:42:10 +010093#define AB8500_IC_NAME_REG 0x82
Mattias Walline5c238c2011-03-02 11:52:36 +010094#define AB8500_SWITCH_OFF_STATUS 0x00
Rabin Vincent62579262010-05-19 11:39:02 +020095
Andrew Lynnb4a31032011-10-11 10:49:47 +020096#define AB8500_TURN_ON_STATUS 0x00
97
Rabin Vincent62579262010-05-19 11:39:02 +020098/*
99 * Map interrupt numbers to the LATCH and MASK register offsets, Interrupt
100 * numbers are indexed into this array with (num / 8).
101 *
102 * This is one off from the register names, i.e. AB8500_IT_MASK1_REG is at
103 * offset 0.
104 */
105static const int ab8500_irq_regoffset[AB8500_NUM_IRQ_REGS] = {
Mattias Wallin92d50a42010-12-07 11:20:47 +0100106 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 18, 19, 20, 21,
Rabin Vincent62579262010-05-19 11:39:02 +0200107};
108
Linus Walleij0f6208372012-02-20 21:42:10 +0100109static const char ab8500_version_str[][7] = {
110 [AB8500_VERSION_AB8500] = "AB8500",
111 [AB8500_VERSION_AB8505] = "AB8505",
112 [AB8500_VERSION_AB9540] = "AB9540",
113 [AB8500_VERSION_AB8540] = "AB8540",
114};
115
Mattias Wallin47c16972010-09-10 17:47:56 +0200116static int ab8500_get_chip_id(struct device *dev)
117{
Mattias Wallin6bce7bf2010-12-02 15:08:32 +0100118 struct ab8500 *ab8500;
119
120 if (!dev)
121 return -EINVAL;
122 ab8500 = dev_get_drvdata(dev->parent);
123 return ab8500 ? (int)ab8500->chip_id : -EINVAL;
Mattias Wallin47c16972010-09-10 17:47:56 +0200124}
125
126static int set_register_interruptible(struct ab8500 *ab8500, u8 bank,
127 u8 reg, u8 data)
Rabin Vincent62579262010-05-19 11:39:02 +0200128{
129 int ret;
Mattias Wallin47c16972010-09-10 17:47:56 +0200130 /*
131 * Put the u8 bank and u8 register together into a an u16.
132 * The bank on higher 8 bits and register in lower 8 bits.
133 * */
134 u16 addr = ((u16)bank) << 8 | reg;
Rabin Vincent62579262010-05-19 11:39:02 +0200135
136 dev_vdbg(ab8500->dev, "wr: addr %#x <= %#x\n", addr, data);
137
Mattias Wallin47c16972010-09-10 17:47:56 +0200138 ret = mutex_lock_interruptible(&ab8500->lock);
139 if (ret)
140 return ret;
141
142 ret = ab8500->write(ab8500, addr, data);
143 if (ret < 0)
144 dev_err(ab8500->dev, "failed to write reg %#x: %d\n",
145 addr, ret);
146 mutex_unlock(&ab8500->lock);
147
148 return ret;
149}
150
151static int ab8500_set_register(struct device *dev, u8 bank,
152 u8 reg, u8 value)
153{
154 struct ab8500 *ab8500 = dev_get_drvdata(dev->parent);
155
156 return set_register_interruptible(ab8500, bank, reg, value);
157}
158
159static int get_register_interruptible(struct ab8500 *ab8500, u8 bank,
160 u8 reg, u8 *value)
161{
162 int ret;
163 /* put the u8 bank and u8 reg together into a an u16.
164 * bank on higher 8 bits and reg in lower */
165 u16 addr = ((u16)bank) << 8 | reg;
166
167 ret = mutex_lock_interruptible(&ab8500->lock);
168 if (ret)
169 return ret;
170
171 ret = ab8500->read(ab8500, addr);
172 if (ret < 0)
173 dev_err(ab8500->dev, "failed to read reg %#x: %d\n",
174 addr, ret);
175 else
176 *value = ret;
177
178 mutex_unlock(&ab8500->lock);
179 dev_vdbg(ab8500->dev, "rd: addr %#x => data %#x\n", addr, ret);
180
181 return ret;
182}
183
184static int ab8500_get_register(struct device *dev, u8 bank,
185 u8 reg, u8 *value)
186{
187 struct ab8500 *ab8500 = dev_get_drvdata(dev->parent);
188
189 return get_register_interruptible(ab8500, bank, reg, value);
190}
191
192static int mask_and_set_register_interruptible(struct ab8500 *ab8500, u8 bank,
193 u8 reg, u8 bitmask, u8 bitvalues)
194{
195 int ret;
196 u8 data;
197 /* put the u8 bank and u8 reg together into a an u16.
198 * bank on higher 8 bits and reg in lower */
199 u16 addr = ((u16)bank) << 8 | reg;
200
201 ret = mutex_lock_interruptible(&ab8500->lock);
202 if (ret)
203 return ret;
204
205 ret = ab8500->read(ab8500, addr);
206 if (ret < 0) {
207 dev_err(ab8500->dev, "failed to read reg %#x: %d\n",
208 addr, ret);
209 goto out;
210 }
211
212 data = (u8)ret;
213 data = (~bitmask & data) | (bitmask & bitvalues);
214
Rabin Vincent62579262010-05-19 11:39:02 +0200215 ret = ab8500->write(ab8500, addr, data);
216 if (ret < 0)
217 dev_err(ab8500->dev, "failed to write reg %#x: %d\n",
218 addr, ret);
219
Mattias Wallin47c16972010-09-10 17:47:56 +0200220 dev_vdbg(ab8500->dev, "mask: addr %#x => data %#x\n", addr, data);
Rabin Vincent62579262010-05-19 11:39:02 +0200221out:
222 mutex_unlock(&ab8500->lock);
223 return ret;
224}
Mattias Wallin47c16972010-09-10 17:47:56 +0200225
226static int ab8500_mask_and_set_register(struct device *dev,
227 u8 bank, u8 reg, u8 bitmask, u8 bitvalues)
228{
229 struct ab8500 *ab8500 = dev_get_drvdata(dev->parent);
230
231 return mask_and_set_register_interruptible(ab8500, bank, reg,
232 bitmask, bitvalues);
233
234}
235
236static struct abx500_ops ab8500_ops = {
237 .get_chip_id = ab8500_get_chip_id,
238 .get_register = ab8500_get_register,
239 .set_register = ab8500_set_register,
240 .get_register_page = NULL,
241 .set_register_page = NULL,
242 .mask_and_set_register = ab8500_mask_and_set_register,
243 .event_registers_startup_state_get = NULL,
244 .startup_irq_enabled = NULL,
245};
Rabin Vincent62579262010-05-19 11:39:02 +0200246
Mark Brown9505a0a2010-12-11 13:16:08 +0000247static void ab8500_irq_lock(struct irq_data *data)
Rabin Vincent62579262010-05-19 11:39:02 +0200248{
Mark Brown9505a0a2010-12-11 13:16:08 +0000249 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
Rabin Vincent62579262010-05-19 11:39:02 +0200250
251 mutex_lock(&ab8500->irq_lock);
252}
253
Mark Brown9505a0a2010-12-11 13:16:08 +0000254static void ab8500_irq_sync_unlock(struct irq_data *data)
Rabin Vincent62579262010-05-19 11:39:02 +0200255{
Mark Brown9505a0a2010-12-11 13:16:08 +0000256 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
Rabin Vincent62579262010-05-19 11:39:02 +0200257 int i;
258
259 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) {
260 u8 old = ab8500->oldmask[i];
261 u8 new = ab8500->mask[i];
262 int reg;
263
264 if (new == old)
265 continue;
266
Linus Walleij0f6208372012-02-20 21:42:10 +0100267 /*
268 * Interrupt register 12 doesn't exist prior to AB8500 version
269 * 2.0
270 */
271 if (ab8500->irq_reg_offset[i] == 11 &&
272 is_ab8500_1p1_or_earlier(ab8500))
Mattias Wallin92d50a42010-12-07 11:20:47 +0100273 continue;
274
Rabin Vincent62579262010-05-19 11:39:02 +0200275 ab8500->oldmask[i] = new;
276
277 reg = AB8500_IT_MASK1_REG + ab8500_irq_regoffset[i];
Mattias Wallin47c16972010-09-10 17:47:56 +0200278 set_register_interruptible(ab8500, AB8500_INTERRUPT, reg, new);
Rabin Vincent62579262010-05-19 11:39:02 +0200279 }
280
281 mutex_unlock(&ab8500->irq_lock);
282}
283
Mark Brown9505a0a2010-12-11 13:16:08 +0000284static void ab8500_irq_mask(struct irq_data *data)
Rabin Vincent62579262010-05-19 11:39:02 +0200285{
Mark Brown9505a0a2010-12-11 13:16:08 +0000286 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
287 int offset = data->irq - ab8500->irq_base;
Rabin Vincent62579262010-05-19 11:39:02 +0200288 int index = offset / 8;
289 int mask = 1 << (offset % 8);
290
291 ab8500->mask[index] |= mask;
292}
293
Mark Brown9505a0a2010-12-11 13:16:08 +0000294static void ab8500_irq_unmask(struct irq_data *data)
Rabin Vincent62579262010-05-19 11:39:02 +0200295{
Mark Brown9505a0a2010-12-11 13:16:08 +0000296 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
297 int offset = data->irq - ab8500->irq_base;
Rabin Vincent62579262010-05-19 11:39:02 +0200298 int index = offset / 8;
299 int mask = 1 << (offset % 8);
300
301 ab8500->mask[index] &= ~mask;
302}
303
304static struct irq_chip ab8500_irq_chip = {
305 .name = "ab8500",
Mark Brown9505a0a2010-12-11 13:16:08 +0000306 .irq_bus_lock = ab8500_irq_lock,
307 .irq_bus_sync_unlock = ab8500_irq_sync_unlock,
308 .irq_mask = ab8500_irq_mask,
Virupax Sadashivpetimathe6f93062011-10-11 10:49:17 +0200309 .irq_disable = ab8500_irq_mask,
Mark Brown9505a0a2010-12-11 13:16:08 +0000310 .irq_unmask = ab8500_irq_unmask,
Rabin Vincent62579262010-05-19 11:39:02 +0200311};
312
313static irqreturn_t ab8500_irq(int irq, void *dev)
314{
315 struct ab8500 *ab8500 = dev;
316 int i;
317
318 dev_vdbg(ab8500->dev, "interrupt\n");
319
320 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) {
321 int regoffset = ab8500_irq_regoffset[i];
322 int status;
Mattias Wallin47c16972010-09-10 17:47:56 +0200323 u8 value;
Rabin Vincent62579262010-05-19 11:39:02 +0200324
Linus Walleij0f6208372012-02-20 21:42:10 +0100325 /*
326 * Interrupt register 12 doesn't exist prior to AB8500 version
327 * 2.0
328 */
329 if (regoffset == 11 && is_ab8500_1p1_or_earlier(ab8500))
Mattias Wallin92d50a42010-12-07 11:20:47 +0100330 continue;
331
Mattias Wallin47c16972010-09-10 17:47:56 +0200332 status = get_register_interruptible(ab8500, AB8500_INTERRUPT,
333 AB8500_IT_LATCH1_REG + regoffset, &value);
334 if (status < 0 || value == 0)
Rabin Vincent62579262010-05-19 11:39:02 +0200335 continue;
336
337 do {
Mattias Wallin88aec4f2010-12-02 15:06:49 +0100338 int bit = __ffs(value);
Rabin Vincent62579262010-05-19 11:39:02 +0200339 int line = i * 8 + bit;
340
341 handle_nested_irq(ab8500->irq_base + line);
Mattias Wallin47c16972010-09-10 17:47:56 +0200342 value &= ~(1 << bit);
343 } while (value);
Rabin Vincent62579262010-05-19 11:39:02 +0200344 }
345
346 return IRQ_HANDLED;
347}
348
349static int ab8500_irq_init(struct ab8500 *ab8500)
350{
351 int base = ab8500->irq_base;
352 int irq;
353
354 for (irq = base; irq < base + AB8500_NR_IRQS; irq++) {
Thomas Gleixnerd5bb1222011-03-25 11:12:32 +0000355 irq_set_chip_data(irq, ab8500);
356 irq_set_chip_and_handler(irq, &ab8500_irq_chip,
Rabin Vincent62579262010-05-19 11:39:02 +0200357 handle_simple_irq);
Thomas Gleixnerd5bb1222011-03-25 11:12:32 +0000358 irq_set_nested_thread(irq, 1);
Rabin Vincent62579262010-05-19 11:39:02 +0200359#ifdef CONFIG_ARM
360 set_irq_flags(irq, IRQF_VALID);
361#else
Thomas Gleixnerd5bb1222011-03-25 11:12:32 +0000362 irq_set_noprobe(irq);
Rabin Vincent62579262010-05-19 11:39:02 +0200363#endif
364 }
365
366 return 0;
367}
368
369static void ab8500_irq_remove(struct ab8500 *ab8500)
370{
371 int base = ab8500->irq_base;
372 int irq;
373
374 for (irq = base; irq < base + AB8500_NR_IRQS; irq++) {
375#ifdef CONFIG_ARM
376 set_irq_flags(irq, 0);
377#endif
Thomas Gleixnerd5bb1222011-03-25 11:12:32 +0000378 irq_set_chip_and_handler(irq, NULL, NULL);
379 irq_set_chip_data(irq, NULL);
Rabin Vincent62579262010-05-19 11:39:02 +0200380 }
381}
382
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200383static struct resource __devinitdata ab8500_gpio_resources[] = {
Bibek Basu0cb3fcd2011-02-09 11:02:35 +0530384 {
385 .name = "GPIO_INT6",
386 .start = AB8500_INT_GPIO6R,
387 .end = AB8500_INT_GPIO41F,
388 .flags = IORESOURCE_IRQ,
389 }
390};
391
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200392static struct resource __devinitdata ab8500_gpadc_resources[] = {
Rabin Vincent62579262010-05-19 11:39:02 +0200393 {
394 .name = "HW_CONV_END",
395 .start = AB8500_INT_GP_HW_ADC_CONV_END,
396 .end = AB8500_INT_GP_HW_ADC_CONV_END,
397 .flags = IORESOURCE_IRQ,
398 },
399 {
400 .name = "SW_CONV_END",
401 .start = AB8500_INT_GP_SW_ADC_CONV_END,
402 .end = AB8500_INT_GP_SW_ADC_CONV_END,
403 .flags = IORESOURCE_IRQ,
404 },
405};
406
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200407static struct resource __devinitdata ab8500_rtc_resources[] = {
Rabin Vincent62579262010-05-19 11:39:02 +0200408 {
409 .name = "60S",
410 .start = AB8500_INT_RTC_60S,
411 .end = AB8500_INT_RTC_60S,
412 .flags = IORESOURCE_IRQ,
413 },
414 {
415 .name = "ALARM",
416 .start = AB8500_INT_RTC_ALARM,
417 .end = AB8500_INT_RTC_ALARM,
418 .flags = IORESOURCE_IRQ,
419 },
420};
421
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200422static struct resource __devinitdata ab8500_poweronkey_db_resources[] = {
Sundar R Iyer77686512010-09-05 12:18:47 -0700423 {
424 .name = "ONKEY_DBF",
425 .start = AB8500_INT_PON_KEY1DB_F,
426 .end = AB8500_INT_PON_KEY1DB_F,
427 .flags = IORESOURCE_IRQ,
428 },
429 {
430 .name = "ONKEY_DBR",
431 .start = AB8500_INT_PON_KEY1DB_R,
432 .end = AB8500_INT_PON_KEY1DB_R,
433 .flags = IORESOURCE_IRQ,
434 },
435};
436
Linus Walleij6af75ec2011-06-09 23:57:45 +0200437static struct resource __devinitdata ab8500_av_acc_detect_resources[] = {
Mattias Walline098aded72010-12-02 15:40:31 +0100438 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200439 .name = "ACC_DETECT_1DB_F",
440 .start = AB8500_INT_ACC_DETECT_1DB_F,
441 .end = AB8500_INT_ACC_DETECT_1DB_F,
442 .flags = IORESOURCE_IRQ,
Mattias Walline098aded72010-12-02 15:40:31 +0100443 },
444 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200445 .name = "ACC_DETECT_1DB_R",
446 .start = AB8500_INT_ACC_DETECT_1DB_R,
447 .end = AB8500_INT_ACC_DETECT_1DB_R,
448 .flags = IORESOURCE_IRQ,
Mattias Walline098aded72010-12-02 15:40:31 +0100449 },
450 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200451 .name = "ACC_DETECT_21DB_F",
452 .start = AB8500_INT_ACC_DETECT_21DB_F,
453 .end = AB8500_INT_ACC_DETECT_21DB_F,
454 .flags = IORESOURCE_IRQ,
455 },
456 {
457 .name = "ACC_DETECT_21DB_R",
458 .start = AB8500_INT_ACC_DETECT_21DB_R,
459 .end = AB8500_INT_ACC_DETECT_21DB_R,
460 .flags = IORESOURCE_IRQ,
461 },
462 {
463 .name = "ACC_DETECT_22DB_F",
464 .start = AB8500_INT_ACC_DETECT_22DB_F,
465 .end = AB8500_INT_ACC_DETECT_22DB_F,
466 .flags = IORESOURCE_IRQ,
467 },
468 {
469 .name = "ACC_DETECT_22DB_R",
470 .start = AB8500_INT_ACC_DETECT_22DB_R,
471 .end = AB8500_INT_ACC_DETECT_22DB_R,
472 .flags = IORESOURCE_IRQ,
473 },
474};
475
476static struct resource __devinitdata ab8500_charger_resources[] = {
477 {
Mattias Walline098aded72010-12-02 15:40:31 +0100478 .name = "MAIN_CH_UNPLUG_DET",
479 .start = AB8500_INT_MAIN_CH_UNPLUG_DET,
480 .end = AB8500_INT_MAIN_CH_UNPLUG_DET,
481 .flags = IORESOURCE_IRQ,
482 },
483 {
484 .name = "MAIN_CHARGE_PLUG_DET",
485 .start = AB8500_INT_MAIN_CH_PLUG_DET,
486 .end = AB8500_INT_MAIN_CH_PLUG_DET,
487 .flags = IORESOURCE_IRQ,
488 },
489 {
Mattias Walline098aded72010-12-02 15:40:31 +0100490 .name = "VBUS_DET_R",
491 .start = AB8500_INT_VBUS_DET_R,
492 .end = AB8500_INT_VBUS_DET_R,
493 .flags = IORESOURCE_IRQ,
494 },
495 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200496 .name = "VBUS_DET_F",
497 .start = AB8500_INT_VBUS_DET_F,
498 .end = AB8500_INT_VBUS_DET_F,
Mattias Walline098aded72010-12-02 15:40:31 +0100499 .flags = IORESOURCE_IRQ,
500 },
501 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200502 .name = "USB_LINK_STATUS",
503 .start = AB8500_INT_USB_LINK_STATUS,
504 .end = AB8500_INT_USB_LINK_STATUS,
505 .flags = IORESOURCE_IRQ,
506 },
507 {
508 .name = "USB_CHARGE_DET_DONE",
509 .start = AB8500_INT_USB_CHG_DET_DONE,
510 .end = AB8500_INT_USB_CHG_DET_DONE,
Mattias Walline098aded72010-12-02 15:40:31 +0100511 .flags = IORESOURCE_IRQ,
512 },
513 {
514 .name = "VBUS_OVV",
515 .start = AB8500_INT_VBUS_OVV,
516 .end = AB8500_INT_VBUS_OVV,
517 .flags = IORESOURCE_IRQ,
518 },
519 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200520 .name = "USB_CH_TH_PROT_R",
521 .start = AB8500_INT_USB_CH_TH_PROT_R,
522 .end = AB8500_INT_USB_CH_TH_PROT_R,
Mattias Walline098aded72010-12-02 15:40:31 +0100523 .flags = IORESOURCE_IRQ,
524 },
525 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200526 .name = "USB_CH_TH_PROT_F",
527 .start = AB8500_INT_USB_CH_TH_PROT_F,
528 .end = AB8500_INT_USB_CH_TH_PROT_F,
Mattias Walline098aded72010-12-02 15:40:31 +0100529 .flags = IORESOURCE_IRQ,
530 },
531 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200532 .name = "MAIN_EXT_CH_NOT_OK",
533 .start = AB8500_INT_MAIN_EXT_CH_NOT_OK,
534 .end = AB8500_INT_MAIN_EXT_CH_NOT_OK,
535 .flags = IORESOURCE_IRQ,
536 },
537 {
538 .name = "MAIN_CH_TH_PROT_R",
539 .start = AB8500_INT_MAIN_CH_TH_PROT_R,
540 .end = AB8500_INT_MAIN_CH_TH_PROT_R,
541 .flags = IORESOURCE_IRQ,
542 },
543 {
544 .name = "MAIN_CH_TH_PROT_F",
545 .start = AB8500_INT_MAIN_CH_TH_PROT_F,
546 .end = AB8500_INT_MAIN_CH_TH_PROT_F,
547 .flags = IORESOURCE_IRQ,
548 },
549 {
550 .name = "USB_CHARGER_NOT_OKR",
551 .start = AB8500_INT_USB_CHARGER_NOT_OK,
552 .end = AB8500_INT_USB_CHARGER_NOT_OK,
553 .flags = IORESOURCE_IRQ,
554 },
555 {
556 .name = "USB_CHARGER_NOT_OKF",
557 .start = AB8500_INT_USB_CHARGER_NOT_OKF,
558 .end = AB8500_INT_USB_CHARGER_NOT_OKF,
559 .flags = IORESOURCE_IRQ,
560 },
561 {
562 .name = "CH_WD_EXP",
563 .start = AB8500_INT_CH_WD_EXP,
564 .end = AB8500_INT_CH_WD_EXP,
565 .flags = IORESOURCE_IRQ,
566 },
567};
568
569static struct resource __devinitdata ab8500_btemp_resources[] = {
570 {
571 .name = "BAT_CTRL_INDB",
572 .start = AB8500_INT_BAT_CTRL_INDB,
573 .end = AB8500_INT_BAT_CTRL_INDB,
Mattias Walline098aded72010-12-02 15:40:31 +0100574 .flags = IORESOURCE_IRQ,
575 },
576 {
577 .name = "BTEMP_LOW",
578 .start = AB8500_INT_BTEMP_LOW,
579 .end = AB8500_INT_BTEMP_LOW,
580 .flags = IORESOURCE_IRQ,
581 },
582 {
583 .name = "BTEMP_HIGH",
584 .start = AB8500_INT_BTEMP_HIGH,
585 .end = AB8500_INT_BTEMP_HIGH,
586 .flags = IORESOURCE_IRQ,
587 },
588 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200589 .name = "BTEMP_LOW_MEDIUM",
590 .start = AB8500_INT_BTEMP_LOW_MEDIUM,
591 .end = AB8500_INT_BTEMP_LOW_MEDIUM,
Mattias Walline098aded72010-12-02 15:40:31 +0100592 .flags = IORESOURCE_IRQ,
593 },
594 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200595 .name = "BTEMP_MEDIUM_HIGH",
596 .start = AB8500_INT_BTEMP_MEDIUM_HIGH,
597 .end = AB8500_INT_BTEMP_MEDIUM_HIGH,
Mattias Walline098aded72010-12-02 15:40:31 +0100598 .flags = IORESOURCE_IRQ,
599 },
600};
601
Linus Walleij6af75ec2011-06-09 23:57:45 +0200602static struct resource __devinitdata ab8500_fg_resources[] = {
603 {
604 .name = "NCONV_ACCU",
605 .start = AB8500_INT_CCN_CONV_ACC,
606 .end = AB8500_INT_CCN_CONV_ACC,
607 .flags = IORESOURCE_IRQ,
608 },
609 {
610 .name = "BATT_OVV",
611 .start = AB8500_INT_BATT_OVV,
612 .end = AB8500_INT_BATT_OVV,
613 .flags = IORESOURCE_IRQ,
614 },
615 {
616 .name = "LOW_BAT_F",
617 .start = AB8500_INT_LOW_BAT_F,
618 .end = AB8500_INT_LOW_BAT_F,
619 .flags = IORESOURCE_IRQ,
620 },
621 {
622 .name = "LOW_BAT_R",
623 .start = AB8500_INT_LOW_BAT_R,
624 .end = AB8500_INT_LOW_BAT_R,
625 .flags = IORESOURCE_IRQ,
626 },
627 {
628 .name = "CC_INT_CALIB",
629 .start = AB8500_INT_CC_INT_CALIB,
630 .end = AB8500_INT_CC_INT_CALIB,
631 .flags = IORESOURCE_IRQ,
632 },
633};
634
635static struct resource __devinitdata ab8500_chargalg_resources[] = {};
636
Axel Lindf720642011-11-10 09:56:18 +0800637#ifdef CONFIG_DEBUG_FS
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200638static struct resource __devinitdata ab8500_debug_resources[] = {
Mattias Walline098aded72010-12-02 15:40:31 +0100639 {
640 .name = "IRQ_FIRST",
641 .start = AB8500_INT_MAIN_EXT_CH_NOT_OK,
642 .end = AB8500_INT_MAIN_EXT_CH_NOT_OK,
643 .flags = IORESOURCE_IRQ,
644 },
645 {
646 .name = "IRQ_LAST",
647 .start = AB8500_INT_USB_CHARGER_NOT_OKF,
648 .end = AB8500_INT_USB_CHARGER_NOT_OKF,
649 .flags = IORESOURCE_IRQ,
650 },
651};
Axel Lindf720642011-11-10 09:56:18 +0800652#endif
Mattias Walline098aded72010-12-02 15:40:31 +0100653
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200654static struct resource __devinitdata ab8500_usb_resources[] = {
Mattias Walline098aded72010-12-02 15:40:31 +0100655 {
656 .name = "ID_WAKEUP_R",
657 .start = AB8500_INT_ID_WAKEUP_R,
658 .end = AB8500_INT_ID_WAKEUP_R,
659 .flags = IORESOURCE_IRQ,
660 },
661 {
662 .name = "ID_WAKEUP_F",
663 .start = AB8500_INT_ID_WAKEUP_F,
664 .end = AB8500_INT_ID_WAKEUP_F,
665 .flags = IORESOURCE_IRQ,
666 },
667 {
668 .name = "VBUS_DET_F",
669 .start = AB8500_INT_VBUS_DET_F,
670 .end = AB8500_INT_VBUS_DET_F,
671 .flags = IORESOURCE_IRQ,
672 },
673 {
674 .name = "VBUS_DET_R",
675 .start = AB8500_INT_VBUS_DET_R,
676 .end = AB8500_INT_VBUS_DET_R,
677 .flags = IORESOURCE_IRQ,
678 },
Mattias Wallin92d50a42010-12-07 11:20:47 +0100679 {
680 .name = "USB_LINK_STATUS",
681 .start = AB8500_INT_USB_LINK_STATUS,
682 .end = AB8500_INT_USB_LINK_STATUS,
683 .flags = IORESOURCE_IRQ,
684 },
Linus Walleij6af75ec2011-06-09 23:57:45 +0200685 {
686 .name = "USB_ADP_PROBE_PLUG",
687 .start = AB8500_INT_ADP_PROBE_PLUG,
688 .end = AB8500_INT_ADP_PROBE_PLUG,
689 .flags = IORESOURCE_IRQ,
690 },
691 {
692 .name = "USB_ADP_PROBE_UNPLUG",
693 .start = AB8500_INT_ADP_PROBE_UNPLUG,
694 .end = AB8500_INT_ADP_PROBE_UNPLUG,
695 .flags = IORESOURCE_IRQ,
696 },
Mattias Walline098aded72010-12-02 15:40:31 +0100697};
698
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200699static struct resource __devinitdata ab8500_temp_resources[] = {
Mattias Walline098aded72010-12-02 15:40:31 +0100700 {
701 .name = "AB8500_TEMP_WARM",
702 .start = AB8500_INT_TEMP_WARM,
703 .end = AB8500_INT_TEMP_WARM,
704 .flags = IORESOURCE_IRQ,
705 },
706};
707
Robert Rosengren5cef8df2011-06-09 23:57:33 +0200708static struct mfd_cell __devinitdata ab8500_devs[] = {
Mattias Wallin5814fc32010-09-13 16:05:04 +0200709#ifdef CONFIG_DEBUG_FS
710 {
711 .name = "ab8500-debug",
Mattias Walline098aded72010-12-02 15:40:31 +0100712 .num_resources = ARRAY_SIZE(ab8500_debug_resources),
713 .resources = ab8500_debug_resources,
Mattias Wallin5814fc32010-09-13 16:05:04 +0200714 },
715#endif
Rabin Vincent62579262010-05-19 11:39:02 +0200716 {
Mattias Walline098aded72010-12-02 15:40:31 +0100717 .name = "ab8500-sysctrl",
718 },
719 {
720 .name = "ab8500-regulator",
721 },
722 {
Bibek Basu0cb3fcd2011-02-09 11:02:35 +0530723 .name = "ab8500-gpio",
724 .num_resources = ARRAY_SIZE(ab8500_gpio_resources),
725 .resources = ab8500_gpio_resources,
726 },
727 {
Rabin Vincent62579262010-05-19 11:39:02 +0200728 .name = "ab8500-gpadc",
729 .num_resources = ARRAY_SIZE(ab8500_gpadc_resources),
730 .resources = ab8500_gpadc_resources,
731 },
732 {
733 .name = "ab8500-rtc",
734 .num_resources = ARRAY_SIZE(ab8500_rtc_resources),
735 .resources = ab8500_rtc_resources,
736 },
Arun Murthyf0f05b12010-09-06 12:24:52 +0530737 {
Linus Walleij6af75ec2011-06-09 23:57:45 +0200738 .name = "ab8500-charger",
739 .num_resources = ARRAY_SIZE(ab8500_charger_resources),
740 .resources = ab8500_charger_resources,
Mattias Walline098aded72010-12-02 15:40:31 +0100741 },
Linus Walleij6af75ec2011-06-09 23:57:45 +0200742 {
743 .name = "ab8500-btemp",
744 .num_resources = ARRAY_SIZE(ab8500_btemp_resources),
745 .resources = ab8500_btemp_resources,
746 },
747 {
748 .name = "ab8500-fg",
749 .num_resources = ARRAY_SIZE(ab8500_fg_resources),
750 .resources = ab8500_fg_resources,
751 },
752 {
753 .name = "ab8500-chargalg",
754 .num_resources = ARRAY_SIZE(ab8500_chargalg_resources),
755 .resources = ab8500_chargalg_resources,
756 },
757 {
758 .name = "ab8500-acc-det",
759 .num_resources = ARRAY_SIZE(ab8500_av_acc_detect_resources),
760 .resources = ab8500_av_acc_detect_resources,
761 },
762 {
763 .name = "ab8500-codec",
764 },
Mattias Walline098aded72010-12-02 15:40:31 +0100765 {
766 .name = "ab8500-usb",
767 .num_resources = ARRAY_SIZE(ab8500_usb_resources),
768 .resources = ab8500_usb_resources,
769 },
770 {
771 .name = "ab8500-poweron-key",
772 .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources),
773 .resources = ab8500_poweronkey_db_resources,
774 },
775 {
Arun Murthyf0f05b12010-09-06 12:24:52 +0530776 .name = "ab8500-pwm",
777 .id = 1,
778 },
779 {
780 .name = "ab8500-pwm",
781 .id = 2,
782 },
783 {
784 .name = "ab8500-pwm",
785 .id = 3,
786 },
Mattias Walline098aded72010-12-02 15:40:31 +0100787 { .name = "ab8500-leds", },
Sundar R Iyer77686512010-09-05 12:18:47 -0700788 {
Mattias Walline098aded72010-12-02 15:40:31 +0100789 .name = "ab8500-denc",
790 },
791 {
792 .name = "ab8500-temp",
793 .num_resources = ARRAY_SIZE(ab8500_temp_resources),
794 .resources = ab8500_temp_resources,
Sundar R Iyer77686512010-09-05 12:18:47 -0700795 },
Rabin Vincent62579262010-05-19 11:39:02 +0200796};
797
Mattias Wallincca69b62010-12-02 15:09:36 +0100798static ssize_t show_chip_id(struct device *dev,
799 struct device_attribute *attr, char *buf)
800{
801 struct ab8500 *ab8500;
802
803 ab8500 = dev_get_drvdata(dev);
804 return sprintf(buf, "%#x\n", ab8500 ? ab8500->chip_id : -EINVAL);
805}
806
Mattias Walline5c238c2011-03-02 11:52:36 +0100807/*
808 * ab8500 has switched off due to (SWITCH_OFF_STATUS):
809 * 0x01 Swoff bit programming
810 * 0x02 Thermal protection activation
811 * 0x04 Vbat lower then BattOk falling threshold
812 * 0x08 Watchdog expired
813 * 0x10 Non presence of 32kHz clock
814 * 0x20 Battery level lower than power on reset threshold
815 * 0x40 Power on key 1 pressed longer than 10 seconds
816 * 0x80 DB8500 thermal shutdown
817 */
818static ssize_t show_switch_off_status(struct device *dev,
819 struct device_attribute *attr, char *buf)
820{
821 int ret;
822 u8 value;
823 struct ab8500 *ab8500;
824
825 ab8500 = dev_get_drvdata(dev);
826 ret = get_register_interruptible(ab8500, AB8500_RTC,
827 AB8500_SWITCH_OFF_STATUS, &value);
828 if (ret < 0)
829 return ret;
830 return sprintf(buf, "%#x\n", value);
831}
832
Andrew Lynnb4a31032011-10-11 10:49:47 +0200833/*
834 * ab8500 has turned on due to (TURN_ON_STATUS):
835 * 0x01 PORnVbat
836 * 0x02 PonKey1dbF
837 * 0x04 PonKey2dbF
838 * 0x08 RTCAlarm
839 * 0x10 MainChDet
840 * 0x20 VbusDet
841 * 0x40 UsbIDDetect
842 * 0x80 Reserved
843 */
844static ssize_t show_turn_on_status(struct device *dev,
845 struct device_attribute *attr, char *buf)
846{
847 int ret;
848 u8 value;
849 struct ab8500 *ab8500;
850
851 ab8500 = dev_get_drvdata(dev);
852 ret = get_register_interruptible(ab8500, AB8500_SYS_CTRL1_BLOCK,
853 AB8500_TURN_ON_STATUS, &value);
854 if (ret < 0)
855 return ret;
856 return sprintf(buf, "%#x\n", value);
857}
858
Mattias Wallincca69b62010-12-02 15:09:36 +0100859static DEVICE_ATTR(chip_id, S_IRUGO, show_chip_id, NULL);
Mattias Walline5c238c2011-03-02 11:52:36 +0100860static DEVICE_ATTR(switch_off_status, S_IRUGO, show_switch_off_status, NULL);
Andrew Lynnb4a31032011-10-11 10:49:47 +0200861static DEVICE_ATTR(turn_on_status, S_IRUGO, show_turn_on_status, NULL);
Mattias Wallincca69b62010-12-02 15:09:36 +0100862
863static struct attribute *ab8500_sysfs_entries[] = {
864 &dev_attr_chip_id.attr,
Mattias Walline5c238c2011-03-02 11:52:36 +0100865 &dev_attr_switch_off_status.attr,
Andrew Lynnb4a31032011-10-11 10:49:47 +0200866 &dev_attr_turn_on_status.attr,
Mattias Wallincca69b62010-12-02 15:09:36 +0100867 NULL,
868};
869
870static struct attribute_group ab8500_attr_group = {
871 .attrs = ab8500_sysfs_entries,
872};
873
Linus Walleij0f6208372012-02-20 21:42:10 +0100874int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
Rabin Vincent62579262010-05-19 11:39:02 +0200875{
876 struct ab8500_platform_data *plat = dev_get_platdata(ab8500->dev);
877 int ret;
878 int i;
Mattias Wallin47c16972010-09-10 17:47:56 +0200879 u8 value;
Rabin Vincent62579262010-05-19 11:39:02 +0200880
881 if (plat)
882 ab8500->irq_base = plat->irq_base;
883
884 mutex_init(&ab8500->lock);
885 mutex_init(&ab8500->irq_lock);
886
Linus Walleij0f6208372012-02-20 21:42:10 +0100887 if (version != AB8500_VERSION_UNDEFINED)
888 ab8500->version = version;
889 else {
890 ret = get_register_interruptible(ab8500, AB8500_MISC,
891 AB8500_IC_NAME_REG, &value);
892 if (ret < 0)
893 return ret;
894
895 ab8500->version = value;
896 }
897
Mattias Wallin47c16972010-09-10 17:47:56 +0200898 ret = get_register_interruptible(ab8500, AB8500_MISC,
899 AB8500_REV_REG, &value);
Rabin Vincent62579262010-05-19 11:39:02 +0200900 if (ret < 0)
901 return ret;
902
Mattias Wallin47c16972010-09-10 17:47:56 +0200903 ab8500->chip_id = value;
Rabin Vincent62579262010-05-19 11:39:02 +0200904
Linus Walleij0f6208372012-02-20 21:42:10 +0100905 dev_info(ab8500->dev, "detected chip, %s rev. %1x.%1x\n",
906 ab8500_version_str[ab8500->version],
907 ab8500->chip_id >> 4,
908 ab8500->chip_id & 0x0F);
909
Mattias Walline5c238c2011-03-02 11:52:36 +0100910 /*
911 * ab8500 has switched off due to (SWITCH_OFF_STATUS):
912 * 0x01 Swoff bit programming
913 * 0x02 Thermal protection activation
914 * 0x04 Vbat lower then BattOk falling threshold
915 * 0x08 Watchdog expired
916 * 0x10 Non presence of 32kHz clock
917 * 0x20 Battery level lower than power on reset threshold
918 * 0x40 Power on key 1 pressed longer than 10 seconds
919 * 0x80 DB8500 thermal shutdown
920 */
921
922 ret = get_register_interruptible(ab8500, AB8500_RTC,
923 AB8500_SWITCH_OFF_STATUS, &value);
924 if (ret < 0)
925 return ret;
926 dev_info(ab8500->dev, "switch off status: %#x", value);
927
Rabin Vincent62579262010-05-19 11:39:02 +0200928 if (plat && plat->init)
929 plat->init(ab8500);
930
931 /* Clear and mask all interrupts */
Mattias Wallin92d50a42010-12-07 11:20:47 +0100932 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) {
Linus Walleij0f6208372012-02-20 21:42:10 +0100933 /*
934 * Interrupt register 12 doesn't exist prior to AB8500 version
935 * 2.0
936 */
937 if (ab8500->irq_reg_offset[i] == 11 &&
938 is_ab8500_1p1_or_earlier(ab8500))
Mattias Wallin92d50a42010-12-07 11:20:47 +0100939 continue;
Rabin Vincent62579262010-05-19 11:39:02 +0200940
Mattias Wallin47c16972010-09-10 17:47:56 +0200941 get_register_interruptible(ab8500, AB8500_INTERRUPT,
Mattias Wallin92d50a42010-12-07 11:20:47 +0100942 AB8500_IT_LATCH1_REG + ab8500_irq_regoffset[i],
943 &value);
Mattias Wallin47c16972010-09-10 17:47:56 +0200944 set_register_interruptible(ab8500, AB8500_INTERRUPT,
Mattias Wallin92d50a42010-12-07 11:20:47 +0100945 AB8500_IT_MASK1_REG + ab8500_irq_regoffset[i], 0xff);
Rabin Vincent62579262010-05-19 11:39:02 +0200946 }
947
Mattias Wallin47c16972010-09-10 17:47:56 +0200948 ret = abx500_register_ops(ab8500->dev, &ab8500_ops);
949 if (ret)
950 return ret;
951
Rabin Vincent62579262010-05-19 11:39:02 +0200952 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++)
953 ab8500->mask[i] = ab8500->oldmask[i] = 0xff;
954
955 if (ab8500->irq_base) {
956 ret = ab8500_irq_init(ab8500);
957 if (ret)
958 return ret;
959
960 ret = request_threaded_irq(ab8500->irq, NULL, ab8500_irq,
Mattias Wallin4f079982010-12-02 15:10:27 +0100961 IRQF_ONESHOT | IRQF_NO_SUSPEND,
962 "ab8500", ab8500);
Rabin Vincent62579262010-05-19 11:39:02 +0200963 if (ret)
964 goto out_removeirq;
965 }
966
Sundar R Iyer549931f2010-07-13 11:51:28 +0530967 ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
Rabin Vincent62579262010-05-19 11:39:02 +0200968 ARRAY_SIZE(ab8500_devs), NULL,
969 ab8500->irq_base);
970 if (ret)
971 goto out_freeirq;
972
Mattias Wallincca69b62010-12-02 15:09:36 +0100973 ret = sysfs_create_group(&ab8500->dev->kobj, &ab8500_attr_group);
974 if (ret)
975 dev_err(ab8500->dev, "error creating sysfs entries\n");
976
Rabin Vincent62579262010-05-19 11:39:02 +0200977 return ret;
978
979out_freeirq:
Linus Walleij6d95b7f2012-02-20 21:42:03 +0100980 if (ab8500->irq_base)
Rabin Vincent62579262010-05-19 11:39:02 +0200981 free_irq(ab8500->irq, ab8500);
982out_removeirq:
Linus Walleij6d95b7f2012-02-20 21:42:03 +0100983 if (ab8500->irq_base)
Rabin Vincent62579262010-05-19 11:39:02 +0200984 ab8500_irq_remove(ab8500);
Linus Walleij6d95b7f2012-02-20 21:42:03 +0100985
Rabin Vincent62579262010-05-19 11:39:02 +0200986 return ret;
987}
988
989int __devexit ab8500_exit(struct ab8500 *ab8500)
990{
Mattias Wallincca69b62010-12-02 15:09:36 +0100991 sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group);
Rabin Vincent62579262010-05-19 11:39:02 +0200992 mfd_remove_devices(ab8500->dev);
993 if (ab8500->irq_base) {
994 free_irq(ab8500->irq, ab8500);
995 ab8500_irq_remove(ab8500);
996 }
997
998 return 0;
999}
1000
Mattias Wallinadceed62011-03-02 11:51:11 +01001001MODULE_AUTHOR("Mattias Wallin, Srinidhi Kasagar, Rabin Vincent");
Rabin Vincent62579262010-05-19 11:39:02 +02001002MODULE_DESCRIPTION("AB8500 MFD core");
1003MODULE_LICENSE("GPL v2");