@@ -125,12 +125,17 @@ static const struct linear_range bucks_ranges[] = {
125
125
REGULATOR_LINEAR_RANGE (3400000 , 0x34 , 0x3f , 0 ),
126
126
};
127
127
128
- static const struct linear_range ldos_1_2_ranges [] = {
128
+ static const struct linear_range ldo_1_range [] = {
129
129
REGULATOR_LINEAR_RANGE (600000 , 0x0 , 0x37 , 50000 ),
130
130
REGULATOR_LINEAR_RANGE (3400000 , 0x38 , 0x3f , 0 ),
131
131
};
132
132
133
- static const struct linear_range ldos_3_4_ranges [] = {
133
+ static const struct linear_range tps65219_ldo_2_range [] = {
134
+ REGULATOR_LINEAR_RANGE (600000 , 0x0 , 0x37 , 50000 ),
135
+ REGULATOR_LINEAR_RANGE (3400000 , 0x38 , 0x3f , 0 ),
136
+ };
137
+
138
+ static const struct linear_range tps65219_ldos_3_4_range [] = {
134
139
REGULATOR_LINEAR_RANGE (1200000 , 0x0 , 0xC , 0 ),
135
140
REGULATOR_LINEAR_RANGE (1250000 , 0xD , 0x35 , 50000 ),
136
141
REGULATOR_LINEAR_RANGE (3300000 , 0x36 , 0x3F , 0 ),
@@ -174,7 +179,7 @@ static unsigned int tps65219_get_mode(struct regulator_dev *dev)
174
179
}
175
180
176
181
/* Operations permitted on BUCK1/2/3 */
177
- static const struct regulator_ops tps65219_bucks_ops = {
182
+ static const struct regulator_ops bucks_ops = {
178
183
.is_enabled = regulator_is_enabled_regmap ,
179
184
.enable = regulator_enable_regmap ,
180
185
.disable = regulator_disable_regmap ,
@@ -189,7 +194,7 @@ static const struct regulator_ops tps65219_bucks_ops = {
189
194
};
190
195
191
196
/* Operations permitted on LDO1/2 */
192
- static const struct regulator_ops tps65219_ldos_1_2_ops = {
197
+ static const struct regulator_ops ldos_1_2_ops = {
193
198
.is_enabled = regulator_is_enabled_regmap ,
194
199
.enable = regulator_enable_regmap ,
195
200
.disable = regulator_disable_regmap ,
@@ -204,7 +209,7 @@ static const struct regulator_ops tps65219_ldos_1_2_ops = {
204
209
};
205
210
206
211
/* Operations permitted on LDO3/4 */
207
- static const struct regulator_ops tps65219_ldos_3_4_ops = {
212
+ static const struct regulator_ops ldos_3_4_ops = {
208
213
.is_enabled = regulator_is_enabled_regmap ,
209
214
.enable = regulator_enable_regmap ,
210
215
.disable = regulator_disable_regmap ,
@@ -218,53 +223,53 @@ static const struct regulator_ops tps65219_ldos_3_4_ops = {
218
223
219
224
static const struct regulator_desc regulators [] = {
220
225
TPS65219_REGULATOR ("BUCK1" , "buck1" , TPS65219_BUCK_1 ,
221
- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
226
+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
222
227
TPS65219_REG_BUCK1_VOUT ,
223
228
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
224
229
TPS65219_REG_ENABLE_CTRL ,
225
230
TPS65219_ENABLE_BUCK1_EN_MASK , 0 , 0 , bucks_ranges ,
226
231
3 , 4000 , 0 , NULL , 0 , 0 ),
227
232
TPS65219_REGULATOR ("BUCK2" , "buck2" , TPS65219_BUCK_2 ,
228
- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
233
+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
229
234
TPS65219_REG_BUCK2_VOUT ,
230
235
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
231
236
TPS65219_REG_ENABLE_CTRL ,
232
237
TPS65219_ENABLE_BUCK2_EN_MASK , 0 , 0 , bucks_ranges ,
233
238
3 , 4000 , 0 , NULL , 0 , 0 ),
234
239
TPS65219_REGULATOR ("BUCK3" , "buck3" , TPS65219_BUCK_3 ,
235
- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
240
+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
236
241
TPS65219_REG_BUCK3_VOUT ,
237
242
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
238
243
TPS65219_REG_ENABLE_CTRL ,
239
244
TPS65219_ENABLE_BUCK3_EN_MASK , 0 , 0 , bucks_ranges ,
240
245
3 , 0 , 0 , NULL , 0 , 0 ),
241
246
TPS65219_REGULATOR ("LDO1" , "ldo1" , TPS65219_LDO_1 ,
242
- REGULATOR_VOLTAGE , tps65219_ldos_1_2_ops , 64 ,
247
+ REGULATOR_VOLTAGE , ldos_1_2_ops , 64 ,
243
248
TPS65219_REG_LDO1_VOUT ,
244
249
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
245
250
TPS65219_REG_ENABLE_CTRL ,
246
- TPS65219_ENABLE_LDO1_EN_MASK , 0 , 0 , ldos_1_2_ranges ,
251
+ TPS65219_ENABLE_LDO1_EN_MASK , 0 , 0 , ldo_1_range ,
247
252
2 , 0 , 0 , NULL , 0 , TPS65219_LDOS_BYP_CONFIG_MASK ),
248
253
TPS65219_REGULATOR ("LDO2" , "ldo2" , TPS65219_LDO_2 ,
249
- REGULATOR_VOLTAGE , tps65219_ldos_1_2_ops , 64 ,
254
+ REGULATOR_VOLTAGE , ldos_1_2_ops , 64 ,
250
255
TPS65219_REG_LDO2_VOUT ,
251
256
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
252
257
TPS65219_REG_ENABLE_CTRL ,
253
- TPS65219_ENABLE_LDO2_EN_MASK , 0 , 0 , ldos_1_2_ranges ,
258
+ TPS65219_ENABLE_LDO2_EN_MASK , 0 , 0 , tps65219_ldo_2_range ,
254
259
2 , 0 , 0 , NULL , 0 , TPS65219_LDOS_BYP_CONFIG_MASK ),
255
260
TPS65219_REGULATOR ("LDO3" , "ldo3" , TPS65219_LDO_3 ,
256
- REGULATOR_VOLTAGE , tps65219_ldos_3_4_ops , 64 ,
261
+ REGULATOR_VOLTAGE , ldos_3_4_ops , 64 ,
257
262
TPS65219_REG_LDO3_VOUT ,
258
263
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
259
264
TPS65219_REG_ENABLE_CTRL ,
260
- TPS65219_ENABLE_LDO3_EN_MASK , 0 , 0 , ldos_3_4_ranges ,
265
+ TPS65219_ENABLE_LDO3_EN_MASK , 0 , 0 , tps65219_ldos_3_4_range ,
261
266
3 , 0 , 0 , NULL , 0 , 0 ),
262
267
TPS65219_REGULATOR ("LDO4" , "ldo4" , TPS65219_LDO_4 ,
263
- REGULATOR_VOLTAGE , tps65219_ldos_3_4_ops , 64 ,
268
+ REGULATOR_VOLTAGE , ldos_3_4_ops , 64 ,
264
269
TPS65219_REG_LDO4_VOUT ,
265
270
TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
266
271
TPS65219_REG_ENABLE_CTRL ,
267
- TPS65219_ENABLE_LDO4_EN_MASK , 0 , 0 , ldos_3_4_ranges ,
272
+ TPS65219_ENABLE_LDO4_EN_MASK , 0 , 0 , tps65219_ldos_3_4_range ,
268
273
3 , 0 , 0 , NULL , 0 , 0 ),
269
274
};
270
275
0 commit comments