Revert "mfd: tps6586x: add suspend/resume handlers"
[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 int tps6586x_power_off(void)
260 {
261         struct device *dev = NULL;
262         int ret = -EINVAL;
263
264         if (!tps6586x_i2c_client)
265                 return ret;
266
267         dev = &tps6586x_i2c_client->dev;
268
269         ret = tps6586x_clr_bits(dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT);
270         if (ret)
271                 return ret;
272
273         ret = tps6586x_set_bits(dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
274         if (ret)
275                 return ret;
276
277         return 0;
278 }
279
280 static int tps6586x_gpio_get(struct gpio_chip *gc, unsigned offset)
281 {
282         struct tps6586x *tps6586x = container_of(gc, struct tps6586x, gpio);
283         uint8_t val;
284         int ret;
285
286         ret = __tps6586x_read(tps6586x->client, TPS6586X_GPIOSET2, &val);
287         if (ret)
288                 return ret;
289
290         return !!(val & (1 << offset));
291 }
292
293
294 static void tps6586x_gpio_set(struct gpio_chip *chip, unsigned offset,
295                               int value)
296 {
297         struct tps6586x *tps6586x = container_of(chip, struct tps6586x, gpio);
298
299         tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET2,
300                         value << offset, 1 << offset);
301 }
302
303 static int tps6586x_gpio_input(struct gpio_chip *gc, unsigned offset)
304 {
305         /* FIXME: add handling of GPIOs as dedicated inputs */
306         return -ENOSYS;
307 }
308
309 static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset,
310                                 int value)
311 {
312         struct tps6586x *tps6586x = container_of(gc, struct tps6586x, gpio);
313         uint8_t val, mask;
314         int ret;
315
316         val = value << offset;
317         mask = 0x1 << offset;
318         ret = tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET2, val, mask);
319         if (ret)
320                 return ret;
321
322         val = 0x1 << (offset * 2);
323         mask = 0x3 << (offset * 2);
324
325         return tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET1, val, mask);
326 }
327
328 static int tps6586x_gpio_init(struct tps6586x *tps6586x, int gpio_base)
329 {
330         if (!gpio_base)
331                 return 0;
332
333         tps6586x->gpio.owner            = THIS_MODULE;
334         tps6586x->gpio.label            = tps6586x->client->name;
335         tps6586x->gpio.dev              = tps6586x->dev;
336         tps6586x->gpio.base             = gpio_base;
337         tps6586x->gpio.ngpio            = 4;
338         tps6586x->gpio.can_sleep        = 1;
339
340         tps6586x->gpio.direction_input  = tps6586x_gpio_input;
341         tps6586x->gpio.direction_output = tps6586x_gpio_output;
342         tps6586x->gpio.set              = tps6586x_gpio_set;
343         tps6586x->gpio.get              = tps6586x_gpio_get;
344
345         return gpiochip_add(&tps6586x->gpio);
346 }
347
348 static int __remove_subdev(struct device *dev, void *unused)
349 {
350         platform_device_unregister(to_platform_device(dev));
351         return 0;
352 }
353
354 static int tps6586x_remove_subdevs(struct tps6586x *tps6586x)
355 {
356         return device_for_each_child(tps6586x->dev, NULL, __remove_subdev);
357 }
358
359 static void tps6586x_irq_lock(struct irq_data *data)
360 {
361         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data);
362
363         mutex_lock(&tps6586x->irq_lock);
364 }
365
366 static void tps6586x_irq_enable(struct irq_data *irq_data)
367 {
368         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data);
369         unsigned int __irq = irq_data->irq - tps6586x->irq_base;
370         const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq];
371
372         tps6586x->mask_reg[data->mask_reg] &= ~data->mask_mask;
373         tps6586x->irq_en |= (1 << __irq);
374 }
375
376 static void tps6586x_irq_disable(struct irq_data *irq_data)
377 {
378         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data);
379
380         unsigned int __irq = irq_data->irq - tps6586x->irq_base;
381         const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq];
382
383         tps6586x->mask_reg[data->mask_reg] |= data->mask_mask;
384         tps6586x->irq_en &= ~(1 << __irq);
385 }
386
387 static void tps6586x_irq_sync_unlock(struct irq_data *data)
388 {
389         struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data);
390         int i;
391
392         for (i = 0; i < ARRAY_SIZE(tps6586x->mask_reg); i++) {
393                 if (tps6586x->mask_reg[i] != tps6586x->mask_cache[i]) {
394                         if (!WARN_ON(tps6586x_write(tps6586x->dev,
395                                                     TPS6586X_INT_MASK1 + i,
396                                                     tps6586x->mask_reg[i])))
397                                 tps6586x->mask_cache[i] = tps6586x->mask_reg[i];
398                 }
399         }
400
401         mutex_unlock(&tps6586x->irq_lock);
402 }
403
404 static irqreturn_t tps6586x_irq(int irq, void *data)
405 {
406         struct tps6586x *tps6586x = data;
407         u32 acks;
408         int ret = 0;
409
410         ret = tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1,
411                              sizeof(acks), (uint8_t *)&acks);
412
413         if (ret < 0) {
414                 dev_err(tps6586x->dev, "failed to read interrupt status\n");
415                 return IRQ_NONE;
416         }
417
418         acks = le32_to_cpu(acks);
419
420         while (acks) {
421                 int i = __ffs(acks);
422
423                 if (tps6586x->irq_en & (1 << i))
424                         handle_nested_irq(tps6586x->irq_base + i);
425
426                 acks &= ~(1 << i);
427         }
428
429         return IRQ_HANDLED;
430 }
431
432 static int __devinit tps6586x_irq_init(struct tps6586x *tps6586x, int irq,
433                                        int irq_base)
434 {
435         int i, ret;
436         u8 tmp[4];
437
438         if (!irq_base) {
439                 dev_warn(tps6586x->dev, "No interrupt support on IRQ base\n");
440                 return -EINVAL;
441         }
442
443         mutex_init(&tps6586x->irq_lock);
444         for (i = 0; i < 5; i++) {
445                 tps6586x->mask_cache[i] = 0xff;
446                 tps6586x->mask_reg[i] = 0xff;
447                 tps6586x_write(tps6586x->dev, TPS6586X_INT_MASK1 + i, 0xff);
448         }
449
450         tps6586x_reads(tps6586x->dev, TPS6586X_INT_ACK1, sizeof(tmp), tmp);
451
452         tps6586x->irq_base = irq_base;
453
454         tps6586x->irq_chip.name = "tps6586x";
455         tps6586x->irq_chip.irq_enable = tps6586x_irq_enable;
456         tps6586x->irq_chip.irq_disable = tps6586x_irq_disable;
457         tps6586x->irq_chip.irq_bus_lock = tps6586x_irq_lock;
458         tps6586x->irq_chip.irq_bus_sync_unlock = tps6586x_irq_sync_unlock;
459
460         for (i = 0; i < ARRAY_SIZE(tps6586x_irqs); i++) {
461                 int __irq = i + tps6586x->irq_base;
462                 irq_set_chip_data(__irq, tps6586x);
463                 irq_set_chip_and_handler(__irq, &tps6586x->irq_chip,
464                                          handle_simple_irq);
465                 irq_set_nested_thread(__irq, 1);
466 #ifdef CONFIG_ARM
467                 set_irq_flags(__irq, IRQF_VALID);
468 #endif
469         }
470
471         ret = request_threaded_irq(irq, NULL, tps6586x_irq, IRQF_ONESHOT,
472                                    "tps6586x", tps6586x);
473
474         if (!ret) {
475                 device_init_wakeup(tps6586x->dev, 1);
476                 enable_irq_wake(irq);
477         }
478
479         return ret;
480 }
481
482 static int __devinit tps6586x_add_subdevs(struct tps6586x *tps6586x,
483                                           struct tps6586x_platform_data *pdata)
484 {
485         struct tps6586x_subdev_info *subdev;
486         struct platform_device *pdev;
487         int i, ret = 0;
488
489         for (i = 0; i < pdata->num_subdevs; i++) {
490                 subdev = &pdata->subdevs[i];
491
492                 pdev = platform_device_alloc(subdev->name, subdev->id);
493                 if (!pdev) {
494                         ret = -ENOMEM;
495                         goto failed;
496                 }
497
498                 pdev->dev.parent = tps6586x->dev;
499                 pdev->dev.platform_data = subdev->platform_data;
500
501                 ret = platform_device_add(pdev);
502                 if (ret) {
503                         platform_device_put(pdev);
504                         goto failed;
505                 }
506         }
507         return 0;
508
509 failed:
510         tps6586x_remove_subdevs(tps6586x);
511         return ret;
512 }
513
514 static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
515                                         const struct i2c_device_id *id)
516 {
517         struct tps6586x_platform_data *pdata = client->dev.platform_data;
518         struct tps6586x *tps6586x;
519         int ret;
520
521         if (!pdata) {
522                 dev_err(&client->dev, "tps6586x requires platform data\n");
523                 return -ENOTSUPP;
524         }
525
526         ret = i2c_smbus_read_byte_data(client, TPS6586X_VERSIONCRC);
527         if (ret < 0) {
528                 dev_err(&client->dev, "Chip ID read failed: %d\n", ret);
529                 return -EIO;
530         }
531
532         dev_info(&client->dev, "VERSIONCRC is %02x\n", ret);
533
534         tps6586x = kzalloc(sizeof(struct tps6586x), GFP_KERNEL);
535         if (tps6586x == NULL)
536                 return -ENOMEM;
537
538         tps6586x->client = client;
539         tps6586x->dev = &client->dev;
540         i2c_set_clientdata(client, tps6586x);
541
542         mutex_init(&tps6586x->lock);
543
544         if (client->irq) {
545                 ret = tps6586x_irq_init(tps6586x, client->irq,
546                                         pdata->irq_base);
547                 if (ret) {
548                         dev_err(&client->dev, "IRQ init failed: %d\n", ret);
549                         goto err_irq_init;
550                 }
551         }
552
553         ret = tps6586x_gpio_init(tps6586x, pdata->gpio_base);
554         if (ret) {
555                 dev_err(&client->dev, "GPIO registration failed: %d\n", ret);
556                 goto err_gpio_init;
557         }
558
559         ret = tps6586x_add_subdevs(tps6586x, pdata);
560         if (ret) {
561                 dev_err(&client->dev, "add devices failed: %d\n", ret);
562                 goto err_add_devs;
563         }
564
565         tps6586x_i2c_client = client;
566
567         return 0;
568
569 err_add_devs:
570         if (pdata->gpio_base) {
571                 ret = gpiochip_remove(&tps6586x->gpio);
572                 if (ret)
573                         dev_err(&client->dev, "Can't remove gpio chip: %d\n",
574                                 ret);
575         }
576 err_gpio_init:
577         if (client->irq)
578                 free_irq(client->irq, tps6586x);
579 err_irq_init:
580         kfree(tps6586x);
581         return ret;
582 }
583
584 static int __devexit tps6586x_i2c_remove(struct i2c_client *client)
585 {
586         struct tps6586x *tps6586x = i2c_get_clientdata(client);
587         struct tps6586x_platform_data *pdata = client->dev.platform_data;
588         int ret;
589
590         if (client->irq)
591                 free_irq(client->irq, tps6586x);
592
593         if (pdata->gpio_base) {
594                 ret = gpiochip_remove(&tps6586x->gpio);
595                 if (ret)
596                         dev_err(&client->dev, "Can't remove gpio chip: %d\n",
597                                 ret);
598         }
599
600         tps6586x_remove_subdevs(tps6586x);
601         kfree(tps6586x);
602         return 0;
603 }
604
605 static const struct i2c_device_id tps6586x_id_table[] = {
606         { "tps6586x", 0 },
607         { },
608 };
609 MODULE_DEVICE_TABLE(i2c, tps6586x_id_table);
610
611 static struct i2c_driver tps6586x_driver = {
612         .driver = {
613                 .name   = "tps6586x",
614                 .owner  = THIS_MODULE,
615         },
616         .probe          = tps6586x_i2c_probe,
617         .remove         = __devexit_p(tps6586x_i2c_remove),
618         .id_table       = tps6586x_id_table,
619 };
620
621 static int __init tps6586x_init(void)
622 {
623         return i2c_add_driver(&tps6586x_driver);
624 }
625 subsys_initcall(tps6586x_init);
626
627 static void __exit tps6586x_exit(void)
628 {
629         i2c_del_driver(&tps6586x_driver);
630 }
631 module_exit(tps6586x_exit);
632
633 MODULE_DESCRIPTION("TPS6586X core driver");
634 MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
635 MODULE_LICENSE("GPL");