config: tegra3: enable /dev mount with ACL
[linux-2.6.git] / drivers / mfd / tps6586x.c
1 /*
2  * Core driver for TI TPS6586x PMIC family
3  *
4  * Copyright (c) 2010 CompuLab Ltd.
5  * Mike Rapoport <mike@compulab.co.il>
6  *
7  * Based on da903x.c.
8  * Copyright (C) 2008 Compulab, Ltd.
9  * Mike Rapoport <mike@compulab.co.il>
10  * Copyright (C) 2006-2008 Marvell International Ltd.
11  * Eric Miao <eric.miao@marvell.com>
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License version 2 as
15  * published by the Free Software Foundation.
16  */
17
18 #include <linux/interrupt.h>
19 #include <linux/irq.h>
20 #include <linux/kernel.h>
21 #include <linux/module.h>
22 #include <linux/mutex.h>
23 #include <linux/slab.h>
24 #include <linux/gpio.h>
25 #include <linux/i2c.h>
26
27 #include <linux/mfd/core.h>
28 #include <linux/mfd/tps6586x.h>
29
30 #define TPS6586X_SUPPLYENE  0x14
31 #define EXITSLREQ_BIT       BIT(1) /* Exit sleep mode request */
32 #define SLEEP_MODE_BIT      BIT(3) /* Sleep mode */
33
34 /* GPIO control registers */
35 #define TPS6586X_GPIOSET1       0x5d
36 #define TPS6586X_GPIOSET2       0x5e
37
38 /* interrupt control registers */
39 #define TPS6586X_INT_ACK1       0xb5
40 #define TPS6586X_INT_ACK2       0xb6
41 #define TPS6586X_INT_ACK3       0xb7
42 #define TPS6586X_INT_ACK4       0xb8
43
44 /* interrupt mask registers */
45 #define TPS6586X_INT_MASK1      0xb0
46 #define TPS6586X_INT_MASK2      0xb1
47 #define TPS6586X_INT_MASK3      0xb2
48 #define TPS6586X_INT_MASK4      0xb3
49 #define TPS6586X_INT_MASK5      0xb4
50
51 /* device id */
52 #define TPS6586X_VERSIONCRC     0xcd
53
54 struct tps6586x_irq_data {
55         u8      mask_reg;
56         u8      mask_mask;
57 };
58
59 #define TPS6586X_IRQ(_reg, _mask)                               \
60         {                                                       \
61                 .mask_reg = (_reg) - TPS6586X_INT_MASK1,        \
62                 .mask_mask = (_mask),                           \
63         }
64
65 static const struct tps6586x_irq_data tps6586x_irqs[] = {
66         [TPS6586X_INT_PLDO_0]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 0),
67         [TPS6586X_INT_PLDO_1]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 1),
68         [TPS6586X_INT_PLDO_2]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 2),
69         [TPS6586X_INT_PLDO_3]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 3),
70         [TPS6586X_INT_PLDO_4]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 4),
71         [TPS6586X_INT_PLDO_5]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 5),
72         [TPS6586X_INT_PLDO_6]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 6),
73         [TPS6586X_INT_PLDO_7]   = TPS6586X_IRQ(TPS6586X_INT_MASK1, 1 << 7),
74         [TPS6586X_INT_COMP_DET] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 0),
75         [TPS6586X_INT_ADC]      = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 1),
76         [TPS6586X_INT_PLDO_8]   = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 2),
77         [TPS6586X_INT_PLDO_9]   = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 3),
78         [TPS6586X_INT_PSM_0]    = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 4),
79         [TPS6586X_INT_PSM_1]    = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 5),
80         [TPS6586X_INT_PSM_2]    = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 6),
81         [TPS6586X_INT_PSM_3]    = TPS6586X_IRQ(TPS6586X_INT_MASK2, 1 << 7),
82         [TPS6586X_INT_RTC_ALM1] = TPS6586X_IRQ(TPS6586X_INT_MASK5, 1 << 4),
83         [TPS6586X_INT_ACUSB_OVP] = TPS6586X_IRQ(TPS6586X_INT_MASK5, 0x03),
84         [TPS6586X_INT_USB_DET]  = TPS6586X_IRQ(TPS6586X_INT_MASK5, 1 << 2),
85         [TPS6586X_INT_AC_DET]   = TPS6586X_IRQ(TPS6586X_INT_MASK5, 1 << 3),
86         [TPS6586X_INT_BAT_DET]  = TPS6586X_IRQ(TPS6586X_INT_MASK3, 1 << 0),
87         [TPS6586X_INT_CHG_STAT] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 0xfc),
88         [TPS6586X_INT_CHG_TEMP] = TPS6586X_IRQ(TPS6586X_INT_MASK3, 0x06),
89         [TPS6586X_INT_PP]       = TPS6586X_IRQ(TPS6586X_INT_MASK3, 0xf0),
90         [TPS6586X_INT_RESUME]   = TPS6586X_IRQ(TPS6586X_INT_MASK5, 1 << 5),
91         [TPS6586X_INT_LOW_SYS]  = TPS6586X_IRQ(TPS6586X_INT_MASK5, 1 << 6),
92         [TPS6586X_INT_RTC_ALM2] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 1),
93 };
94
95 struct tps6586x {
96         struct mutex            lock;
97         struct device           *dev;
98         struct i2c_client       *client;
99
100         struct gpio_chip        gpio;
101         struct irq_chip         irq_chip;
102         struct mutex            irq_lock;
103         int                     irq_base;
104         u32                     irq_en;
105         u8                      mask_cache[5];
106         u8                      mask_reg[5];
107 };
108
109 static inline int __tps6586x_read(struct i2c_client *client,
110                                   int reg, uint8_t *val)
111 {
112         int ret;
113
114         ret = i2c_smbus_read_byte_data(client, reg);
115         if (ret < 0) {
116                 dev_err(&client->dev, "failed reading at 0x%02x\n", reg);
117                 return ret;
118         }
119
120         *val = (uint8_t)ret;
121
122         return 0;
123 }
124
125 static inline int __tps6586x_reads(struct i2c_client *client, int reg,
126                                    int len, uint8_t *val)
127 {
128         int ret;
129
130         ret = i2c_smbus_read_i2c_block_data(client, reg, len, val);
131         if (ret < 0) {
132                 dev_err(&client->dev, "failed reading from 0x%02x\n", reg);
133                 return ret;
134         }
135
136         return 0;
137 }
138
139 static inline int __tps6586x_write(struct i2c_client *client,
140                                  int reg, uint8_t val)
141 {
142         int ret;
143
144         ret = i2c_smbus_write_byte_data(client, reg, val);
145         if (ret < 0) {
146                 dev_err(&client->dev, "failed writing 0x%02x to 0x%02x\n",
147                                 val, reg);
148                 return ret;
149         }
150
151         return 0;
152 }
153
154 static inline int __tps6586x_writes(struct i2c_client *client, int reg,
155                                   int len, uint8_t *val)
156 {
157         int ret, i;
158
159         for (i = 0; i < len; i++) {
160                 ret = __tps6586x_write(client, reg + i, *(val + i));
161                 if (ret < 0)
162                         return ret;
163         }
164
165         return 0;
166 }
167
168 int tps6586x_write(struct device *dev, int reg, uint8_t val)
169 {
170         return __tps6586x_write(to_i2c_client(dev), reg, val);
171 }
172 EXPORT_SYMBOL_GPL(tps6586x_write);
173
174 int tps6586x_writes(struct device *dev, int reg, int len, uint8_t *val)
175 {
176         return __tps6586x_writes(to_i2c_client(dev), reg, len, val);
177 }
178 EXPORT_SYMBOL_GPL(tps6586x_writes);
179
180 int tps6586x_read(struct device *dev, int reg, uint8_t *val)
181 {
182         return __tps6586x_read(to_i2c_client(dev), reg, val);
183 }
184 EXPORT_SYMBOL_GPL(tps6586x_read);
185
186 int tps6586x_reads(struct device *dev, int reg, int len, uint8_t *val)
187 {
188         return __tps6586x_reads(to_i2c_client(dev), reg, len, val);
189 }
190 EXPORT_SYMBOL_GPL(tps6586x_reads);
191
192 int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask)
193 {
194         struct tps6586x *tps6586x = dev_get_drvdata(dev);
195         uint8_t reg_val;
196         int ret = 0;
197
198         mutex_lock(&tps6586x->lock);
199
200         ret = __tps6586x_read(to_i2c_client(dev), reg, &reg_val);
201         if (ret)
202                 goto out;
203
204         if ((reg_val & bit_mask) == 0) {
205                 reg_val |= bit_mask;
206                 ret = __tps6586x_write(to_i2c_client(dev), reg, reg_val);
207         }
208 out:
209         mutex_unlock(&tps6586x->lock);
210         return ret;
211 }
212 EXPORT_SYMBOL_GPL(tps6586x_set_bits);
213
214 int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask)
215 {
216         struct tps6586x *tps6586x = dev_get_drvdata(dev);
217         uint8_t reg_val;
218         int ret = 0;
219
220         mutex_lock(&tps6586x->lock);
221
222         ret = __tps6586x_read(to_i2c_client(dev), reg, &reg_val);
223         if (ret)
224                 goto out;
225
226         if (reg_val & bit_mask) {
227                 reg_val &= ~bit_mask;
228                 ret = __tps6586x_write(to_i2c_client(dev), reg, reg_val);
229         }
230 out:
231         mutex_unlock(&tps6586x->lock);
232         return ret;
233 }
234 EXPORT_SYMBOL_GPL(tps6586x_clr_bits);
235
236 int tps6586x_update(struct device *dev, int reg, uint8_t val, uint8_t mask)
237 {
238         struct tps6586x *tps6586x = dev_get_drvdata(dev);
239         uint8_t reg_val;
240         int ret = 0;
241
242         mutex_lock(&tps6586x->lock);
243
244         ret = __tps6586x_read(tps6586x->client, reg, &reg_val);
245         if (ret)
246                 goto out;
247
248         if ((reg_val & mask) != val) {
249                 reg_val = (reg_val & ~mask) | val;
250                 ret = __tps6586x_write(tps6586x->client, reg, reg_val);
251         }
252 out:
253         mutex_unlock(&tps6586x->lock);
254         return ret;
255 }
256 EXPORT_SYMBOL_GPL(tps6586x_update);
257
258 static struct i2c_client *tps6586x_i2c_client = NULL;
259 static void tps6586x_power_off(void)
260 {
261         struct device *dev = NULL;
262
263         if (!tps6586x_i2c_client)
264                 return;
265
266         dev = &tps6586x_i2c_client->dev;
267
268         if (tps6586x_clr_bits(dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT))
269                 return;
270
271         tps6586x_set_bits(dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
272 }
273
274 static int tps6586x_gpio_get(struct gpio_chip *gc, unsigned offset)
275 {
276         struct tps6586x *tps6586x = container_of(gc, struct tps6586x, gpio);
277         uint8_t val;
278         int ret;
279
280         ret = __tps6586x_read(tps6586x->client, TPS6586X_GPIOSET2, &val);
281         if (ret)
282                 return ret;
283
284         return !!(val & (1 << offset));
285 }
286
287
288 static void tps6586x_gpio_set(struct gpio_chip *chip, unsigned offset,
289                               int value)
290 {
291         struct tps6586x *tps6586x = container_of(chip, struct tps6586x, gpio);
292
293         tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET2,
294                         value << offset, 1 << offset);
295 }
296
297 static int tps6586x_gpio_input(struct gpio_chip *gc, unsigned offset)
298 {
299         /* FIXME: add handling of GPIOs as dedicated inputs */
300         return -ENOSYS;
301 }
302
303 static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset,
304                                 int value)
305 {
306         struct tps6586x *tps6586x = container_of(gc, struct tps6586x, gpio);
307         uint8_t val, mask;
308         int ret;
309
310         val = value << offset;
311         mask = 0x1 << offset;
312         ret = tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET2, val, mask);
313         if (ret)
314                 return ret;
315
316         val = 0x1 << (offset * 2);
317         mask = 0x3 << (offset * 2);
318
319         return tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET1, val, mask);
320 }
321
322 static int tps6586x_gpio_init(struct tps6586x *tps6586x, int gpio_base)
323 {
324         if (!gpio_base)
325                 return 0;
326
327         tps6586x->gpio.owner            = THIS_MODULE;
328         tps6586x->gpio.label            = tps6586x->client->name;
329         tps6586x->gpio.dev              = tps6586x->dev;
330         tps6586x->gpio.base             = gpio_base;
331         tps6586x->gpio.ngpio            = 4;
332         tps6586x->gpio.can_sleep        = 1;
333
334         tps6586x->gpio.direction_input  = tps6586x_gpio_input;
335         tps6586x->gpio.direction_output = tps6586x_gpio_output;
336         tps6586x->gpio.set              = tps6586x_gpio_set;
337         tps6586x->gpio.get              = tps6586x_gpio_get;
338
339         return gpiochip_add(&tps6586x->gpio);
340 }
341
342 static int __remove_subdev(struct device *dev, void *unused)
343 {
344         platform_device_unregister(to_platform_device(dev));
345         return 0;
346 }
347
348 static int tps6586x_remove_subdevs(struct tps6586x *tps6586x)
349 {
350         return device_for_each_child(tps6586x->dev, NULL, __remove_subdev);
351 }
352
353 static void tps6586x_irq_lock(struct irq_data *data)
354 {
355         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data);
356
357         mutex_lock(&tps6586x->irq_lock);
358 }
359
360 static void tps6586x_irq_enable(struct irq_data *irq_data)
361 {
362         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data);
363         unsigned int __irq = irq_data->irq - tps6586x->irq_base;
364         const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq];
365
366         tps6586x->mask_reg[data->mask_reg] &= ~data->mask_mask;
367         tps6586x->irq_en |= (1 << __irq);
368 }
369
370 static void tps6586x_irq_disable(struct irq_data *irq_data)
371 {
372         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data);
373
374         unsigned int __irq = irq_data->irq - tps6586x->irq_base;
375         const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq];
376
377         tps6586x->mask_reg[data->mask_reg] |= data->mask_mask;
378         tps6586x->irq_en &= ~(1 << __irq);
379 }
380
381 static void tps6586x_irq_sync_unlock(struct irq_data *data)
382 {
383         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data);
384         int i;
385
386         for (i = 0; i < ARRAY_SIZE(tps6586x->mask_reg); i++) {
387                 if (tps6586x->mask_reg[i] != tps6586x->mask_cache[i]) {
388                         if (!WARN_ON(tps6586x_write(tps6586x->dev,
389                                                     TPS6586X_INT_MASK1 + i,
390                                                     tps6586x->mask_reg[i])))
391                                 tps6586x->mask_cache[i] = tps6586x->mask_reg[i];
392                 }
393         }
394
395         mutex_unlock(&tps6586x->irq_lock);
396 }
397
398 static irqreturn_t tps6586x_irq(int irq, void *data)
399 {
400         struct tps6586x *tps6586x = data;
401         u32 acks;
402         int ret = 0;
403
404         ret = tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1,
405                              sizeof(acks), (uint8_t *)&acks);
406
407         if (ret < 0) {
408                 dev_err(tps6586x->dev, "failed to read interrupt status\n");
409                 return IRQ_NONE;
410         }
411
412         acks = le32_to_cpu(acks);
413
414         while (acks) {
415                 int i = __ffs(acks);
416
417                 if (tps6586x->irq_en & (1 << i))
418                         handle_nested_irq(tps6586x->irq_base + i);
419
420                 acks &= ~(1 << i);
421         }
422
423         return IRQ_HANDLED;
424 }
425
426 static int __devinit tps6586x_irq_init(struct tps6586x *tps6586x, int irq,
427                                        int irq_base)
428 {
429         int i, ret;
430         u8 tmp[4];
431
432         if (!irq_base) {
433                 dev_warn(tps6586x->dev, "No interrupt support on IRQ base\n");
434                 return -EINVAL;
435         }
436
437         mutex_init(&tps6586x->irq_lock);
438         for (i = 0; i < 5; i++) {
439                 tps6586x->mask_cache[i] = 0xff;
440                 tps6586x->mask_reg[i] = 0xff;
441                 tps6586x_write(tps6586x->dev, TPS6586X_INT_MASK1 + i, 0xff);
442         }
443
444         tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1, sizeof(tmp), tmp);
445
446         tps6586x->irq_base = irq_base;
447
448         tps6586x->irq_chip.name = "tps6586x";
449         tps6586x->irq_chip.irq_enable = tps6586x_irq_enable;
450         tps6586x->irq_chip.irq_disable = tps6586x_irq_disable;
451         tps6586x->irq_chip.irq_bus_lock = tps6586x_irq_lock;
452         tps6586x->irq_chip.irq_bus_sync_unlock = tps6586x_irq_sync_unlock;
453
454         for (i = 0; i < ARRAY_SIZE(tps6586x_irqs); i++) {
455                 int __irq = i + tps6586x->irq_base;
456                 irq_set_chip_data(__irq, tps6586x);
457                 irq_set_chip_and_handler(__irq, &tps6586x->irq_chip,
458                                          handle_simple_irq);
459                 irq_set_nested_thread(__irq, 1);
460 #ifdef CONFIG_ARM
461                 set_irq_flags(__irq, IRQF_VALID);
462 #endif
463         }
464
465         ret = request_threaded_irq(irq, NULL, tps6586x_irq, IRQF_ONESHOT,
466                                    "tps6586x", tps6586x);
467
468         if (!ret) {
469                 device_init_wakeup(tps6586x->dev, 1);
470                 enable_irq_wake(irq);
471         }
472
473         return ret;
474 }
475
476 static int __devinit tps6586x_add_subdevs(struct tps6586x *tps6586x,
477                                           struct tps6586x_platform_data *pdata)
478 {
479         struct tps6586x_subdev_info *subdev;
480         struct platform_device *pdev;
481         int i, ret = 0;
482
483         for (i = 0; i < pdata->num_subdevs; i++) {
484                 subdev = &pdata->subdevs[i];
485
486                 pdev = platform_device_alloc(subdev->name, subdev->id);
487                 if (!pdev) {
488                         ret = -ENOMEM;
489                         goto failed;
490                 }
491
492                 pdev->dev.parent = tps6586x->dev;
493                 pdev->dev.platform_data = subdev->platform_data;
494
495                 ret = platform_device_add(pdev);
496                 if (ret) {
497                         platform_device_put(pdev);
498                         goto failed;
499                 }
500         }
501         return 0;
502
503 failed:
504         tps6586x_remove_subdevs(tps6586x);
505         return ret;
506 }
507
508 static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
509                                         const struct i2c_device_id *id)
510 {
511         struct tps6586x_platform_data *pdata = client->dev.platform_data;
512         struct tps6586x *tps6586x;
513         int ret;
514
515         if (!pdata) {
516                 dev_err(&client->dev, "tps6586x requires platform data\n");
517                 return -ENOTSUPP;
518         }
519
520         ret = i2c_smbus_read_byte_data(client, TPS6586X_VERSIONCRC);
521         if (ret < 0) {
522                 dev_err(&client->dev, "Chip ID read failed: %d\n", ret);
523                 return -EIO;
524         }
525
526         dev_info(&client->dev, "VERSIONCRC is %02x\n", ret);
527
528         tps6586x = kzalloc(sizeof(struct tps6586x), GFP_KERNEL);
529         if (tps6586x == NULL)
530                 return -ENOMEM;
531
532         tps6586x->client = client;
533         tps6586x->dev = &client->dev;
534         i2c_set_clientdata(client, tps6586x);
535
536         mutex_init(&tps6586x->lock);
537
538         if (client->irq) {
539                 ret = tps6586x_irq_init(tps6586x, client->irq,
540                                         pdata->irq_base);
541                 if (ret) {
542                         dev_err(&client->dev, "IRQ init failed: %d\n", ret);
543                         goto err_irq_init;
544                 }
545         }
546
547         ret = tps6586x_gpio_init(tps6586x, pdata->gpio_base);
548         if (ret) {
549                 dev_err(&client->dev, "GPIO registration failed: %d\n", ret);
550                 goto err_gpio_init;
551         }
552
553         ret = tps6586x_add_subdevs(tps6586x, pdata);
554         if (ret) {
555                 dev_err(&client->dev, "add devices failed: %d\n", ret);
556                 goto err_add_devs;
557         }
558
559         if (pdata->use_power_off && !pm_power_off)
560                 pm_power_off = tps6586x_power_off;
561
562         tps6586x_i2c_client = client;
563
564         return 0;
565
566 err_add_devs:
567         if (pdata->gpio_base) {
568                 ret = gpiochip_remove(&tps6586x->gpio);
569                 if (ret)
570                         dev_err(&client->dev, "Can't remove gpio chip: %d\n",
571                                 ret);
572         }
573 err_gpio_init:
574         if (client->irq)
575                 free_irq(client->irq, tps6586x);
576 err_irq_init:
577         kfree(tps6586x);
578         return ret;
579 }
580
581 static int __devexit tps6586x_i2c_remove(struct i2c_client *client)
582 {
583         struct tps6586x *tps6586x = i2c_get_clientdata(client);
584         struct tps6586x_platform_data *pdata = client->dev.platform_data;
585         int ret;
586
587         if (client->irq)
588                 free_irq(client->irq, tps6586x);
589
590         if (pdata->gpio_base) {
591                 ret = gpiochip_remove(&tps6586x->gpio);
592                 if (ret)
593                         dev_err(&client->dev, "Can't remove gpio chip: %d\n",
594                                 ret);
595         }
596
597         tps6586x_remove_subdevs(tps6586x);
598         kfree(tps6586x);
599         return 0;
600 }
601
602 static const struct i2c_device_id tps6586x_id_table[] = {
603         { "tps6586x", 0 },
604         { },
605 };
606 MODULE_DEVICE_TABLE(i2c, tps6586x_id_table);
607
608 static struct i2c_driver tps6586x_driver = {
609         .driver = {
610                 .name   = "tps6586x",
611                 .owner  = THIS_MODULE,
612         },
613         .probe          = tps6586x_i2c_probe,
614         .remove         = __devexit_p(tps6586x_i2c_remove),
615         .id_table       = tps6586x_id_table,
616 };
617
618 static int __init tps6586x_init(void)
619 {
620         return i2c_add_driver(&tps6586x_driver);
621 }
622 subsys_initcall(tps6586x_init);
623
624 static void __exit tps6586x_exit(void)
625 {
626         i2c_del_driver(&tps6586x_driver);
627 }
628 module_exit(tps6586x_exit);
629
630 MODULE_DESCRIPTION("TPS6586X core driver");
631 MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
632 MODULE_LICENSE("GPL");