forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
kernel/drivers/regulator/max8907-regulator.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * max8907-regulator.c -- support regulators in max8907
34 *
....@@ -8,10 +9,6 @@
89 * Copyright 2010 Texas Instruments Inc.
910 * Author: Graeme Gregory <gg@slimlogic.co.uk>
1011 * Author: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2 as
14
- * published by the Free Software Foundation.
1512 */
1613
1714 #include <linux/err.h>
....@@ -112,7 +109,7 @@
112109 static const struct regulator_ops max8907_mbatt_ops = {
113110 };
114111
115
-static struct regulator_ops max8907_ldo_ops = {
112
+static const struct regulator_ops max8907_ldo_ops = {
116113 .list_voltage = regulator_list_voltage_linear,
117114 .set_voltage_sel = regulator_set_voltage_sel_regmap,
118115 .get_voltage_sel = regulator_get_voltage_sel_regmap,
....@@ -131,7 +128,7 @@
131128 .list_voltage = regulator_list_voltage_linear,
132129 };
133130
134
-static struct regulator_ops max8907_out5v_ops = {
131
+static const struct regulator_ops max8907_out5v_ops = {
135132 .list_voltage = regulator_list_voltage_linear,
136133 .enable = regulator_enable_regmap,
137134 .disable = regulator_disable_regmap,
....@@ -148,7 +145,7 @@
148145 .get_voltage_sel = regulator_get_voltage_sel_regmap,
149146 };
150147
151
-static struct regulator_desc max8907_regulators[] = {
148
+static const struct regulator_desc max8907_regulators[] = {
152149 REG_MBATT(),
153150 REG_LDO(SD1, "in-v1", MAX8907_REG_SDCTL1, 650000, 2225000, 25000),
154151 REG_LDO(SD2, "in-v2", MAX8907_REG_SDCTL2, 637500, 1425000, 12500),