Blame view

drivers/mfd/da903x.c 13 KB
26b8f5e1e   Eric Miao   mfd: add base sup...
1
2
3
4
  /*
   * Base driver for Dialog Semiconductor DA9030/DA9034
   *
   * Copyright (C) 2008 Compulab, Ltd.
8b2775787   Lee Jones   mfd: da903x: Fix ...
5
   *	Mike Rapoport <mike@compulab.co.il>
26b8f5e1e   Eric Miao   mfd: add base sup...
6
7
   *
   * Copyright (C) 2006-2008 Marvell International Ltd.
8b2775787   Lee Jones   mfd: da903x: Fix ...
8
   *	Eric Miao <eric.miao@marvell.com>
26b8f5e1e   Eric Miao   mfd: add base sup...
9
10
11
12
13
14
15
16
17
18
19
20
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
  
  #include <linux/kernel.h>
  #include <linux/module.h>
  #include <linux/interrupt.h>
  #include <linux/platform_device.h>
  #include <linux/i2c.h>
  #include <linux/mfd/da903x.h>
5a0e3ad6a   Tejun Heo   include cleanup: ...
21
  #include <linux/slab.h>
26b8f5e1e   Eric Miao   mfd: add base sup...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  
  #define DA9030_CHIP_ID		0x00
  #define DA9030_EVENT_A		0x01
  #define DA9030_EVENT_B		0x02
  #define DA9030_EVENT_C		0x03
  #define DA9030_STATUS		0x04
  #define DA9030_IRQ_MASK_A	0x05
  #define DA9030_IRQ_MASK_B	0x06
  #define DA9030_IRQ_MASK_C	0x07
  #define DA9030_SYS_CTRL_A	0x08
  #define DA9030_SYS_CTRL_B	0x09
  #define DA9030_FAULT_LOG	0x0a
  
  #define DA9034_CHIP_ID		0x00
  #define DA9034_EVENT_A		0x01
  #define DA9034_EVENT_B		0x02
  #define DA9034_EVENT_C		0x03
  #define DA9034_EVENT_D		0x04
  #define DA9034_STATUS_A		0x05
  #define DA9034_STATUS_B		0x06
  #define DA9034_IRQ_MASK_A	0x07
  #define DA9034_IRQ_MASK_B	0x08
  #define DA9034_IRQ_MASK_C	0x09
  #define DA9034_IRQ_MASK_D	0x0a
  #define DA9034_SYS_CTRL_A	0x0b
  #define DA9034_SYS_CTRL_B	0x0c
  #define DA9034_FAULT_LOG	0x0d
  
  struct da903x_chip;
  
  struct da903x_chip_ops {
  	int	(*init_chip)(struct da903x_chip *);
  	int	(*unmask_events)(struct da903x_chip *, unsigned int events);
  	int	(*mask_events)(struct da903x_chip *, unsigned int events);
  	int	(*read_events)(struct da903x_chip *, unsigned int *events);
  	int	(*read_status)(struct da903x_chip *, unsigned int *status);
  };
  
  struct da903x_chip {
  	struct i2c_client	*client;
  	struct device		*dev;
f83e7d814   Julia Lawall   mfd: da903x: Cons...
63
  	const struct da903x_chip_ops *ops;
26b8f5e1e   Eric Miao   mfd: add base sup...
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  
  	int			type;
  	uint32_t		events_mask;
  
  	struct mutex		lock;
  	struct work_struct	irq_work;
  
  	struct blocking_notifier_head notifier_list;
  };
  
  static inline int __da903x_read(struct i2c_client *client,
  				int reg, uint8_t *val)
  {
  	int ret;
  
  	ret = i2c_smbus_read_byte_data(client, reg);
  	if (ret < 0) {
  		dev_err(&client->dev, "failed reading at 0x%02x
  ", reg);
  		return ret;
  	}
  
  	*val = (uint8_t)ret;
  	return 0;
  }
  
  static inline int __da903x_reads(struct i2c_client *client, int reg,
  				 int len, uint8_t *val)
  {
  	int ret;
  
  	ret = i2c_smbus_read_i2c_block_data(client, reg, len, val);
  	if (ret < 0) {
  		dev_err(&client->dev, "failed reading from 0x%02x
  ", reg);
  		return ret;
  	}
  	return 0;
  }
  
  static inline int __da903x_write(struct i2c_client *client,
  				 int reg, uint8_t val)
  {
  	int ret;
  
  	ret = i2c_smbus_write_byte_data(client, reg, val);
  	if (ret < 0) {
  		dev_err(&client->dev, "failed writing 0x%02x to 0x%02x
  ",
  				val, reg);
  		return ret;
  	}
  	return 0;
  }
  
  static inline int __da903x_writes(struct i2c_client *client, int reg,
  				  int len, uint8_t *val)
  {
  	int ret;
  
  	ret = i2c_smbus_write_i2c_block_data(client, reg, len, val);
  	if (ret < 0) {
  		dev_err(&client->dev, "failed writings to 0x%02x
  ", reg);
  		return ret;
  	}
  	return 0;
  }
  
  int da903x_register_notifier(struct device *dev, struct notifier_block *nb,
  				unsigned int events)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  
  	chip->ops->unmask_events(chip, events);
  	return blocking_notifier_chain_register(&chip->notifier_list, nb);
  }
  EXPORT_SYMBOL_GPL(da903x_register_notifier);
  
  int da903x_unregister_notifier(struct device *dev, struct notifier_block *nb,
  				unsigned int events)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  
  	chip->ops->mask_events(chip, events);
  	return blocking_notifier_chain_unregister(&chip->notifier_list, nb);
  }
  EXPORT_SYMBOL_GPL(da903x_unregister_notifier);
  
  int da903x_write(struct device *dev, int reg, uint8_t val)
  {
  	return __da903x_write(to_i2c_client(dev), reg, val);
  }
  EXPORT_SYMBOL_GPL(da903x_write);
856f6fd11   Mike Rapoport   mfd: Dialog DA903...
158
159
160
161
162
  int da903x_writes(struct device *dev, int reg, int len, uint8_t *val)
  {
  	return __da903x_writes(to_i2c_client(dev), reg, len, val);
  }
  EXPORT_SYMBOL_GPL(da903x_writes);
26b8f5e1e   Eric Miao   mfd: add base sup...
163
164
165
166
167
  int da903x_read(struct device *dev, int reg, uint8_t *val)
  {
  	return __da903x_read(to_i2c_client(dev), reg, val);
  }
  EXPORT_SYMBOL_GPL(da903x_read);
856f6fd11   Mike Rapoport   mfd: Dialog DA903...
168
169
170
171
172
  int da903x_reads(struct device *dev, int reg, int len, uint8_t *val)
  {
  	return __da903x_reads(to_i2c_client(dev), reg, len, val);
  }
  EXPORT_SYMBOL_GPL(da903x_reads);
26b8f5e1e   Eric Miao   mfd: add base sup...
173
174
175
176
177
178
179
180
181
182
183
  int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  	uint8_t reg_val;
  	int ret = 0;
  
  	mutex_lock(&chip->lock);
  
  	ret = __da903x_read(chip->client, reg, &reg_val);
  	if (ret)
  		goto out;
af65e6cef   Axel Lin   mfd: Set da903x b...
184
  	if ((reg_val & bit_mask) != bit_mask) {
26b8f5e1e   Eric Miao   mfd: add base sup...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
  		reg_val |= bit_mask;
  		ret = __da903x_write(chip->client, reg, reg_val);
  	}
  out:
  	mutex_unlock(&chip->lock);
  	return ret;
  }
  EXPORT_SYMBOL_GPL(da903x_set_bits);
  
  int da903x_clr_bits(struct device *dev, int reg, uint8_t bit_mask)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  	uint8_t reg_val;
  	int ret = 0;
  
  	mutex_lock(&chip->lock);
  
  	ret = __da903x_read(chip->client, reg, &reg_val);
  	if (ret)
  		goto out;
  
  	if (reg_val & bit_mask) {
  		reg_val &= ~bit_mask;
  		ret = __da903x_write(chip->client, reg, reg_val);
  	}
  out:
  	mutex_unlock(&chip->lock);
  	return ret;
  }
  EXPORT_SYMBOL_GPL(da903x_clr_bits);
  
  int da903x_update(struct device *dev, int reg, uint8_t val, uint8_t mask)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  	uint8_t reg_val;
  	int ret = 0;
  
  	mutex_lock(&chip->lock);
  
  	ret = __da903x_read(chip->client, reg, &reg_val);
  	if (ret)
  		goto out;
  
  	if ((reg_val & mask) != val) {
  		reg_val = (reg_val & ~mask) | val;
  		ret = __da903x_write(chip->client, reg, reg_val);
  	}
  out:
  	mutex_unlock(&chip->lock);
  	return ret;
  }
  EXPORT_SYMBOL_GPL(da903x_update);
  
  int da903x_query_status(struct device *dev, unsigned int sbits)
  {
  	struct da903x_chip *chip = dev_get_drvdata(dev);
  	unsigned int status = 0;
  
  	chip->ops->read_status(chip, &status);
  	return ((status & sbits) == sbits);
  }
  EXPORT_SYMBOL(da903x_query_status);
f791be492   Bill Pemberton   mfd: remove use o...
247
  static int da9030_init_chip(struct da903x_chip *chip)
26b8f5e1e   Eric Miao   mfd: add base sup...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
  {
  	uint8_t chip_id;
  	int err;
  
  	err = __da903x_read(chip->client, DA9030_CHIP_ID, &chip_id);
  	if (err)
  		return err;
  
  	err = __da903x_write(chip->client, DA9030_SYS_CTRL_A, 0xE8);
  	if (err)
  		return err;
  
  	dev_info(chip->dev, "DA9030 (CHIP ID: 0x%02x) detected
  ", chip_id);
  	return 0;
  }
  
  static int da9030_unmask_events(struct da903x_chip *chip, unsigned int events)
  {
  	uint8_t v[3];
  
  	chip->events_mask &= ~events;
  
  	v[0] = (chip->events_mask & 0xff);
  	v[1] = (chip->events_mask >> 8) & 0xff;
  	v[2] = (chip->events_mask >> 16) & 0xff;
  
  	return __da903x_writes(chip->client, DA9030_IRQ_MASK_A, 3, v);
  }
  
  static int da9030_mask_events(struct da903x_chip *chip, unsigned int events)
  {
  	uint8_t v[3];
b1ccbdc4a   Mike Rapoport   mfd: fix event ma...
281
  	chip->events_mask |= events;
26b8f5e1e   Eric Miao   mfd: add base sup...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
  
  	v[0] = (chip->events_mask & 0xff);
  	v[1] = (chip->events_mask >> 8) & 0xff;
  	v[2] = (chip->events_mask >> 16) & 0xff;
  
  	return __da903x_writes(chip->client, DA9030_IRQ_MASK_A, 3, v);
  }
  
  static int da9030_read_events(struct da903x_chip *chip, unsigned int *events)
  {
  	uint8_t v[3] = {0, 0, 0};
  	int ret;
  
  	ret = __da903x_reads(chip->client, DA9030_EVENT_A, 3, v);
  	if (ret < 0)
  		return ret;
  
  	*events = (v[2] << 16) | (v[1] << 8) | v[0];
  	return 0;
  }
  
  static int da9030_read_status(struct da903x_chip *chip, unsigned int *status)
  {
  	return __da903x_read(chip->client, DA9030_STATUS, (uint8_t *)status);
  }
  
  static int da9034_init_chip(struct da903x_chip *chip)
  {
  	uint8_t chip_id;
  	int err;
  
  	err = __da903x_read(chip->client, DA9034_CHIP_ID, &chip_id);
  	if (err)
  		return err;
  
  	err = __da903x_write(chip->client, DA9034_SYS_CTRL_A, 0xE8);
  	if (err)
  		return err;
  
  	/* avoid SRAM power off during sleep*/
  	__da903x_write(chip->client, 0x10, 0x07);
  	__da903x_write(chip->client, 0x11, 0xff);
  	__da903x_write(chip->client, 0x12, 0xff);
  
  	/* Enable the ONKEY power down functionality */
  	__da903x_write(chip->client, DA9034_SYS_CTRL_B, 0x20);
  	__da903x_write(chip->client, DA9034_SYS_CTRL_A, 0x60);
  
  	/* workaround to make LEDs work */
  	__da903x_write(chip->client, 0x90, 0x01);
  	__da903x_write(chip->client, 0xB0, 0x08);
  
  	/* make ADTV1 and SDTV1 effective */
  	__da903x_write(chip->client, 0x20, 0x00);
  
  	dev_info(chip->dev, "DA9034 (CHIP ID: 0x%02x) detected
  ", chip_id);
  	return 0;
  }
  
  static int da9034_unmask_events(struct da903x_chip *chip, unsigned int events)
  {
  	uint8_t v[4];
  
  	chip->events_mask &= ~events;
  
  	v[0] = (chip->events_mask & 0xff);
  	v[1] = (chip->events_mask >> 8) & 0xff;
  	v[2] = (chip->events_mask >> 16) & 0xff;
  	v[3] = (chip->events_mask >> 24) & 0xff;
  
  	return __da903x_writes(chip->client, DA9034_IRQ_MASK_A, 4, v);
  }
  
  static int da9034_mask_events(struct da903x_chip *chip, unsigned int events)
  {
  	uint8_t v[4];
  
  	chip->events_mask |= events;
  
  	v[0] = (chip->events_mask & 0xff);
  	v[1] = (chip->events_mask >> 8) & 0xff;
  	v[2] = (chip->events_mask >> 16) & 0xff;
  	v[3] = (chip->events_mask >> 24) & 0xff;
  
  	return __da903x_writes(chip->client, DA9034_IRQ_MASK_A, 4, v);
  }
  
  static int da9034_read_events(struct da903x_chip *chip, unsigned int *events)
  {
  	uint8_t v[4] = {0, 0, 0, 0};
  	int ret;
  
  	ret = __da903x_reads(chip->client, DA9034_EVENT_A, 4, v);
  	if (ret < 0)
  		return ret;
  
  	*events = (v[3] << 24) | (v[2] << 16) | (v[1] << 8) | v[0];
  	return 0;
  }
  
  static int da9034_read_status(struct da903x_chip *chip, unsigned int *status)
  {
  	uint8_t v[2] = {0, 0};
  	int ret = 0;
  
  	ret = __da903x_reads(chip->client, DA9034_STATUS_A, 2, v);
  	if (ret)
  		return ret;
  
  	*status = (v[1] << 8) | v[0];
  	return 0;
  }
  
  static void da903x_irq_work(struct work_struct *work)
  {
  	struct da903x_chip *chip =
  		container_of(work, struct da903x_chip, irq_work);
  	unsigned int events = 0;
  
  	while (1) {
  		if (chip->ops->read_events(chip, &events))
  			break;
  
  		events &= ~chip->events_mask;
  		if (events == 0)
  			break;
  
  		blocking_notifier_call_chain(
  				&chip->notifier_list, events, NULL);
  	}
  	enable_irq(chip->client->irq);
  }
