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

2013-09-11 Thread Wei Ni
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

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

2013-09-11 Thread Wei Ni
On 09/10/2013 08:11 PM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Tue, Sep 10, 2013 at 07:29:40PM +0800, Wei Ni wrote: > >> On my platform, it use palmas-regulator.c, ldo6 for this lm90 power >> rail. I checked this driver, it will handle ramp_delay except LDOx. >> Since I'm not

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

2013-09-11 Thread Wei Ni
On 09/10/2013 08:11 PM, Mark Brown wrote: * PGP Signed by an unknown key On Tue, Sep 10, 2013 at 07:29:40PM +0800, Wei Ni wrote: On my platform, it use palmas-regulator.c, ldo6 for this lm90 power rail. I checked this driver, it will handle ramp_delay except LDOx. Since I'm not familiar

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

2013-09-11 Thread Wei Ni
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

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

2013-09-10 Thread Mark Brown
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).

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 12:18 PM, Mark Brown wrote: > On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: > >> OK, so I believe you're saying that the case of a chip with just >> a single power source, which absolutely must be present in HW for >> the chip to be powered, isn't appropriate for

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: > OK, so I believe you're saying that the case of a chip with just a > single power source, which absolutely must be present in HW for the chip > to be powered, isn't appropriate for regulator_get_optional(). Something > must always

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

2013-09-10 Thread Guenter Roeck
On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: > On 09/10/2013 11:04 AM, Mark Brown wrote: > > On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: > >> On 09/10/2013 04:09 AM, Mark Brown wrote: > > > >>> No. There are a couple of issues here. One is that we don't

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 11:04 AM, Mark Brown wrote: > On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: >> On 09/10/2013 04:09 AM, Mark Brown wrote: > >>> No. There are a couple of issues here. One is that we don't want >>> to litter all drivers with conditional code to check if they >>>

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 11:22:01AM +0800, Wei Ni wrote: > Mark, do you mean you have patches for regulator_get_optional() and > regulator_get()? Not yet but they'll be there by the time the next merge window comes. signature.asc Description: Digital signature

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: > On 09/10/2013 04:09 AM, Mark Brown wrote: > > No. There are a couple of issues here. One is that we don't want > > to litter all drivers with conditional code to check if they > > actually got the regulator and so on, that's just

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 04:09 AM, Mark Brown wrote: > On Mon, Sep 09, 2013 at 10:13:56PM -0600, Stephen Warren wrote: >> On 09/09/2013 09:53 PM, Guenter Roeck wrote: > >>> Earlier comments suggest that this is not the intended use case >>> for regulator_get_optional(). > > That's right. > >> Isn't the

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 07:29:40PM +0800, Wei Ni wrote: > On my platform, it use palmas-regulator.c, ldo6 for this lm90 power > rail. I checked this driver, it will handle ramp_delay except LDOx. > Since I'm not familiar with this palmas device and driver, so do you > mean I can set

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

2013-09-10 Thread Wei Ni
On 09/10/2013 06:13 PM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Tue, Sep 10, 2013 at 01:39:59PM +0800, Wei Ni wrote: > >> I think the device need time to wait stable after power on, but it's >> difficult to get an exact delay value, and this delay may also relate >> with

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 01:39:59PM +0800, Wei Ni wrote: > I think the device need time to wait stable after power on, but it's > difficult to get an exact delay value, and this delay may also relate > with platform design, so how about to add a optional property in the DT > node, such as

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

2013-09-10 Thread Mark Brown
On Mon, Sep 09, 2013 at 10:13:56PM -0600, Stephen Warren wrote: > On 09/09/2013 09:53 PM, Guenter Roeck wrote: > > Earlier comments suggest that this is not the intended use case for > > regulator_get_optional(). That's right. > Isn't the issue only whether the optional aspect of the regulator

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

2013-09-10 Thread Wei Ni
On 09/10/2013 01:54 PM, Guenter Roeck wrote: > On 09/09/2013 10:39 PM, Wei Ni wrote: >> On 09/10/2013 12:50 PM, Guenter Roeck wrote: >>> On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Mon, Sep 09, 2013 at

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

2013-09-10 Thread Wei Ni
On 09/10/2013 01:54 PM, Guenter Roeck wrote: On 09/09/2013 10:39 PM, Wei Ni wrote: On 09/10/2013 12:50 PM, Guenter Roeck wrote: On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter

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

