Skip to contentSkip to conversation

regulator: Policy for setting current limits

DISCUSSION Heiko Stübner 2 participants 4 messages Aug 5, 2012 – Aug 7, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I hit a problem when setting a current limit and am not sure whose fault it is (i.e. which component to change). Therefore I'd appreciate a pointer in the right direction.

After the recent changes the gpio-regulator always selects the minimal value to set. The gpio-vbus driver sets it's current limits as 0 - x mA (x = 100, 500). Therefore if 500mA are the upper limit but the regulator also supports lower values, these lower values always get selected (100mA in my case). In contrast pda_power sets the target current as both lower and upper limit.

So the question is, what is the correct way to handle this:

(a) let the gpio-regulator select the max current (in contrast to the minimum voltage)
(b) change gpio-vbus to also use the target current as min and max value
(c) something else

Thanks
Heiko

#1 lore raw
Quoted 3 lines · Heiko Stübner

500). Therefore if 500mA are the upper limit but the regulator also supports lower values, these lower values always get selected (100mA in my case). In contrast pda_power sets the target current as both lower and upper limit.

This isn't good, it means that the regulator has to be able to deliver exactly the limit requested.

Quoted 4 lines

(a) let the gpio-regulator select the max current (in contrast to the minimum voltage)
(b) change gpio-vbus to also use the target current as min and max value
(c) something else

Regulators should be tending to the maximum in the available range and consumers should specify the widest range possible so both a and b.

#2 lore raw

Am Montag, 6. August 2012, 13:56:33 schrieb Mark Brown:

Quoted 9 lines · Heiko Stübner
Quoted 4 lines

500). Therefore if 500mA are the upper limit but the regulator also supports lower values, these lower values always get selected (100mA in my case). In contrast pda_power sets the target current as both lower and upper limit.

This isn't good, it means that the regulator has to be able to deliver exactly the limit requested.

Quoted 7 lines
Quoted 4 lines

(a) let the gpio-regulator select the max current (in contrast to the minimum voltage)
(b) change gpio-vbus to also use the target current as min and max value
(c) something else

Regulators should be tending to the maximum in the available range and consumers should specify the widest range possible so both a and b.

Is this true for all regulators (i.e. voltage and currency regulators)?

Because 4dbd8f63f07a (regulator: gpio-regulator: Set the smallest voltage/current in the specified range) implemented the exact oposite.

Thanks
Heiko

#3 lore raw
Quoted 6 lines · Heiko Stübner

Am Montag, 6. August 2012, 13:56:33 schrieb Mark Brown:

Quoted 2 lines

Regulators should be tending to the maximum in the available range and consumers should specify the widest range possible so both a and b.

Is this true for all regulators (i.e. voltage and currency regulators)?

No, voltage regualtors should tend to the lowest voltage.