fa15ce8ad   Samuel Ortiz   mfd: fix da903x w...
415
  static irqreturn_t da903x_irq_handler(int irq, void *data)
26b8f5e1e   Eric Miao   mfd: add base sup...
416
417
418
419
420
421
422
423
  {
  	struct da903x_chip *chip = data;
  
  	disable_irq_nosync(irq);
  	(void)schedule_work(&chip->irq_work);
  
  	return IRQ_HANDLED;
  }
f83e7d814   Julia Lawall   mfd: da903x: Cons...
424
  static const struct da903x_chip_ops da903x_ops[] = {
26b8f5e1e   Eric Miao   mfd: add base sup...
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
  	[0] = {
  		.init_chip	= da9030_init_chip,
  		.unmask_events	= da9030_unmask_events,
  		.mask_events	= da9030_mask_events,
  		.read_events	= da9030_read_events,
  		.read_status	= da9030_read_status,
  	},
  	[1] = {
  		.init_chip	= da9034_init_chip,
  		.unmask_events	= da9034_unmask_events,
  		.mask_events	= da9034_mask_events,
  		.read_events	= da9034_read_events,
  		.read_status	= da9034_read_status,
  	}
  };
  
  static const struct i2c_device_id da903x_id_table[] = {
  	{ "da9030", 0 },
  	{ "da9034", 1 },
  	{ },
  };
  MODULE_DEVICE_TABLE(i2c, da903x_id_table);
3f874b664   Mark Brown   mfd: Fix section ...
447
  static int __remove_subdev(struct device *dev, void *unused)
26b8f5e1e   Eric Miao   mfd: add base sup...
448
449
450
451
  {
  	platform_device_unregister(to_platform_device(dev));
  	return 0;
  }
3f874b664   Mark Brown   mfd: Fix section ...
452
  static int da903x_remove_subdevs(struct da903x_chip *chip)
26b8f5e1e   Eric Miao   mfd: add base sup...
453
454
455
  {
  	return device_for_each_child(chip->dev, NULL, __remove_subdev);
  }
f791be492   Bill Pemberton   mfd: remove use o...
456
  static int da903x_add_subdevs(struct da903x_chip *chip,
26b8f5e1e   Eric Miao   mfd: add base sup...
457
458
459
460
461
462
463
464
465
466
  					struct da903x_platform_data *pdata)
  {
  	struct da903x_subdev_info *subdev;
  	struct platform_device *pdev;
  	int i, ret = 0;
  
  	for (i = 0; i < pdata->num_subdevs; i++) {
  		subdev = &pdata->subdevs[i];
  
  		pdev = platform_device_alloc(subdev->name, subdev->id);
b59cedeff   Axel Lin   mfd: Fix da903x_a...
467
468
469
470
  		if (!pdev) {
  			ret = -ENOMEM;
  			goto failed;
  		}
26b8f5e1e   Eric Miao   mfd: add base sup...
471
472
473
474
475
  
  		pdev->dev.parent = chip->dev;
  		pdev->dev.platform_data = subdev->platform_data;
  
  		ret = platform_device_add(pdev);
b59cedeff   Axel Lin   mfd: Fix da903x_a...
476
477
  		if (ret) {
  			platform_device_put(pdev);
26b8f5e1e   Eric Miao   mfd: add base sup...
478
  			goto failed;
b59cedeff   Axel Lin   mfd: Fix da903x_a...
479
  		}
26b8f5e1e   Eric Miao   mfd: add base sup...
480
481
482
483
484
485
486
  	}
  	return 0;
  
  failed:
  	da903x_remove_subdevs(chip);
  	return ret;
  }
