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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 22 Jun 2009 13:26:43 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	"Aggarwal, Anuj" <anuj.aggarwal@...com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"lrg@...mlogic.co.uk" <lrg@...mlogic.co.uk>
Subject: Re: Regulator enable called without increasing the use_count

On Mon, Jun 22, 2009 at 05:06:36PM +0530, Aggarwal, Anuj wrote:

> Why is it designed like that? Should I enable it again and then call the 
> disable()?

It's like that because regulators can be shared between mulitple
consumers.  In order for that to work consumers can't disable regulators
they didn't enable themselves (since otherwise they could be breaking
another consumer) and so the can't increase the reference count.

If your driver explicitly needs the regulator to be off at startup it
should do an enable then a disable.  Otherwise it should just leave the
regulator alone.  Machines can call regulator_has_full_constraints() to
tell the core that any regulators which have not been explicitly enabled
by consumers can be powered off at the end of init - at some point in
the future this will become the default.
--
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