]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/regulator/as3722-regulator.c
backlight: ltv350qv: use devm_lcd_device_register()
[karo-tx-linux.git] / drivers / regulator / as3722-regulator.c
index d7b71a9c41f1b0e96596d5c53a8327de4c9e7100..5917fe3dc983dc5335d62e393fe079459817d439 100644 (file)
@@ -435,18 +435,9 @@ static struct regulator_ops as3722_ldo3_extcntrl_ops = {
        .get_current_limit = as3722_ldo3_get_current_limit,
 };
 
-#define regulator_lin_range(_min_sel, _max_sel, _min_uV, _step_uV)     \
-       {                                                               \
-               .min_sel = _min_sel,                                    \
-               .max_sel = _max_sel,                                    \
-               .uV_step = _step_uV,                                    \
-               .min_uV = _min_uV,                                      \
-               .max_uV = _min_uV + (_max_sel - _min_sel) * _step_uV,   \
-       }
-
 static const struct regulator_linear_range as3722_ldo_ranges[] = {
-       regulator_lin_range(0x01, 0x24,  825000, 25000),
-       regulator_lin_range(0x40, 0x7F, 1725000, 25000),
+       REGULATOR_LINEAR_RANGE(825000, 0x01, 0x24, 25000),
+       REGULATOR_LINEAR_RANGE(1725000, 0x40, 0x7F, 25000),
 };
 
 static struct regulator_ops as3722_ldo_ops = {
@@ -605,9 +596,9 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev,
 }
 
 static const struct regulator_linear_range as3722_sd2345_ranges[] = {
-       regulator_lin_range(0x01, 0x40,  612500, 12500),
-       regulator_lin_range(0x41, 0x70, 1425000, 25000),
-       regulator_lin_range(0x71, 0x7F, 2650000, 50000),
+       REGULATOR_LINEAR_RANGE(612500, 0x01, 0x40, 12500),
+       REGULATOR_LINEAR_RANGE(1425000, 0x41, 0x70, 25000),
+       REGULATOR_LINEAR_RANGE(2650000, 0x71, 0x7F, 50000),
 };
 
 static struct regulator_ops as3722_sd016_ops = {