lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: Provide a check for dummy regulator
On Fri, Apr 20, 2012 at 01:02:06PM +0530, Jassi Brar wrote:

> 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.

This is just one of those cases that won't ever work well with dummy
regulators - the whole reason you're supposed to actually specify the
supplies accurately and not use them is that we've got no way of telling
if the supply there or not from consumer drivers as we just
unconditionally claim that the supply is there.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-04-20 13:49    [W:0.064 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site