.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * wm831x-core.c -- Device access for Wolfson WM831x PMICs |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2009 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> |
---|
| 12 | +#include <linux/export.h> |
---|
17 | 13 | #include <linux/bcd.h> |
---|
18 | 14 | #include <linux/delay.h> |
---|
19 | 15 | #include <linux/mfd/core.h> |
---|
.. | .. |
---|
33 | 29 | /* Current settings - values are 2*2^(reg_val/4) microamps. These are |
---|
34 | 30 | * exported since they are used by multiple drivers. |
---|
35 | 31 | */ |
---|
36 | | -int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = { |
---|
| 32 | +const unsigned int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = { |
---|
37 | 33 | 2, |
---|
38 | 34 | 2, |
---|
39 | 35 | 3, |
---|
.. | .. |
---|
118 | 114 | * The WM831x has a user key preventing writes to particularly |
---|
119 | 115 | * critical registers. This function locks those registers, |
---|
120 | 116 | * allowing writes to them. |
---|
| 117 | + * |
---|
| 118 | + * @wm831x: pointer to local driver data structure |
---|
121 | 119 | */ |
---|
122 | 120 | void wm831x_reg_lock(struct wm831x *wm831x) |
---|
123 | 121 | { |
---|
.. | .. |
---|
144 | 142 | * The WM831x has a user key preventing writes to particularly |
---|
145 | 143 | * critical registers. This function locks those registers, |
---|
146 | 144 | * preventing spurious writes. |
---|
| 145 | + * |
---|
| 146 | + * @wm831x: pointer to local driver data structure |
---|
147 | 147 | */ |
---|
148 | 148 | int wm831x_reg_unlock(struct wm831x *wm831x) |
---|
149 | 149 | { |
---|
.. | .. |
---|
1892 | 1892 | return ret; |
---|
1893 | 1893 | } |
---|
1894 | 1894 | |
---|
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 | | - |
---|
1903 | 1895 | int wm831x_device_suspend(struct wm831x *wm831x) |
---|
1904 | 1896 | { |
---|
1905 | 1897 | int reg, mask; |
---|
.. | .. |
---|
1944 | 1936 | } |
---|
1945 | 1937 | } |
---|
1946 | 1938 | 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"); |
---|