Commit | Line | Data |
---|---|---|
9b40b030 T |
1 | /* |
2 | * Core, IRQ and I2C device driver for DA9062 PMIC | |
3 | * Copyright (C) 2015 Dialog Semiconductor Ltd. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU General Public License | |
7 | * as published by the Free Software Foundation; either version 2 | |
8 | * of the License, or (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | */ | |
15 | ||
16 | #include <linux/kernel.h> | |
17 | #include <linux/module.h> | |
18 | #include <linux/init.h> | |
19 | #include <linux/device.h> | |
20 | #include <linux/interrupt.h> | |
21 | #include <linux/regmap.h> | |
22 | #include <linux/irq.h> | |
23 | #include <linux/mfd/core.h> | |
24 | #include <linux/i2c.h> | |
25 | #include <linux/mfd/da9062/core.h> | |
26 | #include <linux/mfd/da9062/registers.h> | |
27 | #include <linux/regulator/of_regulator.h> | |
28 | ||
29 | #define DA9062_REG_EVENT_A_OFFSET 0 | |
30 | #define DA9062_REG_EVENT_B_OFFSET 1 | |
31 | #define DA9062_REG_EVENT_C_OFFSET 2 | |
32 | ||
33 | static struct regmap_irq da9062_irqs[] = { | |
34 | /* EVENT A */ | |
35 | [DA9062_IRQ_ONKEY] = { | |
36 | .reg_offset = DA9062_REG_EVENT_A_OFFSET, | |
37 | .mask = DA9062AA_M_NONKEY_MASK, | |
38 | }, | |
39 | [DA9062_IRQ_ALARM] = { | |
40 | .reg_offset = DA9062_REG_EVENT_A_OFFSET, | |
41 | .mask = DA9062AA_M_ALARM_MASK, | |
42 | }, | |
43 | [DA9062_IRQ_TICK] = { | |
44 | .reg_offset = DA9062_REG_EVENT_A_OFFSET, | |
45 | .mask = DA9062AA_M_TICK_MASK, | |
46 | }, | |
47 | [DA9062_IRQ_WDG_WARN] = { | |
48 | .reg_offset = DA9062_REG_EVENT_A_OFFSET, | |
49 | .mask = DA9062AA_M_WDG_WARN_MASK, | |
50 | }, | |
51 | [DA9062_IRQ_SEQ_RDY] = { | |
52 | .reg_offset = DA9062_REG_EVENT_A_OFFSET, | |
53 | .mask = DA9062AA_M_SEQ_RDY_MASK, | |
54 | }, | |
55 | /* EVENT B */ | |
56 | [DA9062_IRQ_TEMP] = { | |
57 | .reg_offset = DA9062_REG_EVENT_B_OFFSET, | |
58 | .mask = DA9062AA_M_TEMP_MASK, | |
59 | }, | |
60 | [DA9062_IRQ_LDO_LIM] = { | |
61 | .reg_offset = DA9062_REG_EVENT_B_OFFSET, | |
62 | .mask = DA9062AA_M_LDO_LIM_MASK, | |
63 | }, | |
64 | [DA9062_IRQ_DVC_RDY] = { | |
65 | .reg_offset = DA9062_REG_EVENT_B_OFFSET, | |
66 | .mask = DA9062AA_M_DVC_RDY_MASK, | |
67 | }, | |
68 | [DA9062_IRQ_VDD_WARN] = { | |
69 | .reg_offset = DA9062_REG_EVENT_B_OFFSET, | |
70 | .mask = DA9062AA_M_VDD_WARN_MASK, | |
71 | }, | |
72 | /* EVENT C */ | |
73 | [DA9062_IRQ_GPI0] = { | |
74 | .reg_offset = DA9062_REG_EVENT_C_OFFSET, | |
75 | .mask = DA9062AA_M_GPI0_MASK, | |
76 | }, | |
77 | [DA9062_IRQ_GPI1] = { | |
78 | .reg_offset = DA9062_REG_EVENT_C_OFFSET, | |
79 | .mask = DA9062AA_M_GPI1_MASK, | |
80 | }, | |
81 | [DA9062_IRQ_GPI2] = { | |
82 | .reg_offset = DA9062_REG_EVENT_C_OFFSET, | |
83 | .mask = DA9062AA_M_GPI2_MASK, | |
84 | }, | |
85 | [DA9062_IRQ_GPI3] = { | |
86 | .reg_offset = DA9062_REG_EVENT_C_OFFSET, | |
87 | .mask = DA9062AA_M_GPI3_MASK, | |
88 | }, | |
89 | [DA9062_IRQ_GPI4] = { | |
90 | .reg_offset = DA9062_REG_EVENT_C_OFFSET, | |
91 | .mask = DA9062AA_M_GPI4_MASK, | |
92 | }, | |
93 | }; | |
94 | ||
95 | static struct regmap_irq_chip da9062_irq_chip = { | |
96 | .name = "da9062-irq", | |
97 | .irqs = da9062_irqs, | |
98 | .num_irqs = DA9062_NUM_IRQ, | |
99 | .num_regs = 3, | |
100 | .status_base = DA9062AA_EVENT_A, | |
101 | .mask_base = DA9062AA_IRQ_MASK_A, | |
102 | .ack_base = DA9062AA_EVENT_A, | |
103 | }; | |
104 | ||
105 | static struct resource da9062_core_resources[] = { | |
106 | DEFINE_RES_NAMED(DA9062_IRQ_VDD_WARN, 1, "VDD_WARN", IORESOURCE_IRQ), | |
107 | }; | |
108 | ||
109 | static struct resource da9062_regulators_resources[] = { | |
110 | DEFINE_RES_NAMED(DA9062_IRQ_LDO_LIM, 1, "LDO_LIM", IORESOURCE_IRQ), | |
111 | }; | |
112 | ||
113 | static struct resource da9062_thermal_resources[] = { | |
114 | DEFINE_RES_NAMED(DA9062_IRQ_TEMP, 1, "THERMAL", IORESOURCE_IRQ), | |
115 | }; | |
116 | ||
117 | static struct resource da9062_wdt_resources[] = { | |
118 | DEFINE_RES_NAMED(DA9062_IRQ_WDG_WARN, 1, "WD_WARN", IORESOURCE_IRQ), | |
119 | }; | |
120 | ||
121 | static const struct mfd_cell da9062_devs[] = { | |
122 | { | |
123 | .name = "da9062-core", | |
124 | .num_resources = ARRAY_SIZE(da9062_core_resources), | |
125 | .resources = da9062_core_resources, | |
126 | }, | |
127 | { | |
128 | .name = "da9062-regulators", | |
129 | .num_resources = ARRAY_SIZE(da9062_regulators_resources), | |
130 | .resources = da9062_regulators_resources, | |
131 | }, | |
132 | { | |
133 | .name = "da9062-watchdog", | |
134 | .num_resources = ARRAY_SIZE(da9062_wdt_resources), | |
135 | .resources = da9062_wdt_resources, | |
136 | .of_compatible = "dlg,da9062-wdt", | |
137 | }, | |
138 | { | |
139 | .name = "da9062-thermal", | |
140 | .num_resources = ARRAY_SIZE(da9062_thermal_resources), | |
141 | .resources = da9062_thermal_resources, | |
142 | .of_compatible = "dlg,da9062-thermal", | |
143 | }, | |
144 | }; | |
145 | ||
146 | static int da9062_clear_fault_log(struct da9062 *chip) | |
147 | { | |
148 | int ret; | |
149 | int fault_log; | |
150 | ||
151 | ret = regmap_read(chip->regmap, DA9062AA_FAULT_LOG, &fault_log); | |
152 | if (ret < 0) | |
153 | return ret; | |
154 | ||
155 | if (fault_log) { | |
156 | if (fault_log & DA9062AA_TWD_ERROR_MASK) | |
157 | dev_dbg(chip->dev, "Fault log entry detected: TWD_ERROR\n"); | |
158 | if (fault_log & DA9062AA_POR_MASK) | |
159 | dev_dbg(chip->dev, "Fault log entry detected: POR\n"); | |
160 | if (fault_log & DA9062AA_VDD_FAULT_MASK) | |
161 | dev_dbg(chip->dev, "Fault log entry detected: VDD_FAULT\n"); | |
162 | if (fault_log & DA9062AA_VDD_START_MASK) | |
163 | dev_dbg(chip->dev, "Fault log entry detected: VDD_START\n"); | |
164 | if (fault_log & DA9062AA_TEMP_CRIT_MASK) | |
165 | dev_dbg(chip->dev, "Fault log entry detected: TEMP_CRIT\n"); | |
166 | if (fault_log & DA9062AA_KEY_RESET_MASK) | |
167 | dev_dbg(chip->dev, "Fault log entry detected: KEY_RESET\n"); | |
168 | if (fault_log & DA9062AA_NSHUTDOWN_MASK) | |
169 | dev_dbg(chip->dev, "Fault log entry detected: NSHUTDOWN\n"); | |
170 | if (fault_log & DA9062AA_WAIT_SHUT_MASK) | |
171 | dev_dbg(chip->dev, "Fault log entry detected: WAIT_SHUT\n"); | |
172 | ||
173 | ret = regmap_write(chip->regmap, DA9062AA_FAULT_LOG, | |
174 | fault_log); | |
175 | } | |
176 | ||
177 | return ret; | |
178 | } | |
179 | ||
180 | int get_device_type(struct da9062 *chip) | |
181 | { | |
182 | int device_id, variant_id, variant_mrc; | |
183 | int ret; | |
184 | ||
185 | ret = regmap_read(chip->regmap, DA9062AA_DEVICE_ID, &device_id); | |
186 | if (ret < 0) { | |
187 | dev_err(chip->dev, "Cannot read chip ID.\n"); | |
188 | return -EIO; | |
189 | } | |
190 | if (device_id != DA9062_PMIC_DEVICE_ID) { | |
191 | dev_err(chip->dev, "Invalid device ID: 0x%02x\n", device_id); | |
192 | return -ENODEV; | |
193 | } | |
194 | ||
195 | ret = regmap_read(chip->regmap, DA9062AA_VARIANT_ID, &variant_id); | |
196 | if (ret < 0) { | |
197 | dev_err(chip->dev, "Cannot read chip variant id.\n"); | |
198 | return -EIO; | |
199 | } | |
200 | ||
201 | dev_info(chip->dev, | |
202 | "Device detected (device-ID: 0x%02X, var-ID: 0x%02X)\n", | |
203 | device_id, variant_id); | |
204 | ||
205 | variant_mrc = (variant_id & DA9062AA_MRC_MASK) >> DA9062AA_MRC_SHIFT; | |
206 | ||
207 | if (variant_mrc < DA9062_PMIC_VARIANT_MRC_AA) { | |
208 | dev_err(chip->dev, | |
209 | "Cannot support variant MRC: 0x%02X\n", variant_mrc); | |
210 | return -ENODEV; | |
211 | } | |
212 | ||
213 | return ret; | |
214 | } | |
215 | ||
216 | static const struct regmap_range da9062_aa_readable_ranges[] = { | |
217 | { | |
218 | .range_min = DA9062AA_PAGE_CON, | |
219 | .range_max = DA9062AA_STATUS_B, | |
220 | }, { | |
221 | .range_min = DA9062AA_STATUS_D, | |
222 | .range_max = DA9062AA_EVENT_C, | |
223 | }, { | |
224 | .range_min = DA9062AA_IRQ_MASK_A, | |
225 | .range_max = DA9062AA_IRQ_MASK_C, | |
226 | }, { | |
227 | .range_min = DA9062AA_CONTROL_A, | |
228 | .range_max = DA9062AA_GPIO_4, | |
229 | }, { | |
230 | .range_min = DA9062AA_GPIO_WKUP_MODE, | |
231 | .range_max = DA9062AA_BUCK4_CONT, | |
232 | }, { | |
233 | .range_min = DA9062AA_BUCK3_CONT, | |
234 | .range_max = DA9062AA_BUCK3_CONT, | |
235 | }, { | |
236 | .range_min = DA9062AA_LDO1_CONT, | |
237 | .range_max = DA9062AA_LDO4_CONT, | |
238 | }, { | |
239 | .range_min = DA9062AA_DVC_1, | |
240 | .range_max = DA9062AA_DVC_1, | |
241 | }, { | |
242 | .range_min = DA9062AA_COUNT_S, | |
243 | .range_max = DA9062AA_SECOND_D, | |
244 | }, { | |
245 | .range_min = DA9062AA_SEQ, | |
246 | .range_max = DA9062AA_ID_4_3, | |
247 | }, { | |
248 | .range_min = DA9062AA_ID_12_11, | |
249 | .range_max = DA9062AA_ID_16_15, | |
250 | }, { | |
251 | .range_min = DA9062AA_ID_22_21, | |
252 | .range_max = DA9062AA_ID_32_31, | |
253 | }, { | |
254 | .range_min = DA9062AA_SEQ_A, | |
255 | .range_max = DA9062AA_BUCK3_CFG, | |
256 | }, { | |
257 | .range_min = DA9062AA_VBUCK2_A, | |
258 | .range_max = DA9062AA_VBUCK4_A, | |
259 | }, { | |
260 | .range_min = DA9062AA_VBUCK3_A, | |
261 | .range_max = DA9062AA_VBUCK3_A, | |
262 | }, { | |
263 | .range_min = DA9062AA_VLDO1_A, | |
264 | .range_max = DA9062AA_VLDO4_A, | |
265 | }, { | |
266 | .range_min = DA9062AA_VBUCK2_B, | |
267 | .range_max = DA9062AA_VBUCK4_B, | |
268 | }, { | |
269 | .range_min = DA9062AA_VBUCK3_B, | |
270 | .range_max = DA9062AA_VBUCK3_B, | |
271 | }, { | |
272 | .range_min = DA9062AA_VLDO1_B, | |
273 | .range_max = DA9062AA_VLDO4_B, | |
274 | }, { | |
275 | .range_min = DA9062AA_BBAT_CONT, | |
276 | .range_max = DA9062AA_BBAT_CONT, | |
277 | }, { | |
278 | .range_min = DA9062AA_INTERFACE, | |
279 | .range_max = DA9062AA_CONFIG_E, | |
280 | }, { | |
281 | .range_min = DA9062AA_CONFIG_G, | |
282 | .range_max = DA9062AA_CONFIG_K, | |
283 | }, { | |
284 | .range_min = DA9062AA_CONFIG_M, | |
285 | .range_max = DA9062AA_CONFIG_M, | |
286 | }, { | |
287 | .range_min = DA9062AA_TRIM_CLDR, | |
288 | .range_max = DA9062AA_GP_ID_19, | |
289 | }, { | |
290 | .range_min = DA9062AA_DEVICE_ID, | |
291 | .range_max = DA9062AA_CONFIG_ID, | |
292 | }, | |
293 | }; | |
294 | ||
295 | static const struct regmap_range da9062_aa_writeable_ranges[] = { | |
296 | { | |
297 | .range_min = DA9062AA_PAGE_CON, | |
298 | .range_max = DA9062AA_PAGE_CON, | |
299 | }, { | |
300 | .range_min = DA9062AA_FAULT_LOG, | |
301 | .range_max = DA9062AA_EVENT_C, | |
302 | }, { | |
303 | .range_min = DA9062AA_IRQ_MASK_A, | |
304 | .range_max = DA9062AA_IRQ_MASK_C, | |
305 | }, { | |
306 | .range_min = DA9062AA_CONTROL_A, | |
307 | .range_max = DA9062AA_GPIO_4, | |
308 | }, { | |
309 | .range_min = DA9062AA_GPIO_WKUP_MODE, | |
310 | .range_max = DA9062AA_BUCK4_CONT, | |
311 | }, { | |
312 | .range_min = DA9062AA_BUCK3_CONT, | |
313 | .range_max = DA9062AA_BUCK3_CONT, | |
314 | }, { | |
315 | .range_min = DA9062AA_LDO1_CONT, | |
316 | .range_max = DA9062AA_LDO4_CONT, | |
317 | }, { | |
318 | .range_min = DA9062AA_DVC_1, | |
319 | .range_max = DA9062AA_DVC_1, | |
320 | }, { | |
321 | .range_min = DA9062AA_COUNT_S, | |
322 | .range_max = DA9062AA_ALARM_Y, | |
323 | }, { | |
324 | .range_min = DA9062AA_SEQ, | |
325 | .range_max = DA9062AA_ID_4_3, | |
326 | }, { | |
327 | .range_min = DA9062AA_ID_12_11, | |
328 | .range_max = DA9062AA_ID_16_15, | |
329 | }, { | |
330 | .range_min = DA9062AA_ID_22_21, | |
331 | .range_max = DA9062AA_ID_32_31, | |
332 | }, { | |
333 | .range_min = DA9062AA_SEQ_A, | |
334 | .range_max = DA9062AA_BUCK3_CFG, | |
335 | }, { | |
336 | .range_min = DA9062AA_VBUCK2_A, | |
337 | .range_max = DA9062AA_VBUCK4_A, | |
338 | }, { | |
339 | .range_min = DA9062AA_VBUCK3_A, | |
340 | .range_max = DA9062AA_VBUCK3_A, | |
341 | }, { | |
342 | .range_min = DA9062AA_VLDO1_A, | |
343 | .range_max = DA9062AA_VLDO4_A, | |
344 | }, { | |
345 | .range_min = DA9062AA_VBUCK2_B, | |
346 | .range_max = DA9062AA_VBUCK4_B, | |
347 | }, { | |
348 | .range_min = DA9062AA_VBUCK3_B, | |
349 | .range_max = DA9062AA_VBUCK3_B, | |
350 | }, { | |
351 | .range_min = DA9062AA_VLDO1_B, | |
352 | .range_max = DA9062AA_VLDO4_B, | |
353 | }, { | |
354 | .range_min = DA9062AA_BBAT_CONT, | |
355 | .range_max = DA9062AA_BBAT_CONT, | |
356 | }, { | |
357 | .range_min = DA9062AA_GP_ID_0, | |
358 | .range_max = DA9062AA_GP_ID_19, | |
359 | }, | |
360 | }; | |
361 | ||
362 | static const struct regmap_range da9062_aa_volatile_ranges[] = { | |
363 | { | |
364 | .range_min = DA9062AA_PAGE_CON, | |
365 | .range_max = DA9062AA_STATUS_B, | |
366 | }, { | |
367 | .range_min = DA9062AA_STATUS_D, | |
368 | .range_max = DA9062AA_EVENT_C, | |
369 | }, { | |
370 | .range_min = DA9062AA_CONTROL_F, | |
371 | .range_max = DA9062AA_CONTROL_F, | |
372 | }, { | |
373 | .range_min = DA9062AA_COUNT_S, | |
374 | .range_max = DA9062AA_SECOND_D, | |
375 | }, | |
376 | }; | |
377 | ||
378 | static const struct regmap_access_table da9062_aa_readable_table = { | |
379 | .yes_ranges = da9062_aa_readable_ranges, | |
380 | .n_yes_ranges = ARRAY_SIZE(da9062_aa_readable_ranges), | |
381 | }; | |
382 | ||
383 | static const struct regmap_access_table da9062_aa_writeable_table = { | |
384 | .yes_ranges = da9062_aa_writeable_ranges, | |
385 | .n_yes_ranges = ARRAY_SIZE(da9062_aa_writeable_ranges), | |
386 | }; | |
387 | ||
388 | static const struct regmap_access_table da9062_aa_volatile_table = { | |
389 | .yes_ranges = da9062_aa_volatile_ranges, | |
390 | .n_yes_ranges = ARRAY_SIZE(da9062_aa_volatile_ranges), | |
391 | }; | |
392 | ||
393 | static const struct regmap_range_cfg da9062_range_cfg[] = { | |
394 | { | |
395 | .range_min = DA9062AA_PAGE_CON, | |
396 | .range_max = DA9062AA_CONFIG_ID, | |
397 | .selector_reg = DA9062AA_PAGE_CON, | |
398 | .selector_mask = 1 << DA9062_I2C_PAGE_SEL_SHIFT, | |
399 | .selector_shift = DA9062_I2C_PAGE_SEL_SHIFT, | |
400 | .window_start = 0, | |
401 | .window_len = 256, | |
402 | } | |
403 | }; | |
404 | ||
405 | static struct regmap_config da9062_regmap_config = { | |
406 | .reg_bits = 8, | |
407 | .val_bits = 8, | |
408 | .ranges = da9062_range_cfg, | |
409 | .num_ranges = ARRAY_SIZE(da9062_range_cfg), | |
410 | .max_register = DA9062AA_CONFIG_ID, | |
411 | .cache_type = REGCACHE_RBTREE, | |
412 | .rd_table = &da9062_aa_readable_table, | |
413 | .wr_table = &da9062_aa_writeable_table, | |
414 | .volatile_table = &da9062_aa_volatile_table, | |
415 | }; | |
416 | ||
417 | static int da9062_i2c_probe(struct i2c_client *i2c, | |
418 | const struct i2c_device_id *id) | |
419 | { | |
420 | struct da9062 *chip; | |
421 | unsigned int irq_base; | |
422 | int ret; | |
423 | ||
424 | chip = devm_kzalloc(&i2c->dev, sizeof(*chip), GFP_KERNEL); | |
425 | if (!chip) | |
426 | return -ENOMEM; | |
427 | ||
428 | i2c_set_clientdata(i2c, chip); | |
429 | chip->dev = &i2c->dev; | |
430 | ||
431 | if (!i2c->irq) { | |
432 | dev_err(chip->dev, "No IRQ configured\n"); | |
433 | return -EINVAL; | |
434 | } | |
435 | ||
436 | chip->regmap = devm_regmap_init_i2c(i2c, &da9062_regmap_config); | |
437 | if (IS_ERR(chip->regmap)) { | |
438 | ret = PTR_ERR(chip->regmap); | |
439 | dev_err(chip->dev, "Failed to allocate register map: %d\n", | |
440 | ret); | |
441 | return ret; | |
442 | } | |
443 | ||
444 | ret = da9062_clear_fault_log(chip); | |
445 | if (ret < 0) | |
446 | dev_warn(chip->dev, "Cannot clear fault log\n"); | |
447 | ||
448 | ret = get_device_type(chip); | |
449 | if (ret) | |
450 | return ret; | |
451 | ||
452 | ret = regmap_add_irq_chip(chip->regmap, i2c->irq, | |
453 | IRQF_TRIGGER_LOW | IRQF_ONESHOT | IRQF_SHARED, | |
454 | -1, &da9062_irq_chip, | |
455 | &chip->regmap_irq); | |
456 | if (ret) { | |
457 | dev_err(chip->dev, "Failed to request IRQ %d: %d\n", | |
458 | i2c->irq, ret); | |
459 | return ret; | |
460 | } | |
461 | ||
462 | irq_base = regmap_irq_chip_get_base(chip->regmap_irq); | |
463 | ||
464 | ret = mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, da9062_devs, | |
465 | ARRAY_SIZE(da9062_devs), NULL, irq_base, | |
466 | NULL); | |
467 | if (ret) { | |
468 | dev_err(chip->dev, "Cannot register child devices\n"); | |
469 | regmap_del_irq_chip(i2c->irq, chip->regmap_irq); | |
470 | return ret; | |
471 | } | |
472 | ||
473 | return ret; | |
474 | } | |
475 | ||
476 | static int da9062_i2c_remove(struct i2c_client *i2c) | |
477 | { | |
478 | struct da9062 *chip = i2c_get_clientdata(i2c); | |
479 | ||
480 | mfd_remove_devices(chip->dev); | |
481 | regmap_del_irq_chip(i2c->irq, chip->regmap_irq); | |
482 | ||
483 | return 0; | |
484 | } | |
485 | ||
486 | static const struct i2c_device_id da9062_i2c_id[] = { | |
487 | { "da9062", 0 }, | |
488 | { }, | |
489 | }; | |
490 | MODULE_DEVICE_TABLE(i2c, da9062_i2c_id); | |
491 | ||
492 | static const struct of_device_id da9062_dt_ids[] = { | |
493 | { .compatible = "dlg,da9062", }, | |
494 | { } | |
495 | }; | |
496 | MODULE_DEVICE_TABLE(of, da9062_dt_ids); | |
497 | ||
498 | static struct i2c_driver da9062_i2c_driver = { | |
499 | .driver = { | |
500 | .name = "da9062", | |
501 | .of_match_table = of_match_ptr(da9062_dt_ids), | |
502 | }, | |
503 | .probe = da9062_i2c_probe, | |
504 | .remove = da9062_i2c_remove, | |
505 | .id_table = da9062_i2c_id, | |
506 | }; | |
507 | ||
508 | module_i2c_driver(da9062_i2c_driver); | |
509 | ||
510 | MODULE_DESCRIPTION("Core device driver for Dialog DA9062"); | |
511 | MODULE_AUTHOR("Steve Twiss <stwiss.opensource@diasemi.com>"); | |
512 | MODULE_LICENSE("GPL"); |