lkml.org 
[lkml]   [2013]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] hwmon: (lm90) Add power control
On 09/11/2013 02:52 AM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Tue, Sep 10, 2013 at 12:37:47PM -0600, Stephen Warren wrote:
>
>> OK, so for the DT binding we should make vcc-supply a required
>> property, yet the driver will still work OK if that property just
>> happens to be missing (or e.g. when instantiated from a board file,
>> and there's no regulator).
>
> Yup. That way we've got both the binding and code trying to make things
> work, hopefully that'll maximise robustness.

Ok, it looks like regulator_get will handle all things, looking forward
to your patches :)
Then I think my changes will be simple, just something like:
+ reg = devm_regulator_get(dev, "vcc");
+ if (!IS_ERR(reg)) {
+ err = regulator_enable(reg);
+ if (err < 0)
+ return err;
+ } else {
+ return PTR_ERR(reg);
+ }

Wei.

>
> * Unknown Key
> * 0x7EA229BD
>



\
 
 \ /
  Last update: 2013-09-11 13:41    [W:0.054 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site