f791be492   Bill Pemberton   mfd: remove use o...
487
  static int da903x_probe(struct i2c_client *client,
26b8f5e1e   Eric Miao   mfd: add base sup...
488
489
  				  const struct i2c_device_id *id)
  {
334a41ce9   Jingoo Han   mfd: Use dev_get_...
490
  	struct da903x_platform_data *pdata = dev_get_platdata(&client->dev);
26b8f5e1e   Eric Miao   mfd: add base sup...
491
492
493
  	struct da903x_chip *chip;
  	unsigned int tmp;
  	int ret;
aa4dcf5be   Jingoo Han   mfd: da903x: Use ...
494
495
  	chip = devm_kzalloc(&client->dev, sizeof(struct da903x_chip),
  				GFP_KERNEL);
26b8f5e1e   Eric Miao   mfd: add base sup...
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
  	if (chip == NULL)
  		return -ENOMEM;
  
  	chip->client = client;
  	chip->dev = &client->dev;
  	chip->ops = &da903x_ops[id->driver_data];
  
  	mutex_init(&chip->lock);
  	INIT_WORK(&chip->irq_work, da903x_irq_work);
  	BLOCKING_INIT_NOTIFIER_HEAD(&chip->notifier_list);
  
  	i2c_set_clientdata(client, chip);
  
  	ret = chip->ops->init_chip(chip);
  	if (ret)
aa4dcf5be   Jingoo Han   mfd: da903x: Use ...
511
  		return ret;
26b8f5e1e   Eric Miao   mfd: add base sup...
512
513
514
515
516
  
  	/* mask and clear all IRQs */
  	chip->events_mask = 0xffffffff;
  	chip->ops->mask_events(chip, chip->events_mask);
  	chip->ops->read_events(chip, &tmp);
aa4dcf5be   Jingoo Han   mfd: da903x: Use ...
517
  	ret = devm_request_irq(&client->dev, client->irq, da903x_irq_handler,
f742b96e4   Yong Zhang   mfd: Remove IRQF_...
518
  			IRQF_TRIGGER_FALLING,
26b8f5e1e   Eric Miao   mfd: add base sup...
519
520
521
522
523
  			"da903x", chip);
  	if (ret) {
  		dev_err(&client->dev, "failed to request irq %d
  ",
  				client->irq);
aa4dcf5be   Jingoo Han   mfd: da903x: Use ...
524
  		return ret;
26b8f5e1e   Eric Miao   mfd: add base sup...
525
  	}
5597da294   Javier Martinez Canillas   mfd: da903x: Simp...
526
  	return da903x_add_subdevs(chip, pdata);
26b8f5e1e   Eric Miao   mfd: add base sup...
527
  }
