| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * wm831x-i2c.c -- I2C access for Wolfson WM831x PMICs |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2009,2010 Wolfson Microelectronics PLC. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | 8 | */ |
|---|
| 14 | 9 | |
|---|
| 15 | 10 | #include <linux/kernel.h> |
|---|
| 16 | | -#include <linux/module.h> |
|---|
| 11 | +#include <linux/init.h> |
|---|
| 17 | 12 | #include <linux/i2c.h> |
|---|
| 18 | 13 | #include <linux/delay.h> |
|---|
| 19 | 14 | #include <linux/mfd/core.h> |
|---|
| .. | .. |
|---|
| 68 | 63 | return wm831x_device_init(wm831x, i2c->irq); |
|---|
| 69 | 64 | } |
|---|
| 70 | 65 | |
|---|
| 71 | | -static int wm831x_i2c_remove(struct i2c_client *i2c) |
|---|
| 72 | | -{ |
|---|
| 73 | | - struct wm831x *wm831x = i2c_get_clientdata(i2c); |
|---|
| 74 | | - |
|---|
| 75 | | - wm831x_device_exit(wm831x); |
|---|
| 76 | | - |
|---|
| 77 | | - return 0; |
|---|
| 78 | | -} |
|---|
| 79 | | - |
|---|
| 80 | 66 | static int wm831x_i2c_suspend(struct device *dev) |
|---|
| 81 | 67 | { |
|---|
| 82 | 68 | struct wm831x *wm831x = dev_get_drvdata(dev); |
|---|
| .. | .. |
|---|
| 103 | 89 | { "wm8326", WM8326 }, |
|---|
| 104 | 90 | { } |
|---|
| 105 | 91 | }; |
|---|
| 106 | | -MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); |
|---|
| 107 | 92 | |
|---|
| 108 | 93 | static const struct dev_pm_ops wm831x_pm_ops = { |
|---|
| 109 | 94 | .suspend = wm831x_i2c_suspend, |
|---|
| .. | .. |
|---|
| 115 | 100 | .name = "wm831x", |
|---|
| 116 | 101 | .pm = &wm831x_pm_ops, |
|---|
| 117 | 102 | .of_match_table = of_match_ptr(wm831x_of_match), |
|---|
| 103 | + .suppress_bind_attrs = true, |
|---|
| 118 | 104 | }, |
|---|
| 119 | 105 | .probe = wm831x_i2c_probe, |
|---|
| 120 | | - .remove = wm831x_i2c_remove, |
|---|
| 121 | 106 | .id_table = wm831x_i2c_id, |
|---|
| 122 | 107 | }; |
|---|
| 123 | 108 | |
|---|
| .. | .. |
|---|
| 132 | 117 | return ret; |
|---|
| 133 | 118 | } |
|---|
| 134 | 119 | subsys_initcall(wm831x_i2c_init); |
|---|
| 135 | | - |
|---|
| 136 | | -static void __exit wm831x_i2c_exit(void) |
|---|
| 137 | | -{ |
|---|
| 138 | | - i2c_del_driver(&wm831x_i2c_driver); |
|---|
| 139 | | -} |
|---|
| 140 | | -module_exit(wm831x_i2c_exit); |
|---|