2013-09-10 Thread Mark Brown
On Mon, Sep 09, 2013 at 10:13:56PM -0600, Stephen Warren wrote: On 09/09/2013 09:53 PM, Guenter Roeck wrote: Earlier comments suggest that this is not the intended use case for regulator_get_optional(). That's right. Isn't the issue only whether the optional aspect of the regulator is

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 01:39:59PM +0800, Wei Ni wrote: I think the device need time to wait stable after power on, but it's difficult to get an exact delay value, and this delay may also relate with platform design, so how about to add a optional property in the DT node, such as

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

2013-09-10 Thread Wei Ni
On 09/10/2013 06:13 PM, Mark Brown wrote: * PGP Signed by an unknown key On Tue, Sep 10, 2013 at 01:39:59PM +0800, Wei Ni wrote: I think the device need time to wait stable after power on, but it's difficult to get an exact delay value, and this delay may also relate with platform design,

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 07:29:40PM +0800, Wei Ni wrote: On my platform, it use palmas-regulator.c, ldo6 for this lm90 power rail. I checked this driver, it will handle ramp_delay except LDOx. Since I'm not familiar with this palmas device and driver, so do you mean I can set

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 04:09 AM, Mark Brown wrote: On Mon, Sep 09, 2013 at 10:13:56PM -0600, Stephen Warren wrote: On 09/09/2013 09:53 PM, Guenter Roeck wrote: Earlier comments suggest that this is not the intended use case for regulator_get_optional(). That's right. Isn't the issue only

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: On 09/10/2013 04:09 AM, Mark Brown wrote: No. There are a couple of issues here. One is that we don't want to litter all drivers with conditional code to check if they actually got the regulator and so on, that's just

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 11:22:01AM +0800, Wei Ni wrote: Mark, do you mean you have patches for regulator_get_optional() and regulator_get()? Not yet but they'll be there by the time the next merge window comes. signature.asc Description: Digital signature

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 11:04 AM, Mark Brown wrote: On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: On 09/10/2013 04:09 AM, Mark Brown wrote: No. There are a couple of issues here. One is that we don't want to litter all drivers with conditional code to check if they actually got

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

2013-09-10 Thread Guenter Roeck
On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: On 09/10/2013 11:04 AM, Mark Brown wrote: On Tue, Sep 10, 2013 at 09:07:43AM -0600, Stephen Warren wrote: On 09/10/2013 04:09 AM, Mark Brown wrote: No. There are a couple of issues here. One is that we don't want to

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

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: OK, so I believe you're saying that the case of a chip with just a single power source, which absolutely must be present in HW for the chip to be powered, isn't appropriate for regulator_get_optional(). Something must always

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

2013-09-10 Thread Stephen Warren
On 09/10/2013 12:18 PM, Mark Brown wrote: On Tue, Sep 10, 2013 at 11:44:05AM -0600, Stephen Warren wrote: OK, so I believe you're saying that the case of a chip with just a single power source, which absolutely must be present in HW for the chip to be powered, isn't appropriate for

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

2013-09-10 Thread Mark Brown
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.

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 10:39 PM, Wei Ni wrote: On 09/10/2013 12:50 PM, Guenter Roeck wrote: On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM

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