4740f73fe   Bill Pemberton   mfd: remove use o...
528
  static int da903x_remove(struct i2c_client *client)
26b8f5e1e   Eric Miao   mfd: add base sup...
529
530
531
532
  {
  	struct da903x_chip *chip = i2c_get_clientdata(client);
  
  	da903x_remove_subdevs(chip);
26b8f5e1e   Eric Miao   mfd: add base sup...
533
534
535
536
537
538
  	return 0;
  }
  
  static struct i2c_driver da903x_driver = {
  	.driver	= {
  		.name	= "da903x",
26b8f5e1e   Eric Miao   mfd: add base sup...
539
540
  	},
  	.probe		= da903x_probe,
84449216b   Bill Pemberton   mfd: remove use o...
541
  	.remove		= da903x_remove,
26b8f5e1e   Eric Miao   mfd: add base sup...
542
543
544
545
546
547
548
  	.id_table	= da903x_id_table,
  };
  
  static int __init da903x_init(void)
  {
  	return i2c_add_driver(&da903x_driver);
  }
2021de874   Samuel Ortiz   mfd: early init f...
549
  subsys_initcall(da903x_init);
26b8f5e1e   Eric Miao   mfd: add base sup...
550
551
552
553
554
555
556
557
  
  static void __exit da903x_exit(void)
  {
  	i2c_del_driver(&da903x_driver);
  }
  module_exit(da903x_exit);
  
  MODULE_DESCRIPTION("PMIC Driver for Dialog Semiconductor DA9034");
8b2775787   Lee Jones   mfd: da903x: Fix ...
558
559
560
  MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
  MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
  MODULE_LICENSE("GPL v2");