diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 6a419b3358e9..9924740c95f8 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -116,7 +116,7 @@ #define RK817_DESC(_id, _match, _supply, _min, _max, _step, _vreg, \ _vmask, _ereg, _emask, _enval, _disval, _etime) \ - [_id] = { \ + { \ .name = (_match), \ .supply_name = (_supply), \ .of_match = of_match_ptr(_match), \ @@ -139,7 +139,7 @@ #define RK817_BOOST_DESC(_id, _match, _supply, _min, _max, _step, _vreg,\ _vmask, _ereg, _emask, _enval, _disval, _etime, m_drop) \ - [_id] = { \ + { \ .name = (_match), \ .supply_name = (_supply), \ .of_match = of_match_ptr(_match), \ @@ -177,7 +177,7 @@ #define RK817_DESC_SWITCH(_id, _match, _supply, _ereg, _emask,\ _enval, _disval) \ - [_id] = { \ + { \ .name = (_match), \ .supply_name = (_supply), \ .of_match = of_match_ptr(_match), \ @@ -1401,7 +1401,26 @@ static const struct regulator_desc rk809_reg[] = { .of_map_mode = rk8xx_regulator_of_map_mode, .owner = THIS_MODULE, }, - + { + .name = "DCDC_REG5", + .supply_name = "vcc9", + .of_match = of_match_ptr("DCDC_REG5"), + .regulators_node = of_match_ptr("regulators"), + .id = RK809_ID_DCDC5, + .ops = &rk809_buck5_ops_range, + .type = REGULATOR_VOLTAGE, + .n_voltages = RK809_BUCK5_SEL_CNT, + .linear_ranges = rk809_buck5_voltage_ranges, + .n_linear_ranges = ARRAY_SIZE(rk809_buck5_voltage_ranges), + .vsel_reg = RK809_BUCK5_CONFIG(0), + .vsel_mask = RK809_BUCK5_VSEL_MASK, + .enable_reg = RK817_POWER_EN_REG(3), + .enable_mask = ENABLE_MASK(1), + .enable_val = ENABLE_MASK(1), + .disable_val = DISABLE_VAL(1), + .of_map_mode = rk8xx_regulator_of_map_mode, + .owner = THIS_MODULE, + }, RK817_DESC(RK817_ID_LDO1, "LDO_REG1", "vcc5", 600, 3400, 25, RK817_LDO_ON_VSEL_REG(0), RK817_LDO_VSEL_MASK, RK817_POWER_EN_REG(1), ENABLE_MASK(0), ENABLE_MASK(0), @@ -1438,26 +1457,6 @@ static const struct regulator_desc rk809_reg[] = { RK817_LDO_ON_VSEL_REG(8), RK817_LDO_VSEL_MASK, RK817_POWER_EN_REG(3), ENABLE_MASK(0), ENABLE_MASK(0), DISABLE_VAL(0), 400), - { - .name = "DCDC_REG5", - .supply_name = "vcc9", - .of_match = of_match_ptr("DCDC_REG5"), - .regulators_node = of_match_ptr("regulators"), - .id = RK809_ID_DCDC5, - .ops = &rk809_buck5_ops_range, - .type = REGULATOR_VOLTAGE, - .n_voltages = RK809_BUCK5_SEL_CNT, - .linear_ranges = rk809_buck5_voltage_ranges, - .n_linear_ranges = ARRAY_SIZE(rk809_buck5_voltage_ranges), - .vsel_reg = RK809_BUCK5_CONFIG(0), - .vsel_mask = RK809_BUCK5_VSEL_MASK, - .enable_reg = RK817_POWER_EN_REG(3), - .enable_mask = ENABLE_MASK(1), - .enable_val = ENABLE_MASK(1), - .disable_val = DISABLE_VAL(1), - .of_map_mode = rk8xx_regulator_of_map_mode, - .owner = THIS_MODULE, - }, RK817_DESC_SWITCH(RK809_ID_SW1, "SWITCH_REG1", "vcc8", RK817_POWER_EN_REG(3), ENABLE_MASK(3), ENABLE_MASK(3), DISABLE_VAL(3)),