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]
Date:	Thu, 19 Apr 2012 17:29:13 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Jassi Brar <jaswinder.singh@...aro.org>
Cc:	linux-kernel@...r.kernel.org, lrg@...com
Subject: Re: [PATCH] regulator: Provide a check for dummy regulator

On Thu, Apr 19, 2012 at 07:35:03PM +0530, Jassi Brar wrote:

> I am talking about the delay the consumer driver might want after
> enabling the regulator for the end device to, say, initialize itself or
> perform POST or whatever.

> I do realize that such consumer drivers ought to know about the
> presence of the real regulator via platform_data(PD) or DT, but

No!  You're *completely* failing to understand the usage model of the
regulator API here, any driver doing this is clearly buggy.

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

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