regulator: Fix for v6.16

One patch here from Heiko which fixes stability issues on some Rockchip
 platforms by implementing soft start support and providing startup time
 information for their regulators.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhUnj4ACgkQJNaLcl1U
 h9Cj0wf+OMIwBdsiXOVGTaX7C3WLtllaKOJ004k+TnRTDJvu9LWXXS0uGFgqwCu2
 BPuqERnUxZZfWzAm+3sBRBVAaOkcyWTOOfEP173l8caQxw2dZ98kYc5FnSQom23v
 ckIPFjF65IgDlLYHfXR1e7q3roU4Bdd5uVr6MT/fFqElx7vsYHz2nWeP7fhBTZiT
 G0oORp0ik8EOxgLlWrlSb5FYYJaUXsMpYgIWI/RcMLY1kmgNxf48mMODoyu7sge+
 30lZ4+ZMpKUdljV2Si4vkOI2Xes3KYL+TfCmr9K0ksdsbeOpKAdzwkflv/s9SBSn
 mWH4ihP4I416W9IadF8ooPGdqJ6g3w==
 =G5rO
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "One patch here from Heiko which fixes stability issues on some
  Rockchip platforms by implementing soft start support and providing
  startup time information for their regulators"

* tag 'regulator-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: fan53555: add enable_time support and soft-start times
This commit is contained in:
Linus Torvalds 2025-06-19 17:40:42 -07:00
commit e0990236bb

View File

@ -147,6 +147,7 @@ struct fan53555_device_info {
unsigned int slew_mask;
const unsigned int *ramp_delay_table;
unsigned int n_ramp_values;
unsigned int enable_time;
unsigned int slew_rate;
};
@ -282,6 +283,7 @@ static int fan53526_voltages_setup_fairchild(struct fan53555_device_info *di)
di->slew_mask = CTL_SLEW_MASK;
di->ramp_delay_table = slew_rates;
di->n_ramp_values = ARRAY_SIZE(slew_rates);
di->enable_time = 250;
di->vsel_count = FAN53526_NVOLTAGES;
return 0;
@ -296,10 +298,12 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di)
case FAN53555_CHIP_REV_00:
di->vsel_min = 600000;
di->vsel_step = 10000;
di->enable_time = 400;
break;
case FAN53555_CHIP_REV_13:
di->vsel_min = 800000;
di->vsel_step = 10000;
di->enable_time = 400;
break;
default:
dev_err(di->dev,
@ -311,13 +315,19 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di)
case FAN53555_CHIP_ID_01:
case FAN53555_CHIP_ID_03:
case FAN53555_CHIP_ID_05:
di->vsel_min = 600000;
di->vsel_step = 10000;
di->enable_time = 400;
break;
case FAN53555_CHIP_ID_08:
di->vsel_min = 600000;
di->vsel_step = 10000;
di->enable_time = 175;
break;
case FAN53555_CHIP_ID_04:
di->vsel_min = 603000;
di->vsel_step = 12826;
di->enable_time = 400;
break;
default:
dev_err(di->dev,
@ -350,6 +360,7 @@ static int fan53555_voltages_setup_rockchip(struct fan53555_device_info *di)
di->slew_mask = CTL_SLEW_MASK;
di->ramp_delay_table = slew_rates;
di->n_ramp_values = ARRAY_SIZE(slew_rates);
di->enable_time = 360;
di->vsel_count = FAN53555_NVOLTAGES;
return 0;
@ -372,6 +383,7 @@ static int rk8602_voltages_setup_rockchip(struct fan53555_device_info *di)
di->slew_mask = CTL_SLEW_MASK;
di->ramp_delay_table = slew_rates;
di->n_ramp_values = ARRAY_SIZE(slew_rates);
di->enable_time = 360;
di->vsel_count = RK8602_NVOLTAGES;
return 0;
@ -395,6 +407,7 @@ static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di)
di->slew_mask = CTL_SLEW_MASK;
di->ramp_delay_table = slew_rates;
di->n_ramp_values = ARRAY_SIZE(slew_rates);
di->enable_time = 400;
di->vsel_count = FAN53555_NVOLTAGES;
return 0;
@ -594,6 +607,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di,
rdesc->ramp_mask = di->slew_mask;
rdesc->ramp_delay_table = di->ramp_delay_table;
rdesc->n_ramp_values = di->n_ramp_values;
rdesc->enable_time = di->enable_time;
rdesc->owner = THIS_MODULE;
rdev = devm_regulator_register(di->dev, &di->desc, config);