hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/wm831x-core.c
....@@ -1,19 +1,15 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * wm831x-core.c -- Device access for Wolfson WM831x PMICs
34 *
45 * Copyright 2009 Wolfson Microelectronics PLC.
56 *
67 * 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
- *
138 */
149
1510 #include <linux/kernel.h>
16
-#include <linux/module.h>
11
+#include <linux/init.h>
12
+#include <linux/export.h>
1713 #include <linux/bcd.h>
1814 #include <linux/delay.h>
1915 #include <linux/mfd/core.h>
....@@ -33,7 +29,7 @@
3329 /* Current settings - values are 2*2^(reg_val/4) microamps. These are
3430 * exported since they are used by multiple drivers.
3531 */
36
-int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = {
32
+const unsigned int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = {
3733 2,
3834 2,
3935 3,
....@@ -118,6 +114,8 @@
118114 * The WM831x has a user key preventing writes to particularly
119115 * critical registers. This function locks those registers,
120116 * allowing writes to them.
117
+ *
118
+ * @wm831x: pointer to local driver data structure
121119 */
122120 void wm831x_reg_lock(struct wm831x *wm831x)
123121 {
....@@ -144,6 +142,8 @@
144142 * The WM831x has a user key preventing writes to particularly
145143 * critical registers. This function locks those registers,
146144 * preventing spurious writes.
145
+ *
146
+ * @wm831x: pointer to local driver data structure
147147 */
148148 int wm831x_reg_unlock(struct wm831x *wm831x)
149149 {
....@@ -1892,14 +1892,6 @@
18921892 return ret;
18931893 }
18941894
1895
-void wm831x_device_exit(struct wm831x *wm831x)
1896
-{
1897
- wm831x_otp_exit(wm831x);
1898
- mfd_remove_devices(wm831x->dev);
1899
- free_irq(wm831x_irq(wm831x, WM831X_IRQ_AUXADC_DATA), wm831x);
1900
- wm831x_irq_exit(wm831x);
1901
-}
1902
-
19031895 int wm831x_device_suspend(struct wm831x *wm831x)
19041896 {
19051897 int reg, mask;
....@@ -1944,7 +1936,3 @@
19441936 }
19451937 }
19461938 EXPORT_SYMBOL_GPL(wm831x_device_shutdown);
1947
-
1948
-MODULE_DESCRIPTION("Core support for the WM831X AudioPlus PMIC");
1949
-MODULE_LICENSE("GPL");
1950
-MODULE_AUTHOR("Mark Brown");