[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] regulator: Provide a check for dummy regulator
On 19 April 2012 21:59, Mark Brown <> wrote:
> On Thu, Apr 19, 2012 at 07:35:03PM +0530, Jassi Brar wrote:
>> Another POV is :
>>   Is a consumer's need, to know if the gotten regulator is a real
>> or a dummy one, reasonable ?
> Absolutely not, you're completely failing to understand what I said
> about abstraction here.  *Nothing* about this is anything to do with
> dummy regulators in the slightest, it's about supplies which are already
> on at the time the driver powers the device up.  Doing this for dummy
> regulators is not helpful, being enabled isn't in the slightest bit tied
> to the fact that the regulator is a dummy regulator and it's silly to
> optimise this only in the specific case where a dummy regulator (which
> is in the first place only a crutch to keep systems with buggy regulator
> setups going) is being used is silly.
> I'd suggest checking with regulator_is_enabled() prior to power up, or
> adding a notifier for physical enable events and using that.
Sorry for being slow.
How would you suggest one works out the following arrangement ?

Say, an audio CODEC chip has a simple PLL1 run by main voltage
domain(Vmain). PLL1 can only support 11025x sample rates.
Another PLL2 on the chip, powered by optional supply Vaux, could
provide 8000x sample rates. Obviously low-end platforms could choose
to not provide Vaux.

The platform has some other drivers that need to have dummy regulator
support enabled.

How is the CODEC driver supposed to know if 'vaux' is actually present?
Because if it isn't present, the driver wouldn't declare support for
8000x rates.
regulator_get() would always succeed, and regulator_is_enabled() would
always return 1, even if the vaux is not supplied.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-04-20 09:35    [W:0.101 / U:4.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site