forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 ea08eeccae9297f7aabd2ef7f0c2517ac4549acc
kernel/drivers/regulator/rn5t618-regulator.c
....@@ -1,14 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Regulator driver for Ricoh RN5T618 PMIC
34 *
45 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * version 2 as published by the Free Software Foundation.
9
- *
10
- * You should have received a copy of the GNU General Public License
11
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
126 */
137
148 #include <linux/mfd/rn5t618.h>
....@@ -46,7 +40,7 @@
4640 .vsel_mask = (vmask), \
4741 }
4842
49
-static struct regulator_desc rn5t567_regulators[] = {
43
+static const struct regulator_desc rn5t567_regulators[] = {
5044 /* DCDC */
5145 REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500),
5246 REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500),
....@@ -63,7 +57,7 @@
6357 REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000),
6458 };
6559
66
-static struct regulator_desc rn5t618_regulators[] = {
60
+static const struct regulator_desc rn5t618_regulators[] = {
6761 /* DCDC */
6862 REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500),
6963 REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500),
....@@ -79,7 +73,7 @@
7973 REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000),
8074 };
8175
82
-static struct regulator_desc rc5t619_regulators[] = {
76
+static const struct regulator_desc rc5t619_regulators[] = {
8377 /* DCDC */
8478 REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500),
8579 REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500),
....@@ -96,7 +90,7 @@
9690 REG(LDO7, LDOEN1, BIT(6), LDO7DAC, 0x7f, 900000, 3500000, 25000),
9791 REG(LDO8, LDOEN1, BIT(7), LDO8DAC, 0x7f, 900000, 3500000, 25000),
9892 REG(LDO9, LDOEN2, BIT(0), LDO9DAC, 0x7f, 900000, 3500000, 25000),
99
- REG(LDO10, LDOEN2, BIT(0), LDO10DAC, 0x7f, 900000, 3500000, 25000),
93
+ REG(LDO10, LDOEN2, BIT(1), LDO10DAC, 0x7f, 900000, 3500000, 25000),
10094 /* LDO RTC */
10195 REG(LDORTC1, LDOEN2, BIT(4), LDORTCDAC, 0x7f, 1700000, 3500000, 25000),
10296 REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000),
....@@ -107,7 +101,7 @@
107101 struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent);
108102 struct regulator_config config = { };
109103 struct regulator_dev *rdev;
110
- struct regulator_desc *regulators;
104
+ const struct regulator_desc *regulators;
111105 int i;
112106 int num_regulators = 0;
113107