Skip to contentSkip to conversation

regulator: ab8500: ambiguous meaning of delay setting in struct ab8500_regulator_info

DISCUSSION Axel Lin 2 participants 2 messages Mar 27, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi,

The comment of struct ab8500_regulator_info says the delay means "startup/set voltage delay in us".
I'm confused by the meaning, does it mean enable_time or set_voltage_time_sel time or both?

* @enable_time: Time taken for the regulator voltage output voltage to
* stabilise after being enabled, in microseconds.

* @set_voltage_time_sel: Time taken for the regulator voltage output voltage

 *               to stabilise after being set to a new value, in microseconds.
 *               The function provides the from and to voltage selector, the
 *               function should return the worst case.

Current code only has delay setting for AB8500_LDO_TVOUT, it looks like it means enable_time rather than the delay for set_voltage_time_sel. (well, AB8500_LDO_TVOUT is fixed voltage, it does not implement set_voltage_time_sel)

ab8500_regulator_set_voltage_time_sel() returns info->delay, but all it's users (AB8500_LDO_AUX1, AB8500_LDO_AUX2, AB8500_LDO_AUX3, AB8500_LDO_INTCORE) do not has delay setting. ( So now ab8500_regulator_set_voltage_time_sel returns 0. )

Axel

#1 lore raw
Quoted 7 lines · Axel Lin

Hi,

The comment of struct ab8500_regulator_info says the delay means "startup/set voltage delay in us".
I'm confused by the meaning, does it mean enable_time or set_voltage_time_sel time or both?

Quoted 7 lines

* @enable_time: Time taken for the regulator voltage output voltage to
* stabilise after being enabled, in microseconds.

* @set_voltage_time_sel: Time taken for the regulator voltage output voltage

  *               to stabilise after being set to a new value, in microseconds.
  *               The function provides the from and to voltage selector, the
  *               function should return the worst case.

The data sheet does not specify time delay for voltage selection, only enable time. So I have assumed the same time for voltage selection.

Quoted 7 lines

Current code only has delay setting for AB8500_LDO_TVOUT, it looks like it means enable_time rather than the delay for set_voltage_time_sel. (well, AB8500_LDO_TVOUT is fixed voltage, it does not implement set_voltage_time_sel)

ab8500_regulator_set_voltage_time_sel() returns info->delay, but all it's users (AB8500_LDO_AUX1, AB8500_LDO_AUX2, AB8500_LDO_AUX3, AB8500_LDO_INTCORE) do not has delay setting. ( So now ab8500_regulator_set_voltage_time_sel returns 0. )

This is a flaw in the driver. It should specify delay for all regulators, not just VTVout.

Worst case enable time from data sheet:
Vana: enable time = 140 us Vaux1/2: enable time = 200 us
Vaux3: enable time = 450 us
Vintcore: enable time = 750 us Vamic1/2: enable time = 500 us
Vdmic: enable time = 420 us
VTVout: enable time = 500 us
Vaudio: enable time = 140 us
Vusb: enable time = 150 us

Quoted 3 lines

Axel

Thanks for looking into it.

Bengt