static struct regulator_ops max8997_charger_fixedstate_ops = {
.is_enabled = max8997_reg_is_enabled,
-- .get_current_limit = max8997_get_voltage,
-- .set_current_limit = max8997_set_voltage_ldobuck_wrap,
++ .get_current_limit = max8997_get_current_limit,
++ .set_current_limit = max8997_set_current_limit,
};
- #define regulator_desc_ldo(num) { \
- .name = "LDO"#num, \
- .id = MAX8997_LDO##num, \
- .ops = &max8997_ldo_ops, \
+ #define MAX8997_VOLTAGE_REGULATOR(_name, _ops) {\
+ .name = #_name, \
+ .id = MAX8997_##_name, \
+ .ops = &_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
}