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: <507406BE.4030408@nvidia.com>
Date:	Tue, 9 Oct 2012 16:43:02 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Venu Byravarasu <vbyravarasu@...dia.com>
CC:	"broonie@...nsource.wolfsonmicro.com" 
	<broonie@...nsource.wolfsonmicro.com>, "lrg@...com" <lrg@...com>,
	"sameo@...ux.intel.com" <sameo@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 4/4] regulator: tps65090: add external control support
 for DCDC

On Tuesday 09 October 2012 04:41 PM, Venu Byravarasu wrote:
> On Tuesday 09 October 2012 03:32 PM, Laxman Dewangan wrote:
>> On Tuesday 09 October 2012 04:03 PM, Venu Byravarasu wrote:
>>>> +static struct regulator_ops tps65090_ext_control_ops = {
>>>> +};
>>> What is the purpose of adding empty structure?
>>>
>> We will not able to register regulator if there is no ops.
>> In regulator register:
>>            if (regulator_desc->name == NULL || regulator_desc->ops == NULL)
>>                    return ERR_PTR(-EINVAL);
>>
> If tps65090_ops would be left as is, without renaming it, hope this empty
> structure can be removed.
>

When we enabled the external control, the control signal can driver 
either  from gpio or some other mechanism like in our tegra3, the 
control signal come from PMC controller which does not go via GPIO.
The core regulator first check for the gpio and if it is there then it 
will go via the gpiolib to enable/disable. If not then it ask for the 
ops->enable and if I provide these apis then it will endup in the 
regulator driver. I do not want to provide the enable() when external 
control is enabled and no gpios. So in this case:
- External control should be enabled on device registers.
- No enable() and disable() should success.
- is_regualtor_enabled() return true always.

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