2013-09-09 Thread Wei Ni
On 09/10/2013 12:50 PM, Guenter Roeck wrote: > On 09/09/2013 09:05 PM, Wei Ni wrote: >> On 09/10/2013 04:39 AM, Mark Brown wrote: >>> * PGP Signed by an unknown key >>> >>> On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: It does, though it gets complicated trying to use it for

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 09:13 PM, Stephen Warren wrote: On 09/09/2013 09:53 PM, Guenter Roeck wrote: On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: ... My understanding is that by adding regulator support you essentially committed to adding regulators (if

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

2013-09-09 Thread Stephen Warren
On 09/09/2013 09:53 PM, Guenter Roeck wrote: > On 09/09/2013 08:40 PM, Stephen Warren wrote: >> On 09/09/2013 09:36 PM, Guenter Roeck wrote: ... >>> My understanding is that by adding regulator support you essentially >>> committed to adding regulators (if necessary dummy ones) for this driver >>>

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

2013-09-09 Thread Wei Ni
On 09/10/2013 11:53 AM, Guenter Roeck wrote: > On 09/09/2013 08:40 PM, Stephen Warren wrote: >> On 09/09/2013 09:36 PM, Guenter Roeck wrote: >>> On 09/09/2013 08:22 PM, Wei Ni wrote: On 09/09/2013 11:50 PM, Guenter Roeck wrote: > On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote:

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

2013-09-09 Thread Wei Ni
On 09/10/2013 04:39 AM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: >> On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: > >>> It does, though it gets complicated trying to use it for a case like >>> this since

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: On 09/09/2013 08:22 PM, Wei Ni wrote: 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

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

2013-09-09 Thread Stephen Warren
On 09/09/2013 09:36 PM, Guenter Roeck wrote: > On 09/09/2013 08:22 PM, Wei Ni wrote: >> 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,

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 08:22 PM, Wei Ni wrote: 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,

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

2013-09-09 Thread Wei Ni
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

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: > On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: > > It does, though it gets complicated trying to use it for a case like > > this since you can't really tell if the regulator was powered on > > immediately before the

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

2013-09-09 Thread Guenter Roeck
On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: > On Mon, Sep 09, 2013 at 08:50:43AM -0700, Guenter Roeck wrote: > > On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote: > > > > And indeed it does this (well, it does whatever the driver says in terms > > > of delay). However

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 08:50:43AM -0700, Guenter Roeck wrote: > On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote: > > And indeed it does this (well, it does whatever the driver says in terms > > of delay). However it is possible that the lm90 needs this time for > > itself - if it's

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

2013-09-09 Thread Guenter Roeck
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

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

2013-09-09 Thread Mark Brown
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

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 04:12 AM, Mark Brown wrote: On Mon, Sep 09, 2013 at 06:29:11PM +0800, Wei Ni wrote: + reg = devm_regulator_get_optional(dev, "vcc"); + if (!IS_ERR(reg)) { + err = regulator_enable(reg); + if (err < 0) { + dev_err(>dev,

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 06:29:11PM +0800, Wei Ni wrote: > + reg = devm_regulator_get_optional(dev, "vcc"); > + if (!IS_ERR(reg)) { > + err = regulator_enable(reg); > + if (err < 0) { > + dev_err(>dev, > + "Failed to

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 06:29:11PM +0800, Wei Ni wrote: + reg = devm_regulator_get_optional(dev, vcc); + if (!IS_ERR(reg)) { + err = regulator_enable(reg); + if (err 0) { + dev_err(client-dev, + Failed to

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 04:12 AM, Mark Brown wrote: On Mon, Sep 09, 2013 at 06:29:11PM +0800, Wei Ni wrote: + reg = devm_regulator_get_optional(dev, vcc); + if (!IS_ERR(reg)) { + err = regulator_enable(reg); + if (err 0) { +

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

2013-09-09 Thread Mark Brown
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

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 08:50:43AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote: And indeed it does this (well, it does whatever the driver says in terms of delay). However it is possible that the lm90 needs this time for itself - if it's doing

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

2013-09-09 Thread Guenter Roeck
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

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

2013-09-09 Thread Guenter Roeck
On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: On Mon, Sep 09, 2013 at 08:50:43AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 02:50:22PM +0100, Mark Brown wrote: And indeed it does this (well, it does whatever the driver says in terms of delay). However it is

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

2013-09-09 Thread Mark Brown
On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: It does, though it gets complicated trying to use it for a case like this since you can't really tell if the regulator was powered on immediately before the device got

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

2013-09-09 Thread Wei Ni
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

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 08:22 PM, Wei Ni wrote: 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,

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

2013-09-09 Thread Stephen Warren
On 09/09/2013 09:36 PM, Guenter Roeck wrote: On 09/09/2013 08:22 PM, Wei Ni wrote: 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:

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: On 09/09/2013 08:22 PM, Wei Ni wrote: 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

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

2013-09-09 Thread Wei Ni
On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: It does, though it gets complicated trying to use it for a case like this since you can't

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

2013-09-09 Thread Wei Ni
On 09/10/2013 11:53 AM, Guenter Roeck wrote: On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: On 09/09/2013 08:22 PM, Wei Ni wrote: 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

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

2013-09-09 Thread Stephen Warren
On 09/09/2013 09:53 PM, Guenter Roeck wrote: On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: ... My understanding is that by adding regulator support you essentially committed to adding regulators (if necessary dummy ones) for this driver to all

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 09:13 PM, Stephen Warren wrote: On 09/09/2013 09:53 PM, Guenter Roeck wrote: On 09/09/2013 08:40 PM, Stephen Warren wrote: On 09/09/2013 09:36 PM, Guenter Roeck wrote: ... My understanding is that by adding regulator support you essentially committed to adding regulators (if

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: It does, though it gets complicated trying to use it for

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

2013-09-09 Thread Wei Ni
On 09/10/2013 12:50 PM, Guenter Roeck wrote: On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM +0100, Mark Brown wrote: It does,

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

2013-09-09 Thread Guenter Roeck
On 09/09/2013 10:39 PM, Wei Ni wrote: On 09/10/2013 12:50 PM, Guenter Roeck wrote: On 09/09/2013 09:05 PM, Wei Ni wrote: On 09/10/2013 04:39 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Sep 09, 2013 at 09:17:35AM -0700, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 05:02:37PM