Re: [PATCH v3 1/2] hwmon: (lm90) Add power control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux