UPSTREAM: regulator: fan53555: fix tcs4525 function names

The tcs4525 is based off the fan53526.
Rename the tcs4525 functions to align with this.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210511211335.2935163-4-pgwipeout@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit b3cc8ec04f)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I553a8f6b28386d78edb9db36f72c0f4b93bc2b76
This commit is contained in:
Peter Geis
2021-05-11 17:13:35 -04:00
committed by Tao Huang
parent 73b5c3105e
commit c998ab0bed

View File

@@ -67,7 +67,7 @@ enum fan53555_vendor {
FAN53526_VENDOR_FAIRCHILD = 0,
FAN53555_VENDOR_FAIRCHILD,
FAN53555_VENDOR_SILERGY,
FAN53555_VENDOR_TCS,
FAN53526_VENDOR_TCS,
};
enum {
@@ -239,7 +239,7 @@ static int fan53555_set_ramp(struct regulator_dev *rdev, int ramp)
slew_rate_t = slew_rates;
slew_rate_n = ARRAY_SIZE(slew_rates);
break;
case FAN53555_VENDOR_TCS:
case FAN53526_VENDOR_TCS:
slew_rate_t = tcs_slew_rates;
slew_rate_n = ARRAY_SIZE(tcs_slew_rates);
break;
@@ -376,7 +376,7 @@ static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di)
return 0;
}
static int fan53555_voltages_setup_tcs(struct fan53555_device_info *di)
static int fan53526_voltages_setup_tcs(struct fan53555_device_info *di)
{
switch (di->chip_id) {
case TCS4525_CHIP_ID_12:
@@ -426,7 +426,7 @@ static int fan53555_device_setup(struct fan53555_device_info *di,
return -EINVAL;
}
break;
case FAN53555_VENDOR_TCS:
case FAN53526_VENDOR_TCS:
switch (pdata->sleep_vsel_id) {
case FAN53555_VSEL_ID_0:
di->sleep_reg = TCS4525_VSEL0;
@@ -465,7 +465,7 @@ static int fan53555_device_setup(struct fan53555_device_info *di,
di->mode_reg = di->vol_reg;
di->mode_mask = VSEL_MODE;
break;
case FAN53555_VENDOR_TCS:
case FAN53526_VENDOR_TCS:
di->mode_reg = TCS4525_COMMAND;
switch (pdata->sleep_vsel_id) {
@@ -493,8 +493,8 @@ static int fan53555_device_setup(struct fan53555_device_info *di,
case FAN53555_VENDOR_SILERGY:
ret = fan53555_voltages_setup_silergy(di);
break;
case FAN53555_VENDOR_TCS:
ret = fan53555_voltages_setup_tcs(di);
case FAN53526_VENDOR_TCS:
ret = fan53526_voltages_setup_tcs(di);
break;
default:
dev_err(di->dev, "vendor %d not supported!\n", di->vendor);
@@ -569,7 +569,7 @@ static const struct of_device_id __maybe_unused fan53555_dt_ids[] = {
.data = (void *)FAN53555_VENDOR_SILERGY,
}, {
.compatible = "tcs,tcs4525",
.data = (void *)FAN53555_VENDOR_TCS
.data = (void *)FAN53526_VENDOR_TCS
},
{ }
};
@@ -679,7 +679,7 @@ static const struct i2c_device_id fan53555_id[] = {
.driver_data = FAN53555_VENDOR_SILERGY
}, {
.name = "tcs4525",
.driver_data = FAN53555_VENDOR_TCS
.driver_data = FAN53526_VENDOR_TCS
},
{ },
};