[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52305587.6020207@nvidia.com>
Date: Wed, 11 Sep 2013 19:35:35 +0800
From: Wei Ni <wni@...dia.com>
To: Mark Brown <broonie@...nel.org>
CC: Stephen Warren <swarren@...dotorg.org>,
Guenter Roeck <linux@...ck-us.net>,
"khali@...ux-fr.org" <khali@...ux-fr.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/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
>
--
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