.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Base driver for Analog Devices ADP5520/ADP5501 MFD PMICs |
---|
3 | 4 | * LCD Backlight: drivers/video/backlight/adp5520_bl |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * Copyright 2009 Analog Devices Inc. |
---|
9 | 10 | * |
---|
| 11 | + * Author: Michael Hennerich <michael.hennerich@analog.com> |
---|
| 12 | + * |
---|
10 | 13 | * Derived from da903x: |
---|
11 | 14 | * Copyright (C) 2008 Compulab, Ltd. |
---|
12 | 15 | * Mike Rapoport <mike@compulab.co.il> |
---|
13 | 16 | * |
---|
14 | 17 | * Copyright (C) 2006-2008 Marvell International Ltd. |
---|
15 | 18 | * Eric Miao <eric.miao@marvell.com> |
---|
16 | | - * |
---|
17 | | - * Licensed under the GPL-2 or later. |
---|
18 | 19 | */ |
---|
19 | 20 | |
---|
20 | 21 | #include <linux/kernel.h> |
---|
21 | | -#include <linux/module.h> |
---|
| 22 | +#include <linux/init.h> |
---|
22 | 23 | #include <linux/platform_device.h> |
---|
23 | 24 | #include <linux/slab.h> |
---|
24 | 25 | #include <linux/interrupt.h> |
---|
.. | .. |
---|
304 | 305 | return ret; |
---|
305 | 306 | } |
---|
306 | 307 | |
---|
307 | | -static int adp5520_remove(struct i2c_client *client) |
---|
308 | | -{ |
---|
309 | | - struct adp5520_chip *chip = dev_get_drvdata(&client->dev); |
---|
310 | | - |
---|
311 | | - if (chip->irq) |
---|
312 | | - free_irq(chip->irq, chip); |
---|
313 | | - |
---|
314 | | - adp5520_remove_subdevs(chip); |
---|
315 | | - adp5520_write(chip->dev, ADP5520_MODE_STATUS, 0); |
---|
316 | | - return 0; |
---|
317 | | -} |
---|
318 | | - |
---|
319 | 308 | #ifdef CONFIG_PM_SLEEP |
---|
320 | 309 | static int adp5520_suspend(struct device *dev) |
---|
321 | 310 | { |
---|
.. | .. |
---|
346 | 335 | { "pmic-adp5501", ID_ADP5501 }, |
---|
347 | 336 | { } |
---|
348 | 337 | }; |
---|
349 | | -MODULE_DEVICE_TABLE(i2c, adp5520_id); |
---|
350 | 338 | |
---|
351 | 339 | static struct i2c_driver adp5520_driver = { |
---|
352 | 340 | .driver = { |
---|
353 | | - .name = "adp5520", |
---|
354 | | - .pm = &adp5520_pm, |
---|
| 341 | + .name = "adp5520", |
---|
| 342 | + .pm = &adp5520_pm, |
---|
| 343 | + .suppress_bind_attrs = true, |
---|
355 | 344 | }, |
---|
356 | 345 | .probe = adp5520_probe, |
---|
357 | | - .remove = adp5520_remove, |
---|
358 | 346 | .id_table = adp5520_id, |
---|
359 | 347 | }; |
---|
360 | | - |
---|
361 | | -module_i2c_driver(adp5520_driver); |
---|
362 | | - |
---|
363 | | -MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
---|
364 | | -MODULE_DESCRIPTION("ADP5520(01) PMIC-MFD Driver"); |
---|
365 | | -MODULE_LICENSE("GPL"); |
---|
| 348 | +builtin_i2c_driver(adp5520_driver); |
---|