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: <5049EDCD.4050805@nvidia.com>
Date:	Fri, 7 Sep 2012 18:21:25 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	"lrg@...com" <lrg@...com>,
	"rabin.vincent@...il.com" <rabin.vincent@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3] regulator: disable supply regulator if it is enabled
 for boot-on

On Friday 07 September 2012 07:29 AM, Mark Brown wrote:
> On Mon, Sep 03, 2012 at 07:55:39PM +0530, Laxman Dewangan wrote:
>
>> +	/* If supply enabled during registrtaion then need to disable
>> +	 * when full constraint enabled.
>> +	 */
>> +	unsigned int need_supply_disable:1;
> I don't understand why we need this flag.  Shouldn't we just be making
> the reference counts for the supplies correct and then have the
> regulator disabled in the late initcall as a result of its refcount
> falling to zero when the children are disabled?
Here we are trying to call the supply disable if child refcount become 0.
So when child calls disable, it need to call the supply disable also.

>   I think what we need to
> do here is always take a reference to the supply if the child is enabled
> during boot, then in the initcall we can just disable the parent
> regulator as normal.
My second patch was similar but Rabin has some issue to handle the case 
when is_regulator_enable() is not implementd by regulator device driver.

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