lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJe_Zhd0H6kXBhqdynuZqhbcPq8ARWu5SMbs=hQT2n8stzRvXQ@mail.gmail.com>
Date:	Fri, 20 Apr 2012 13:02:06 +0530
From:	Jassi Brar <jaswinder.singh@...aro.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, lrg@...com
Subject: Re: [PATCH] regulator: Provide a check for dummy regulator

On 19 April 2012 21:59, Mark Brown <broonie@...nsource.wolfsonmicro.com> 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.

Thanks,
-Jassi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