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: <522E9059.3070305@nvidia.com>
Date:	Tue, 10 Sep 2013 11:22:01 +0800
From:	Wei Ni <wni@...dia.com>
To:	Guenter Roeck <linux@...ck-us.net>, Mark Brown <broonie@...nel.org>
CC:	"khali@...ux-fr.org" <khali@...ux-fr.org>,
	"swarren@...dotorg.org" <swarren@...dotorg.org>,
	"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] hwmon: (lm90) Add power control

On 09/09/2013 11:50 PM, Guenter Roeck wrote:
> On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote:
>> On Mon, Sep 09, 2013 at 04:34:43AM -0700, Guenter Roeck wrote:
>>> On 09/09/2013 04:12 AM, Mark Brown wrote:
>>>> On Mon, Sep 09, 2013 at 06:29:11PM +0800, Wei Ni wrote:
>>
>>>> This doesn't look good, it is going to ignore actual errors - I *really*
>>>> doubt that vcc is optional, it looks like it's the main power supply for
>>>> the device.  You should use normal regulator_get(), _optional() is for
>>>> supplies which could physically not be provided in a system (eg, if the
>>>> device can generate them internally if required).
>>
>>> Then he'll have to make sure that all devicetree files in the system
>>> contain references to this regulator.
>>
>> Or get the patches applied on top of the code that'll be going in this
>> cycle implementing get_optional() properly - when that's done the
>> default will be to provide a dummy supply for regulator_get().  If you
>> ack the patch I'd be happy to carry it.
>>
> Jean will have to ack it.
> 
I think it's better to use get_optional(), and ignore the errors except
-EPROBE_DEFER. Because many platform may always power on this device,
and will not provide regulator for it, so if we get errors from
regulator subsystem and return it directly, then the probe() can't be
implemented, this driver can't work properly, even though it can work
without regulator support.
Mark, do you mean you have patches for regulator_get_optional() and
regulator_get()?

Wei.

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