Re: [PATCH v3 4/4] hwmon: (lm90) use enums for the indexes of temp8 and temp11

2013-07-29 Thread Wei Ni
On 07/27/2013 11:38 PM, Jean Delvare wrote: Hi Wei, On Fri, 12 Jul 2013 15:48:07 +0800, Wei Ni wrote: Using enums for the indexes and nrs of temp8 and temp11. This make the code much more readable. I can't say I'm thrilled by this patch. The improved readability is questionable

Re: [PATCH v3 3/4] hwmon: (lm90) add support to handle IRQ

2013-07-30 Thread Wei Ni
On 07/29/2013 11:58 PM, Jean Delvare wrote: Hi Wei, On Mon, 29 Jul 2013 18:14:56 +0800, Wei Ni wrote: On 07/27/2013 11:02 PM, Jean Delvare wrote: On Fri, 19 Jul 2013 14:41:54 +0800, Wei Ni wrote: 2. The pin ALERT/THERM2 is configured as ALERT, and it is connected to the interrupt line

[PATCH v4] hwmon: (lm90) split setshow temp as common codes

2013-08-06 Thread Wei Ni
Split setshow temp codes as common functions, so we can use it directly when implement linux thermal framework. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 112 +++--- 1 file changed, 69 insertions(+), 43 deletions(-) diff --git

Re: [PATCH v4] hwmon: (lm90) split setshow temp as common codes

2013-08-06 Thread Wei Ni
Sorry, I made a mistake, please ignore this patch. Wei. On 08/06/2013 06:06 PM, Wei Ni wrote: Split setshow temp codes as common functions, so we can use it directly when implement linux thermal framework. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 112

[PATCH RESEND v4] hwmon: (lm90) split setshow temp as common codes

2013-08-06 Thread Wei Ni
Split setshow temp codes as common functions, so we can use it directly when implement linux thermal framework. And handle error return value for the lm90_select_remote_channel and write_tempx, then set_temp8 and set_temp11 could return it to user-space. Signed-off-by: Wei Ni w...@nvidia.com

Re: [PATCH RESEND v4] hwmon: (lm90) split setshow temp as common codes

2013-08-06 Thread Wei Ni
This patch is separated from my previous v3 series, which is in http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg466772.html Changes from v3: 1. Add error handler for lm90_select_remote_channel(), set_temp8(), and set_temp11(). Wei. On 08/06/2013 06:36 PM, Wei Ni wrote: Split

[PATCH v4 1/3] hwmon: (lm90) Define status bits

2013-08-07 Thread Wei Ni
Add bit defines for the status register. And add a function lm90_is_tripped() which will read status register and return tripped or not, then lm90_alert can call it directly, and in the future the IRQ thread also can use it. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 75

[PATCH v4 2/3] hwmon: (lm90) add support to handle IRQ

2013-08-07 Thread Wei Ni
When the temperature exceed the limit range value, the driver can handle the interrupt. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 1da2eff..2e68773

[PATCH v4 3/3] hwmon: (lm90) use enums for the indexes of temp8 and temp11

2013-08-07 Thread Wei Ni
Using enums for the indexes and nrs of temp8 and temp11. This make the code much more readable. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 154 +- 1 file changed, 90 insertions(+), 64 deletions(-) diff --git a/drivers/hwmon

[PATCH 0/2] Add power control for lm90

2013-08-07 Thread Wei Ni
The device lm90 can be controlled by the vdd rail. Add function to power on/off the vdd. Enable the nct1008 on Tegra114 Dalmore board, and set the vdd-regulator. Wei Ni (2): hwmon: (lm90) Add power control ARM: dt: t114 dalmore: add dt entry for nct1008 arch/arm/boot/dts/tegra114

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

2013-08-07 Thread Wei Ni
The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 52

[PATCH 2/2] ARM: dt: t114 dalmore: add dt entry for nct1008

2013-08-07 Thread Wei Ni
Enable thermal sensor nct1008 for t114 dalmore. Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm/boot/dts/tegra114-dalmore.dts | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts index

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

2013-08-07 Thread Wei Ni
On 08/07/2013 03:03 PM, Guenter Roeck wrote: On 08/06/2013 11:52 PM, Wei Ni wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w

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

2013-08-07 Thread Wei Ni
On 08/07/2013 03:27 PM, Alexander Shiyan wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c

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

2013-08-07 Thread Wei Ni
On 08/07/2013 03:50 PM, Guenter Roeck wrote: On 08/07/2013 12:32 AM, Wei Ni wrote: On 08/07/2013 03:27 PM, Alexander Shiyan wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before

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

2013-08-07 Thread Wei Ni
On 08/07/2013 04:45 PM, Alexander Shiyan wrote: On 08/07/2013 03:50 PM, Guenter Roeck wrote: On 08/07/2013 12:32 AM, Wei Ni wrote: On 08/07/2013 03:27 PM, Alexander Shiyan wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail

Re: [PATCH 2/2] ARM: dt: t114 dalmore: add dt entry for nct1008

2013-08-07 Thread Wei Ni
On 08/08/2013 12:03 AM, Stephen Warren wrote: On 08/07/2013 12:52 AM, Wei Ni wrote: Enable thermal sensor nct1008 for t114 dalmore. Wei, I assume this patch doesn't depend on any of the other LM90-related patches you've sent; I can simply apply it right away? In my [PATCH 1/2], I add codes

[PATCH v2 3/3] Documentation: dt: hwmon: add OF document for lm90

2013-08-08 Thread Wei Ni
Add OF document for lm90 in Documentation/devicetree/. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/devicetree/bindings/hwmon/lm90.txt | 20 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt diff --git

[PATCH v2 0/3] Add power control for lm90

2013-08-08 Thread Wei Ni
v1: 1. if get regulator failed, we should continue to run probe function, not return fail. 2. call regulator_put() in error handler and remove function. 3. add LM90 DT binding document. Wei Ni (3): hwmon: (lm90) Add power control ARM: dt: t114 dalmore: add dt entry for nct1008 Documentation

[PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-08 Thread Wei Ni
The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 49

Re: [PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-08 Thread Wei Ni
On 08/08/2013 03:13 PM, Alexander Shiyan wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c

Re: [PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-08 Thread Wei Ni
On 08/08/2013 04:42 PM, Guenter Roeck wrote: On 08/07/2013 11:56 PM, Wei Ni wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before accessing the device. Signed-off-by: Wei Ni w

Re: [PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-08 Thread Wei Ni
On 08/08/2013 05:57 PM, Alexander Shiyan wrote: On 08/08/2013 04:42 PM, Guenter Roeck wrote: On 08/07/2013 11:56 PM, Wei Ni wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before

Re: [PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-08 Thread Wei Ni
On 08/08/2013 05:57 PM, Alexander Shiyan wrote: On 08/08/2013 04:42 PM, Guenter Roeck wrote: On 08/07/2013 11:56 PM, Wei Ni wrote: The device lm90 can be controlled by the vdd rail. Adding the power control support to power on/off the vdd rail. And make sure that power is enabled before

Re: [PATCH v2 2/3] ARM: dt: t114 dalmore: add dt entry for nct1008

2013-08-09 Thread Wei Ni
On 08/09/2013 01:35 AM, Stephen Warren wrote: On 08/08/2013 12:56 AM, Wei Ni wrote: Enable thermal sensor nct1008 for t114 dalmore. It'd be best to remove this patch from the series; send one series to the LM90 maintainer with just the driver and DT binding changes, and another series

Re: [PATCH v2 3/3] Documentation: dt: hwmon: add OF document for lm90

2013-08-09 Thread Wei Ni
On 08/09/2013 01:37 AM, Stephen Warren wrote: On 08/08/2013 12:56 AM, Wei Ni wrote: Add OF document for lm90 in Documentation/devicetree/. diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt +Required node properties

Re: [PATCH v2 2/3] ARM: dt: t114 dalmore: add dt entry for nct1008

2013-08-09 Thread Wei Ni
On 08/09/2013 05:33 AM, Guenter Roeck wrote: On 08/08/2013 01:40 PM, Stephen Warren wrote: On 08/08/2013 02:36 PM, Sergei Shtylyov wrote: Hello. On 08/08/2013 10:56 AM, Wei Ni wrote: Enable thermal sensor nct1008 for t114 dalmore. Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm

Re: [PATCH v2 1/3] hwmon: (lm90) Add power control

2013-08-09 Thread Wei Ni
On 08/08/2013 07:01 PM, Mark Brown wrote: * PGP Signed by an unknown key On Thu, Aug 08, 2013 at 02:56:29PM +0800, Wei Ni wrote: +mutex_lock(data-update_lock); + +if (is_enable) +ret = regulator_enable(data-lm90_reg); +else +ret = regulator_disable

Re: [PATCH RESEND v4] hwmon: (lm90) split setshow temp as common codes

2013-09-09 Thread Wei Ni
Hi, Jean Do you have any more suggestions on this patch ? Thanks. Wei. On 08/06/2013 06:43 PM, Wei Ni wrote: This patch is separated from my previous v3 series, which is in http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg466772.html Changes from v3: 1. Add error handler

Re: [PATCH v4 0/3] Lm90 Enhancements

2013-09-09 Thread Wei Ni
Hi, Jean Do you have any more suggestions on this series? Thanks. Wei. On 08/07/2013 02:18 PM, Wei Ni wrote: This patch set enhance the lm90 driver, it make the driver more readable and easier to use thermal framework. This series is v4, previous version patches: [RFC]: http

[PATCH v3 0/2] Add power control for lm90

2013-09-09 Thread Wei Ni
previous review. Changes from v1: 1. if get regulator failed, we should continue to run probe function, not return fail. 2. call regulator_put() in error handler and remove function. 3. add LM90 DT binding document. Wei Ni (2): hwmon: (lm90) Add power control Documentation: dt: hwmon: add

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

2013-09-09 Thread Wei Ni
The device lm90 can be controlled by the vcc rail. Adding the regulator support to power on/off the vcc rail. Enable the vcc regulator before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 25 + 1 file changed, 25 insertions

[PATCH v3 2/2] Documentation: dt: hwmon: add OF document for LM90

2013-09-09 Thread Wei Ni
Add OF document for LM90 in Documentation/devicetree/. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/devicetree/bindings/hwmon/lm90.txt | 44 ++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt diff --git

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

Re: [PATCH v3 2/2] Documentation: dt: hwmon: add OF document for LM90

2013-09-09 Thread Wei Ni
On 09/10/2013 06:14 AM, Stephen Warren wrote: On 09/09/2013 04:52 AM, Guenter Roeck wrote: On 09/09/2013 03:29 AM, Wei Ni wrote: Add OF document for LM90 in Documentation/devicetree/. diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt +* LM90 series thermometer. + +Required

Re: [PATCH v3 2/2] Documentation: dt: hwmon: add OF document for LM90

2013-09-09 Thread Wei Ni
On 09/10/2013 06:23 AM, Guenter Roeck wrote: On Mon, Sep 09, 2013 at 04:15:57PM -0600, Stephen Warren wrote: On 09/09/2013 04:29 AM, Wei Ni wrote: Add OF document for LM90 in Documentation/devicetree/. diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree

Re: [PATCH v3 2/2] Documentation: dt: hwmon: add OF document for LM90

2013-09-09 Thread Wei Ni
On 09/09/2013 06:57 PM, Ramkumar Ramachandra wrote: Wei Ni wrote: diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt new file mode 100644 index 000..5570875 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/lm90

Re: [PATCH v3 2/2] Documentation: dt: hwmon: add OF document for LM90

2013-09-09 Thread Wei Ni
On 09/10/2013 12:35 PM, Wei Ni wrote: On 09/09/2013 06:57 PM, Ramkumar Ramachandra wrote: Wei Ni wrote: diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt new file mode 100644 index 000..5570875 --- /dev/null +++ b

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

[PATCH v4 0/3] Add power control for lm90

2013-09-12 Thread Wei Ni
document. Wei Ni (3): hwmon: (lm90) Add power control of: add vendor prefix for GMT Documentation: dt: hwmon: add OF document for LM90 Documentation/devicetree/bindings/hwmon/lm90.txt | 44 .../devicetree/bindings/vendor-prefixes.txt|1 + drivers/hwmon

[PATCH v4 2/3] of: add vendor prefix for GMT

2013-09-12 Thread Wei Ni
Adding Global Mixed-mode Technology Inc. to the list of devicetree vendor prefixes. Signed-off-by: Wei Ni w...@nvidia.com --- .../devicetree/bindings/vendor-prefixes.txt|1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b

[PATCH v4 3/3] Documentation: dt: hwmon: add OF document for LM90

2013-09-12 Thread Wei Ni
Add OF document for LM90 in Documentation/devicetree/. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/devicetree/bindings/hwmon/lm90.txt | 44 ++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt diff --git

[PATCH v4 1/3] hwmon: (lm90) Add power control

2013-09-12 Thread Wei Ni
The device lm90 can be controlled by the vcc rail. Adding the regulator support to power on/off the vcc rail. Enable the vcc regulator before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 20 1 file changed, 20 insertions(+) diff

Re: [PATCH v4 1/3] hwmon: (lm90) Add power control

2013-09-15 Thread Wei Ni
On 09/12/2013 07:51 PM, Mark Brown wrote: * PGP Signed by an unknown key On Thu, Sep 12, 2013 at 07:24:19PM +0800, Wei Ni wrote: +#include linux/delay.h You don't need this any more, otherwise Oh, yes, I will remove it. Reviewed-by: Mark Brown broo...@linaro.org * Unknown Key

[PATCH v5 2/3] of: add vendor prefix for GMT

2013-10-07 Thread Wei Ni
Adding Global Mixed-mode Technology Inc. to the list of devicetree vendor prefixes. Signed-off-by: Wei Ni w...@nvidia.com --- .../devicetree/bindings/vendor-prefixes.txt|1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b

[PATCH v5 1/3] hwmon: (lm90) Add power control

2013-10-07 Thread Wei Ni
The device lm90 can be controlled by the vcc rail. Adding the regulator support to power on/off the vcc rail. Enable the vcc regulator before accessing the device. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH v5 0/3] Add power control for lm90

2013-10-07 Thread Wei Ni
regulator failed, we should continue to run probe function, not return fail. 2. call regulator_put() in error handler and remove function. 3. add LM90 DT binding document. Wei Ni (3): hwmon: (lm90) Add power control of: add vendor prefix for GMT Documentation: dt: hwmon: add OF document for LM90

[PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90

2013-10-07 Thread Wei Ni
Add OF document for LM90 in Documentation/devicetree/. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/devicetree/bindings/hwmon/lm90.txt | 44 ++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt diff --git

[PATCH 2/2] ARM: tegra: add vcc supply for nct1008 to Cardhu

2013-10-07 Thread Wei Ni
Add vcc-supply property in the nct1008 node, and set it as sys_3v3_reg. change the name of this node to temp-sensor. Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm/boot/dts/tegra30-cardhu.dtsi |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra30

[PATCH 0/2] Update dts file to support lm90 well

2013-10-07 Thread Wei Ni
Add nct1008 dt entry on Tegra114 Dalmore. Add vcc-supply for nct1008 on Tegra30 Cardhu. Didn't add vcc-supply on Tegra20 Ventana, because on this platform, the vcc for nct1008 is physically present and enabled. Wei Ni (2): ARM: tegra: add DT entry for nct1008 to Dalmore ARM: tegra: add vcc

[PATCH 1/2] ARM: tegra: add DT entry for nct1008 to Dalmore

2013-10-07 Thread Wei Ni
Enable thermal sensor nct1008 for Tegra114 dalmore. Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm/boot/dts/tegra114-dalmore.dts | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts

[PATCH v5] hwmon: (lm90) split setshow temp as common codes

2013-10-08 Thread Wei Ni
Split setshow temp codes as common functions, so we can use it directly when implement linux thermal framework. And handle error return value for the lm90_select_remote_channel and write_tempx, then set_temp8 and set_temp11 could return it to user-space. Signed-off-by: Wei Ni w...@nvidia.com

Re: [PATCH v5] hwmon: (lm90) split setshow temp as common codes

2013-10-08 Thread Wei Ni
The previous version is in https://lkml.org/lkml/2013/8/6/170 . Changes from v4: Couple of changes to get right error codes, as per Jean's review. On 10/08/2013 03:04 PM, Wei Ni wrote: Split setshow temp codes as common functions, so we can use it directly when implement linux thermal

[PATCH] hwmon: (lm90) Add support for TI TMP451

2013-10-08 Thread Wei Ni
TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90 driver. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/hwmon/lm90 |6 ++ drivers/hwmon/lm90.c | 37 + 2

Re: [PATCH] hwmon: (lm90) Add support for TI TMP451

2013-10-08 Thread Wei Ni
On 10/08/2013 11:25 PM, Guenter Roeck wrote: On Tue, Oct 08, 2013 at 05:27:37PM +0800, Wei Ni wrote: TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90 driver. Signed-off-by: Wei Ni w...@nvidia.com

[PATCH v2] hwmon: (lm90) Add support for TI TMP451

2013-10-08 Thread Wei Ni
TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90 driver. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/hwmon/lm90 |6 ++ drivers/hwmon/lm90.c | 45

Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451

2013-10-09 Thread Wei Ni
On 10/09/2013 04:23 PM, Jean Delvare wrote: Hi Wei, On Wed, 9 Oct 2013 13:40:48 +0800, Wei Ni wrote: TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90 driver. Signed-off-by: Wei Ni w...@nvidia.com

Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451

2013-10-10 Thread Wei Ni
On 10/09/2013 11:35 PM, Jean Delvare wrote: On Wed, 9 Oct 2013 08:17:44 -0700, Guenter Roeck wrote: On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote: TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90

Re: [PATCH v5 0/3] Add power control for lm90

2013-10-15 Thread Wei Ni
Hi, Jean Do you have any comments on this series, or will you take them ? Thanks. Wei. On 10/07/2013 05:25 PM, Wei Ni wrote: The device lm90 can be controlled by the vcc rail. Add function to power on/off the vcc. I will update all .dts files referencing this driver to match the new

Re: About [PATCH 1/2] regulator: core: Provide a dummy regulator with full constraints

2013-10-16 Thread Wei Ni
On 10/16/2013 06:39 PM, Mark Brown wrote: * PGP Signed by an unknown key On Wed, Oct 16, 2013 at 12:36:46PM +0800, Wei Ni wrote: On 10/12/2013 08:14 PM, Mark Brown wrote: OK, I think the device tree board code just needs to set full constraints during machine initialisation. We can't

Re: [PATCH v5 0/3] Add power control for lm90

2013-10-17 Thread Wei Ni
On 10/16/2013 11:20 AM, Wei Ni wrote: Hi, Jean Do you have any comments on this series, or will you take them ? Hi, Jean, will you apply this series befor the 3.13 merge window? Since I forgot to tell Stephen not to apply the [PATCH 0/2] Update dts file to support lm90 well untile

[PATCH] thermal: Fix binding problem when there is thermal zone params

2013-10-18 Thread Wei Ni
is not invoked in bind_tz() and bind_cdev() when there is thermal zone params. Signed-off-by: Wei Ni w...@nvidia.com Signed-off-by: Jinyoung Park jinyou...@nvidia.com --- drivers/thermal/thermal_core.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c

Re: [PATCH v5 0/3] Add power control for lm90

2013-10-29 Thread Wei Ni
/18/2013 09:45 AM, Wei Ni wrote: On 10/16/2013 11:20 AM, Wei Ni wrote: Hi, Jean Do you have any comments on this series, or will you take them ? Hi, Jean, will you apply this series befor the 3.13 merge window? Since I forgot to tell Stephen not to apply the [PATCH 0/2] Update dts file

Re: [PATCH v4 1/3] hwmon: (lm90) Define status bits

2013-10-30 Thread Wei Ni
On 10/31/2013 10:47 AM, Wei Ni wrote: On 10/30/2013 11:41 PM, Jean Delvare wrote: Hi Wei, On Wed, 7 Aug 2013 14:18:24 +0800, Wei Ni wrote: Add bit defines for the status register. And add a function lm90_is_tripped() which will read status register and return tripped or not, then lm90_alert

[PATCH RESEND v4 1/3] hwmon: (lm90) Define status bits

2013-10-30 Thread Wei Ni
Add bit defines for the status register. And add a function lm90_is_tripped() which will read status register and return tripped or not, then lm90_alert can call it directly, and in the future the IRQ thread also can use it. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 75

Re: [PATCH v5 0/3] Add power control for lm90

2013-10-30 Thread Wei Ni
. Wei. On 10/18/2013 09:45 AM, Wei Ni wrote: On 10/16/2013 11:20 AM, Wei Ni wrote: Hi, Jean Do you have any comments on this series, or will you take them ? Hi, Jean, will you apply this series befor the 3.13 merge window? Since I forgot to tell Stephen not to apply the [PATCH 0/2] Update

[PATCH RESEND] ARM: tegra: set regulator full constraints

2013-10-31 Thread Wei Ni
Set full constraints during machine initialisation, so that the regulator_get() can get the dummy regulator if the regulator is physically present and enabled. Discussed this in the link: https://lkml.org/lkml/2013/10/8/40 Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm/mach-tegra/tegra.c

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-10-31 Thread Wei Ni
On 10/31/2013 11:56 PM, Stephen Warren wrote: On 10/31/2013 01:05 AM, Wei Ni wrote: Set full constraints during machine initialisation, so that the regulator_get() can get the dummy regulator if the regulator is physically present and enabled. Discussed this in the link: https://lkml.org

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-11-03 Thread Wei Ni
On 11/01/2013 12:20 AM, Mark Brown wrote: * PGP Signed by an unknown key On Thu, Oct 31, 2013 at 03:05:26PM +0800, Wei Ni wrote: Set full constraints during machine initialisation, so that the regulator_get() can get the dummy regulator if the regulator is physically present and enabled

Re: [PATCH v4 2/3] hwmon: (lm90) add support to handle IRQ

2013-11-04 Thread Wei Ni
On 11/04/2013 05:34 PM, Jean Delvare wrote: Hi Wei, I'm hitting a problem with that patch now... On Wed, 7 Aug 2013 14:18:25 +0800, Wei Ni wrote: When the temperature exceed the limit range value, the driver can handle the interrupt. Signed-off-by: Wei Ni w...@nvidia.com --- drivers

[PATCH RESEND v4 2/3] hwmon: (lm90) add support to handle IRQ

2013-11-04 Thread Wei Ni
When the temperature exceed the limit range value, the driver can handle the interrupt. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 57485ef

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-11-05 Thread Wei Ni
On 11/05/2013 12:18 AM, Mark Brown wrote: * PGP Signed by an unknown key On Mon, Nov 04, 2013 at 01:59:33PM +0800, Wei Ni wrote: I didn't find the generic DT init code, do you mean to add it in the customize_machine() in arch/arm/kernel/setup.c ? But it isn't only for DT systems. We

Re: [PATCH] thermal: Fix binding problem when there is thermal zone params

2013-11-05 Thread Wei Ni
On 11/06/2013 01:29 PM, Zhang Rui wrote: On Fri, 2013-10-18 at 18:03 +0800, Wei Ni wrote: @@ -247,7 +247,7 @@ static void bind_cdev(struct thermal_cooling_device *cdev) if (!pos-tzp !pos-ops-bind) continue; -if (!pos-tzp pos-ops-bind

[PATCH v2] thermal: Fix binding problem when there is thermal zone params

2013-11-05 Thread Wei Ni
is not invoked in bind_tz() and bind_cdev() when there is thermal zone params. Signed-off-by: Wei Ni w...@nvidia.com Signed-off-by: Jinyoung Park jinyou...@nvidia.com --- drivers/thermal/thermal_core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c

[PATCH v2] regulator: core: set full constraints in regulator_init

2013-11-05 Thread Wei Ni
() can fix this problem. Discussed this in the link: https://lkml.org/lkml/2013/10/8/40 Signed-off-by: Wei Ni w...@nvidia.com --- drivers/regulator/core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c

Re: [PATCH v2] regulator: core: set full constraints in regulator_init

2013-11-05 Thread Wei Ni
This is v2, previous version is: [v1]: http://www.spinics.net/lists/linux-tegra/msg14562.html On 11/06/2013 03:19 PM, Wei Ni wrote: When use DT to probe device, the probe routine may be erailier than regulator_init_complete(), so at that time the full_constraints isn't set yet

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-11-06 Thread Wei Ni
On 11/06/2013 04:51 PM, Mark Brown wrote: * PGP Signed by an unknown key On Tue, Nov 05, 2013 at 05:05:15PM +0800, Wei Ni wrote: On 11/05/2013 12:18 AM, Mark Brown wrote: We can do it as part of parsing the DT or deciding to parse the DT. I checked the kernel codes, it seems

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-11-11 Thread Wei Ni
On 11/06/2013 07:01 PM, Mark Brown wrote: * PGP Signed by an unknown key On Wed, Nov 06, 2013 at 06:39:03PM +0800, Wei Ni wrote: I still can't find a good place to set full_constraints, could you please show me some reference codes where we can set it? The places where we unflatten

Re: [PATCH v5 2/3] of: add vendor prefix for GMT

2013-11-13 Thread Wei Ni
On 11/12/2013 10:39 PM, Jean Delvare wrote: Hi Wei, On Mon, 7 Oct 2013 17:25:39 +0800, Wei Ni wrote: Adding Global Mixed-mode Technology Inc. to the list of devicetree vendor prefixes. Signed-off-by: Wei Ni w...@nvidia.com --- .../devicetree/bindings/vendor-prefixes.txt|1

Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

2013-11-13 Thread Wei Ni
On 11/13/2013 02:20 AM, Stephen Warren wrote: On 11/11/2013 10:52 PM, Wei Ni wrote: On 11/06/2013 07:01 PM, Mark Brown wrote: * PGP Signed by an unknown key On Wed, Nov 06, 2013 at 06:39:03PM +0800, Wei Ni wrote: I still can't find a good place to set full_constraints, could you please

Re: Unhandled LM90 irq 308 on Dalmore?

2013-12-19 Thread Wei Ni
On 12/20/2013 06:36 AM, Paul Walmsley wrote: Hi Jean, On Thu, 19 Dec 2013, Jean Delvare wrote: Adding Wei who added interrupt support to the lm90 driver, and moving to the appropriate list. Thanks for the speedy response and list correction. On Thu, 19 Dec 2013 02:08:45 -0800, Paul

[PATCH] thermal: use device node to get thermal zone

2014-01-08 Thread Wei Ni
If use name to get the thermal zone, sometimes it can't get the unique thermal zone, because the thermal fw support same name for different thermal zone. So we can change to use device node to get thermal zone. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/thermal/of-thermal.c |6

[PATCH] thermal: add trip parameter for of .get_trend

2014-01-08 Thread Wei Ni
Add trip parameter for the of-thermal's .get_trend(), so that it can be compatible with current thermal framework. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/thermal/of-thermal.c | 16 +--- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 18

[PATCH] thermal: add interface to support tune governor in run-time

2014-01-08 Thread Wei Ni
The governers are not static, so added a new function thermal_update_governor() to update a new one and throw away old ones in run-time. And added start/stop callback to tuning governor parameters at any time. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/thermal/thermal_core.c | 103

Re: [PATCH] thermal: use device node to get thermal zone

2014-01-08 Thread Wei Ni
On 01/08/2014 08:31 PM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 08-01-2014 07:10, R, Durgadoss wrote: Hi Wei, -Original Message- From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- ow...@vger.kernel.org] On Behalf Of Wei Ni Sent: Wednesday, January 08, 2014 2

Re: [PATCH] thermal: add trip parameter for of .get_trend

2014-01-08 Thread Wei Ni
On 01/08/2014 08:48 PM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 08-01-2014 05:07, Wei Ni wrote: Add trip parameter for the of-thermal's .get_trend(), so that it can be compatible with current thermal framework. You need to have a better look on the existing users

Re: [PATCH] thermal: add interface to support tune governor in run-time

2014-01-09 Thread Wei Ni
On 01/08/2014 08:47 PM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 08-01-2014 05:07, Wei Ni wrote: The governers are not static, so added a new function thermal_update_governor() to update a new one and throw away old ones in run-time. And added start/stop callback to tuning

[PATCH v2 1/2] thermal: introduce thermal_zone_get_zone_by_node helper function

2014-01-09 Thread Wei Ni
Signed-off-by: Wei Ni w...@nvidia.com --- drivers/thermal/of-thermal.c |2 ++ drivers/thermal/thermal_core.c | 33 + include/linux/thermal.h|3 +++ 3 files changed, 38 insertions(+) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal

[PATCH v2 2/2] thermal: use device node to get thermal zone

2014-01-09 Thread Wei Ni
: I6c690902a9535915b2f49f9921779fbcd5ecd88c Signed-off-by: Wei Ni w...@nvidia.com --- drivers/thermal/of-thermal.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 53f2d3a..97c12cf 100644 --- a/drivers/thermal

[PATCH v2 0/2] Intruduce thermal_zone_get_zone_by_node

2014-01-09 Thread Wei Ni
The thermal fw start to support device tree, so add a new funciton thermal_zone_get_zone_by_node() This series is v2. Changes from v1: 1. not remove the thermal_zone_get_zone_by_name, and add the new one, so it will not affect other driver. 2. split one patch into two patches. Wei Ni (2

[PATCH v2 0/2] Support to tune governor in run time

2014-01-13 Thread Wei Ni
. Changes from v1: 1. split avaiable_policies part to the patch 1/2, and add document for it. 2. add document for the thermal_update_governor. Wei Ni (2): thermal: add available policies attribut thermal: add interface to support tune governor in run-time Documentation/thermal/sysfs-api.txt | 11

[PATCH v2 1/2] thermal: add available policies attribut

2014-01-13 Thread Wei Ni
only. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/thermal/sysfs-api.txt |6 ++ drivers/thermal/thermal_core.c | 25 + 2 files changed, 31 insertions(+) diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index

[PATCH v2 2/2] thermal: add interface to support tune governor in run-time

2014-01-13 Thread Wei Ni
. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/thermal/sysfs-api.txt |5 +++ drivers/thermal/thermal_core.c | 80 +++ include/linux/thermal.h | 12 ++ 3 files changed, 88 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v2 1/2] thermal: introduce thermal_zone_get_zone_by_node helper function

2014-01-14 Thread Wei Ni
On 01/14/2014 12:05 AM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 09-01-2014 06:37, Wei Ni wrote: The thermal framework start to support device tree, this patch adds a helper function to get a reference of a thermal zone, based on the zone's device node. I would prefer

Re: [PATCH v2 1/2] thermal: add available policies attribut

2014-01-15 Thread Wei Ni
On 01/13/2014 11:58 PM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 13-01-2014 07:17, Wei Ni wrote: The Linux thermal framework support to change governor policy in run time, but it can't show what available policies supported. This patch adds available_policies attribut

Re: [PATCH v2 0/2] Support to tune governor in run time

2014-01-15 Thread Wei Ni
On 01/15/2014 01:44 AM, Eduardo Valentin wrote: * PGP Signed by an unknown key Hello Wei, On 14-01-2014 00:17, Wei Ni wrote: On 01/14/2014 05:33 AM, Eduardo Valentin wrote: Old Signed by an unknown key On 13-01-2014 15:01, Matthew Longnecker wrote: On 1/13/2014 7:42 AM, Eduardo

Re: [PATCH v2 0/2] Support to tune governor in run time

2014-01-15 Thread Wei Ni
On 01/15/2014 01:50 AM, Eduardo Valentin wrote: * PGP Signed by an unknown key On 14-01-2014 00:17, Wei Ni wrote: On 01/14/2014 05:33 AM, Eduardo Valentin wrote: Old Signed by an unknown key On 13-01-2014 15:01, Matthew Longnecker wrote: On 1/13/2014 7:42 AM, Eduardo Valentin wrote

Re: [PATCH v2 1/2] thermal: introduce thermal_zone_get_zone_by_node helper function

2014-01-15 Thread Wei Ni
On 01/14/2014 11:30 PM, Eduardo Valentin wrote: * PGP Signed by an unknown key Hello Wei, On 14-01-2014 06:35, Wei Ni wrote: On 01/14/2014 12:05 AM, Eduardo Valentin wrote: Old Signed by an unknown key On 09-01-2014 06:37, Wei Ni wrote: The thermal framework start to support device

<    1   2   3   >