.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * ROHM BD9571MWV-M regulator driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2017 Marek Vasut <marek.vasut+renesas@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 version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
---|
11 | | - * kind, whether expressed or implied; without even the implied warranty |
---|
12 | | - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License version 2 for more details. |
---|
14 | 6 | * |
---|
15 | 7 | * Based on the TPS65086 driver |
---|
16 | 8 | * |
---|
.. | .. |
---|
108 | 100 | } |
---|
109 | 101 | |
---|
110 | 102 | /* Operations permitted on AVS voltage regulator */ |
---|
111 | | -static struct regulator_ops avs_ops = { |
---|
| 103 | +static const struct regulator_ops avs_ops = { |
---|
112 | 104 | .set_voltage_sel = bd9571mwv_avs_set_voltage_sel_regmap, |
---|
113 | 105 | .map_voltage = regulator_map_voltage_linear, |
---|
114 | 106 | .get_voltage_sel = bd9571mwv_avs_get_voltage_sel_regmap, |
---|
.. | .. |
---|
116 | 108 | }; |
---|
117 | 109 | |
---|
118 | 110 | /* Operations permitted on voltage regulators */ |
---|
119 | | -static struct regulator_ops reg_ops = { |
---|
| 111 | +static const struct regulator_ops reg_ops = { |
---|
120 | 112 | .set_voltage_sel = bd9571mwv_reg_set_voltage_sel_regmap, |
---|
121 | 113 | .map_voltage = regulator_map_voltage_linear, |
---|
122 | 114 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
---|
.. | .. |
---|
124 | 116 | }; |
---|
125 | 117 | |
---|
126 | 118 | /* Operations permitted on voltage monitors */ |
---|
127 | | -static struct regulator_ops vid_ops = { |
---|
| 119 | +static const struct regulator_ops vid_ops = { |
---|
128 | 120 | .map_voltage = regulator_map_voltage_linear, |
---|
129 | 121 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
---|
130 | 122 | .list_voltage = regulator_list_voltage_linear, |
---|
131 | 123 | }; |
---|
132 | 124 | |
---|
133 | | -static struct regulator_desc regulators[] = { |
---|
| 125 | +static const struct regulator_desc regulators[] = { |
---|
134 | 126 | BD9571MWV_REG("VD09", "vd09", VD09, avs_ops, 0, 0x7f, |
---|
135 | 127 | 0x6f, 600000, 10000, 0x3c), |
---|
136 | 128 | BD9571MWV_REG("VD18", "vd18", VD18, vid_ops, BD9571MWV_VD18_VID, 0xf, |
---|