@@ -117,26 +117,19 @@ static struct regulator_ops as3711_dldo_ops = {
117117};
118118
119119static const struct regulator_linear_range as3711_sd_ranges [] = {
120- { .min_uV = 612500 , .max_uV = 1400000 ,
121- .min_sel = 0x1 , .max_sel = 0x40 , .uV_step = 12500 },
122- { .min_uV = 1425000 , .max_uV = 2600000 ,
123- .min_sel = 0x41 , .max_sel = 0x70 , .uV_step = 25000 },
124- { .min_uV = 2650000 , .max_uV = 3350000 ,
125- .min_sel = 0x71 , .max_sel = 0x7f , .uV_step = 50000 },
120+ REGULATOR_LINEAR_RANGE (612500 , 0x1 , 0x40 , 12500 ),
121+ REGULATOR_LINEAR_RANGE (1425000 , 0x41 , 0x70 , 25000 ),
122+ REGULATOR_LINEAR_RANGE (2650000 , 0x71 , 0x7f , 50000 ),
126123};
127124
128125static const struct regulator_linear_range as3711_aldo_ranges [] = {
129- { .min_uV = 1200000 , .max_uV = 1950000 ,
130- .min_sel = 0 , .max_sel = 0xf , .uV_step = 50000 },
131- { .min_uV = 1800000 , .max_uV = 3300000 ,
132- .min_sel = 0x10 , .max_sel = 0x1f , .uV_step = 100000 },
126+ REGULATOR_LINEAR_RANGE (1200000 , 0 , 0xf , 50000 ),
127+ REGULATOR_LINEAR_RANGE (1800000 , 0x10 , 0x1f , 100000 ),
133128};
134129
135130static const struct regulator_linear_range as3711_dldo_ranges [] = {
136- { .min_uV = 900000 , .max_uV = 1700000 ,
137- .min_sel = 0 , .max_sel = 0x10 , .uV_step = 50000 },
138- { .min_uV = 1750000 , .max_uV = 3300000 ,
139- .min_sel = 0x20 , .max_sel = 0x3f , .uV_step = 50000 },
131+ REGULATOR_LINEAR_RANGE (900000 , 0 , 0x10 , 50000 ),
132+ REGULATOR_LINEAR_RANGE (1750000 , 0x20 , 0x3f , 50000 ),
140133};
141134
142135#define AS3711_REG (_id , _en_reg , _en_bit , _vmask , _vshift , _min_uV , _max_uV , _sfx ) \
0 commit comments