@@ -125,12 +125,17 @@ static const struct linear_range bucks_ranges[] = {
125125 REGULATOR_LINEAR_RANGE (3400000 , 0x34 , 0x3f , 0 ),
126126};
127127
128- static const struct linear_range ldos_1_2_ranges [] = {
128+ static const struct linear_range ldo_1_range [] = {
129129 REGULATOR_LINEAR_RANGE (600000 , 0x0 , 0x37 , 50000 ),
130130 REGULATOR_LINEAR_RANGE (3400000 , 0x38 , 0x3f , 0 ),
131131};
132132
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 [] = {
134139 REGULATOR_LINEAR_RANGE (1200000 , 0x0 , 0xC , 0 ),
135140 REGULATOR_LINEAR_RANGE (1250000 , 0xD , 0x35 , 50000 ),
136141 REGULATOR_LINEAR_RANGE (3300000 , 0x36 , 0x3F , 0 ),
@@ -174,7 +179,7 @@ static unsigned int tps65219_get_mode(struct regulator_dev *dev)
174179}
175180
176181/* Operations permitted on BUCK1/2/3 */
177- static const struct regulator_ops tps65219_bucks_ops = {
182+ static const struct regulator_ops bucks_ops = {
178183 .is_enabled = regulator_is_enabled_regmap ,
179184 .enable = regulator_enable_regmap ,
180185 .disable = regulator_disable_regmap ,
@@ -189,7 +194,7 @@ static const struct regulator_ops tps65219_bucks_ops = {
189194};
190195
191196/* 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 = {
193198 .is_enabled = regulator_is_enabled_regmap ,
194199 .enable = regulator_enable_regmap ,
195200 .disable = regulator_disable_regmap ,
@@ -204,7 +209,7 @@ static const struct regulator_ops tps65219_ldos_1_2_ops = {
204209};
205210
206211/* 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 = {
208213 .is_enabled = regulator_is_enabled_regmap ,
209214 .enable = regulator_enable_regmap ,
210215 .disable = regulator_disable_regmap ,
@@ -218,53 +223,53 @@ static const struct regulator_ops tps65219_ldos_3_4_ops = {
218223
219224static const struct regulator_desc regulators [] = {
220225 TPS65219_REGULATOR ("BUCK1" , "buck1" , TPS65219_BUCK_1 ,
221- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
226+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
222227 TPS65219_REG_BUCK1_VOUT ,
223228 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
224229 TPS65219_REG_ENABLE_CTRL ,
225230 TPS65219_ENABLE_BUCK1_EN_MASK , 0 , 0 , bucks_ranges ,
226231 3 , 4000 , 0 , NULL , 0 , 0 ),
227232 TPS65219_REGULATOR ("BUCK2" , "buck2" , TPS65219_BUCK_2 ,
228- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
233+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
229234 TPS65219_REG_BUCK2_VOUT ,
230235 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
231236 TPS65219_REG_ENABLE_CTRL ,
232237 TPS65219_ENABLE_BUCK2_EN_MASK , 0 , 0 , bucks_ranges ,
233238 3 , 4000 , 0 , NULL , 0 , 0 ),
234239 TPS65219_REGULATOR ("BUCK3" , "buck3" , TPS65219_BUCK_3 ,
235- REGULATOR_VOLTAGE , tps65219_bucks_ops , 64 ,
240+ REGULATOR_VOLTAGE , bucks_ops , 64 ,
236241 TPS65219_REG_BUCK3_VOUT ,
237242 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
238243 TPS65219_REG_ENABLE_CTRL ,
239244 TPS65219_ENABLE_BUCK3_EN_MASK , 0 , 0 , bucks_ranges ,
240245 3 , 0 , 0 , NULL , 0 , 0 ),
241246 TPS65219_REGULATOR ("LDO1" , "ldo1" , TPS65219_LDO_1 ,
242- REGULATOR_VOLTAGE , tps65219_ldos_1_2_ops , 64 ,
247+ REGULATOR_VOLTAGE , ldos_1_2_ops , 64 ,
243248 TPS65219_REG_LDO1_VOUT ,
244249 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
245250 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 ,
247252 2 , 0 , 0 , NULL , 0 , TPS65219_LDOS_BYP_CONFIG_MASK ),
248253 TPS65219_REGULATOR ("LDO2" , "ldo2" , TPS65219_LDO_2 ,
249- REGULATOR_VOLTAGE , tps65219_ldos_1_2_ops , 64 ,
254+ REGULATOR_VOLTAGE , ldos_1_2_ops , 64 ,
250255 TPS65219_REG_LDO2_VOUT ,
251256 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
252257 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 ,
254259 2 , 0 , 0 , NULL , 0 , TPS65219_LDOS_BYP_CONFIG_MASK ),
255260 TPS65219_REGULATOR ("LDO3" , "ldo3" , TPS65219_LDO_3 ,
256- REGULATOR_VOLTAGE , tps65219_ldos_3_4_ops , 64 ,
261+ REGULATOR_VOLTAGE , ldos_3_4_ops , 64 ,
257262 TPS65219_REG_LDO3_VOUT ,
258263 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
259264 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 ,
261266 3 , 0 , 0 , NULL , 0 , 0 ),
262267 TPS65219_REGULATOR ("LDO4" , "ldo4" , TPS65219_LDO_4 ,
263- REGULATOR_VOLTAGE , tps65219_ldos_3_4_ops , 64 ,
268+ REGULATOR_VOLTAGE , ldos_3_4_ops , 64 ,
264269 TPS65219_REG_LDO4_VOUT ,
265270 TPS65219_BUCKS_LDOS_VOUT_VSET_MASK ,
266271 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 ,
268273 3 , 0 , 0 , NULL , 0 , 0 ),
269274};
270275
0 commit comments