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

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

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 ra

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 &

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

[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 --- drivers/hwmon/lm90.c | 52 ++ 1 file

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

[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 --- drivers/hwmon/lm90.c | 75

[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 --- drivers/hwmon/lm90.c | 154 +- 1 file changed, 90 insertions(+), 64 deletions(-) diff --git a/drivers/hwmon/lm90.c b

[PATCH v4 0/3] Lm90 Enhancements

2013-08-07 Thread Wei Ni
uot; to "IRQ" 2. add macro defines for the alarm status 3. consider the shared IRQ. Changes from RFC: 1. change _show_temp() to read_temp(), _set_temp() to write_temp(). 2. simply return value for the read_temp(), not use pointer. 3. use devm_request_threaded_irq() to request irq and set

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

[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 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 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 v4 0/3] Lm90 Enhancements

2013-08-07 Thread Wei Ni
macro defines for the alarm status 3. consider the shared IRQ. Changes from RFC: 1. change _show_temp() to read_temp(), _set_temp() to write_temp(). 2. simply return value for the read_temp(), not use pointer. 3. use devm_request_threaded_irq() to request irq and set flag IRQF_ONESHOT. Wei Ni (3

[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

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

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

Re: [PATCH RESEND v4] hwmon: (lm90) split set 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 RESEND v4] hwmon: (lm90) split set temp as common codes

2013-08-06 Thread Wei Ni
Split set 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 --- drivers/hwmon/lm90

Re: [PATCH v4] hwmon: (lm90) split set 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 set temp codes as common functions, so we can use it directly when > implement linux thermal framework. > > Signed-off-by: Wei Ni > --- > drivers/h

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

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

[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

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 conf

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

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 re

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

2013-07-29 Thread Wei Ni
On 07/27/2013 11:02 PM, Jean Delvare wrote: > Hi Wei, > > Sorry for the late reply. > > On Fri, 19 Jul 2013 14:41:54 +0800, Wei Ni wrote: >> On 07/18/2013 11:58 PM, Jean Delvare wrote: >>> First of all, how is the chip wired on your system? You are using an &g

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

2013-07-29 Thread Wei Ni
On 07/27/2013 11:02 PM, Jean Delvare wrote: Hi Wei, Sorry for the late reply. On Fri, 19 Jul 2013 14:41:54 +0800, Wei Ni wrote: On 07/18/2013 11:58 PM, Jean Delvare wrote: First of all, how is the chip wired on your system? You are using an NCT1008, right? Which output of the chip

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-24 Thread Wei Ni
Hi, Jean On 07/19/2013 02:41 PM, Wei Ni wrote: > On 07/18/2013 11:58 PM, Jean Delvare wrote: >> Hi Wei, >> >> On Fri, 12 Jul 2013 15:48:06 +0800, Wei Ni wrote: >>> When the temperature exceed the limit range value, >>> the driver can handle the i

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

2013-07-24 Thread Wei Ni
Hi, Jean On 07/19/2013 02:41 PM, Wei Ni wrote: On 07/18/2013 11:58 PM, Jean Delvare wrote: Hi Wei, On Fri, 12 Jul 2013 15:48:06 +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

Re: [RESEND PATCH V1 8/9] hwmon: lm75: expose to thermal fw via DT nodes

2013-07-19 Thread Wei Ni
On 07/18/2013 09:12 PM, Eduardo Valentin wrote: > * PGP Signed: 07/18/2013 at 06:12:01 AM > > Hi Wei, > > > On 18-07-2013 01:33, Wei Ni wrote: >> On 07/17/2013 11:17 PM, Eduardo Valentin wrote: >>> This patch adds to lm75 temperature sensor the possibility >

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

2013-07-19 Thread Wei Ni
On 07/18/2013 11:58 PM, Jean Delvare wrote: > Hi Wei, > > On Fri, 12 Jul 2013 15:48:06 +0800, Wei Ni wrote: >> When the temperature exceed the limit range value, >> the driver can handle the interrupt. >> >> Signed-off-by: Wei Ni >&

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

2013-07-19 Thread Wei Ni
On 07/18/2013 11:58 PM, Jean Delvare wrote: Hi Wei, On Fri, 12 Jul 2013 15:48:06 +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/hwmon/lm90.c | 24

Re: [RESEND PATCH V1 8/9] hwmon: lm75: expose to thermal fw via DT nodes

2013-07-19 Thread Wei Ni
On 07/18/2013 09:12 PM, Eduardo Valentin wrote: * PGP Signed: 07/18/2013 at 06:12:01 AM Hi Wei, On 18-07-2013 01:33, Wei Ni wrote: On 07/17/2013 11:17 PM, Eduardo Valentin wrote: This patch adds to lm75 temperature sensor the possibility to expose itself as thermal zone device

Re: [RESEND PATCH V1 8/9] hwmon: lm75: expose to thermal fw via DT nodes

2013-07-17 Thread Wei Ni
On 07/17/2013 11:17 PM, Eduardo Valentin wrote: > This patch adds to lm75 temperature sensor the possibility > to expose itself as thermal zone device, registered on the > thermal framework. > > The thermal zone is built only if a device tree node > describing a thermal zone for this sensor is

Re: [PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

2013-07-17 Thread Wei Ni
On 07/17/2013 05:11 PM, Jean Delvare wrote: > On Wed, 17 Jul 2013 14:26:54 +0800, Wei Ni wrote: >> On 07/17/2013 01:14 PM, Guenter Roeck wrote: >>> On Wed, Jul 17, 2013 at 06:26:20AM +0200, Thierry Reding wrote: >>>> On Mon, Jul 15, 2013 at 09:24:15AM +0200, Jean D

Re: [RFC PATCH 1/4] thermal: hwmon: move hwmon support to single file

2013-07-17 Thread Wei Ni
On 07/10/2013 12:54 AM, Eduardo Valentin wrote: > * PGP Signed: 07/09/2013 at 09:54:04 AM > > On 09-07-2013 12:04, R, Durgadoss wrote: >> Hi Eduardo, >> >>> -Original Message- >>> From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- >>> ow...@vger.kernel.org] On Behalf Of Eduardo

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/17/2013 04:28 PM, Jean Delvare wrote: > Hi Wei, > > On Wed, 17 Jul 2013 15:03:35 +0800, Wei Ni wrote: >> On 07/16/2013 12:57 AM, Jean Delvare wrote: >>> On Fri, 12 Jul 2013 15:48:05 +0800, Wei Ni wrote: >>>> Add bit defines for the status register. &

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-17 Thread Wei Ni
On 07/17/2013 04:23 PM, Mikko Perttunen wrote: > On 07/17/2013 11:17 AM, Wei Ni wrote: >> On 07/16/2013 07:14 PM, Wei Ni wrote: >>> On 07/16/2013 01:13 AM, Stephen Warren wrote: >>>> On 07/15/2013 10:48 AM, Stephen Warren wrote: >>>>> On 07/12/2013

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-17 Thread Wei Ni
On 07/16/2013 07:14 PM, Wei Ni wrote: > On 07/16/2013 01:13 AM, Stephen Warren wrote: >> On 07/15/2013 10:48 AM, Stephen Warren wrote: >>> On 07/12/2013 01:49 AM, Wei Ni wrote: >>>> Enable thermal sensor lm90 for Tegra30 Cardhu and Tegra114 Dalmore. >>> &

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/17/2013 03:03 PM, Wei Ni wrote: > On 07/16/2013 12:57 AM, Jean Delvare wrote: >> Hi Wei, Guenter, >> >>> + >>> + if ((status & 0x7f) == 0 && (status2 & 0xfe) == 0) >>> + return false; >> >> It's a bit disappoin

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/16/2013 12:57 AM, Jean Delvare wrote: > Hi Wei, Guenter, > > On Fri, 12 Jul 2013 15:48:05 +0800, Wei Ni wrote: >> Add bit defines for the status register. > > Regarding the subject: for me these are constants, not macros. AFAIK > the term "macro" refe

Re: [PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

2013-07-17 Thread Wei Ni
On 07/17/2013 01:14 PM, Guenter Roeck wrote: > On Wed, Jul 17, 2013 at 06:26:20AM +0200, Thierry Reding wrote: >> On Mon, Jul 15, 2013 at 09:24:15AM +0200, Jean Delvare wrote: >>> On Mon, 15 Jul 2013 14:25:29 +0800, Wei Ni wrote: >>>> On 07/12/2013 10:40 PM, Guenter

Re: [PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-17 Thread Wei Ni
On 07/17/2013 01:14 PM, Guenter Roeck wrote: On Wed, Jul 17, 2013 at 06:26:20AM +0200, Thierry Reding wrote: On Mon, Jul 15, 2013 at 09:24:15AM +0200, Jean Delvare wrote: On Mon, 15 Jul 2013 14:25:29 +0800, Wei Ni wrote: On 07/12/2013 10:40 PM, Guenter Roeck wrote: On Fri, Jul 12, 2013 at 04

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/16/2013 12:57 AM, Jean Delvare wrote: Hi Wei, Guenter, On Fri, 12 Jul 2013 15:48:05 +0800, Wei Ni wrote: Add bit defines for the status register. Regarding the subject: for me these are constants, not macros. AFAIK the term macro refers to defines with parameters only. How about

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/17/2013 03:03 PM, Wei Ni wrote: On 07/16/2013 12:57 AM, Jean Delvare wrote: Hi Wei, Guenter, + + if ((status 0x7f) == 0 (status2 0xfe) == 0) + return false; It's a bit disappointing to not use the freshly introduced constants. That being said I agree it would make

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-17 Thread Wei Ni
On 07/16/2013 07:14 PM, Wei Ni wrote: On 07/16/2013 01:13 AM, Stephen Warren wrote: On 07/15/2013 10:48 AM, Stephen Warren wrote: On 07/12/2013 01:49 AM, Wei Ni wrote: Enable thermal sensor lm90 for Tegra30 Cardhu and Tegra114 Dalmore. I have applied the series to Tegra's for-3.12/dt branch

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-17 Thread Wei Ni
On 07/17/2013 04:23 PM, Mikko Perttunen wrote: On 07/17/2013 11:17 AM, Wei Ni wrote: On 07/16/2013 07:14 PM, Wei Ni wrote: On 07/16/2013 01:13 AM, Stephen Warren wrote: On 07/15/2013 10:48 AM, Stephen Warren wrote: On 07/12/2013 01:49 AM, Wei Ni wrote: Enable thermal sensor lm90 for Tegra30

Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-17 Thread Wei Ni
On 07/17/2013 04:28 PM, Jean Delvare wrote: Hi Wei, On Wed, 17 Jul 2013 15:03:35 +0800, Wei Ni wrote: On 07/16/2013 12:57 AM, Jean Delvare wrote: On Fri, 12 Jul 2013 15:48:05 +0800, Wei Ni wrote: Add bit defines for the status register. Regarding the subject: for me these are constants

Re: [RFC PATCH 1/4] thermal: hwmon: move hwmon support to single file

2013-07-17 Thread Wei Ni
On 07/10/2013 12:54 AM, Eduardo Valentin wrote: * PGP Signed: 07/09/2013 at 09:54:04 AM On 09-07-2013 12:04, R, Durgadoss wrote: Hi Eduardo, -Original Message- From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- ow...@vger.kernel.org] On Behalf Of Eduardo Valentin Sent:

Re: [PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-17 Thread Wei Ni
On 07/17/2013 05:11 PM, Jean Delvare wrote: On Wed, 17 Jul 2013 14:26:54 +0800, Wei Ni wrote: On 07/17/2013 01:14 PM, Guenter Roeck wrote: On Wed, Jul 17, 2013 at 06:26:20AM +0200, Thierry Reding wrote: On Mon, Jul 15, 2013 at 09:24:15AM +0200, Jean Delvare wrote: On Mon, 15 Jul 2013 14:25:29

Re: [RESEND PATCH V1 8/9] hwmon: lm75: expose to thermal fw via DT nodes

2013-07-17 Thread Wei Ni
On 07/17/2013 11:17 PM, Eduardo Valentin wrote: This patch adds to lm75 temperature sensor the possibility to expose itself as thermal zone device, registered on the thermal framework. The thermal zone is built only if a device tree node describing a thermal zone for this sensor is present

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-16 Thread Wei Ni
On 07/16/2013 01:13 AM, Stephen Warren wrote: > On 07/15/2013 10:48 AM, Stephen Warren wrote: >> On 07/12/2013 01:49 AM, Wei Ni wrote: >>> Enable thermal sensor lm90 for Tegra30 Cardhu and Tegra114 Dalmore. >> >> I have applied the series to Tegra's for-3.12/d

Re: [PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-16 Thread Wei Ni
On 07/16/2013 01:13 AM, Stephen Warren wrote: On 07/15/2013 10:48 AM, Stephen Warren wrote: On 07/12/2013 01:49 AM, Wei Ni wrote: Enable thermal sensor lm90 for Tegra30 Cardhu and Tegra114 Dalmore. I have applied the series to Tegra's for-3.12/dt branch. Actually, I see the following

Re: [PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

2013-07-15 Thread Wei Ni
On 07/15/2013 03:24 PM, Jean Delvare wrote: > On Mon, 15 Jul 2013 14:25:29 +0800, Wei Ni wrote: >> On 07/12/2013 10:40 PM, Guenter Roeck wrote: >>> On Fri, Jul 12, 2013 at 04:30:34PM +0200, Jean Delvare wrote: >>>> If that means that for example the ACPI thermal zo

Re: [PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

2013-07-15 Thread Wei Ni
On 07/12/2013 10:40 PM, Guenter Roeck wrote: > On Fri, Jul 12, 2013 at 04:30:34PM +0200, Jean Delvare wrote: >> Hi Guenter, >> >> On Fri, 12 Jul 2013 06:50:00 -0700, Guenter Roeck wrote: >>> On Fri, Jul 12, 2013 at 03:26:15PM +0200, Jean Delvare wrote: One thing I am a little worried about

Re: [PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

2013-07-15 Thread Wei Ni
busy > these days to be that fast on my end, sorry about that. > > On Fri, 12 Jul 2013 15:48:04 +0800, Wei Ni wrote: >> Split set temp codes as common functions, so we can use it directly when >> implement linux thermal framework. > > Can I see a recent version of the code whi

Re: [PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-15 Thread Wei Ni
to be that fast on my end, sorry about that. On Fri, 12 Jul 2013 15:48:04 +0800, Wei Ni wrote: Split setshow temp codes as common functions, so we can use it directly when implement linux thermal framework. Can I see a recent version of the code which will need this change? It makes no sense to apply

Re: [PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-15 Thread Wei Ni
On 07/12/2013 10:40 PM, Guenter Roeck wrote: On Fri, Jul 12, 2013 at 04:30:34PM +0200, Jean Delvare wrote: Hi Guenter, On Fri, 12 Jul 2013 06:50:00 -0700, Guenter Roeck wrote: On Fri, Jul 12, 2013 at 03:26:15PM +0200, Jean Delvare wrote: One thing I am a little worried about (but maybe I'm

Re: [PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-15 Thread Wei Ni
On 07/15/2013 03:24 PM, Jean Delvare wrote: On Mon, 15 Jul 2013 14:25:29 +0800, Wei Ni wrote: On 07/12/2013 10:40 PM, Guenter Roeck wrote: On Fri, Jul 12, 2013 at 04:30:34PM +0200, Jean Delvare wrote: If that means that for example the ACPI thermal zone is no longer displayed by sensors

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

2013-07-12 Thread Wei Ni
Enable thermal sensor nct1008 for t114 dalmore. Signed-off-by: Wei Ni --- arch/arm/boot/dts/tegra114-dalmore.dts |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts index cb640eb..47ec7eb 100644

[PATCH v3 0/4] Lm90 Enhancements

2013-07-12 Thread Wei Ni
Q" 2. add macro defines for the alarm status 3. consider the shared IRQ. Changes from RFC: 1. change _show_temp() to read_temp(), _set_temp() to write_temp(). 2. simply return value for the read_temp(), not use pointer. 3. use devm_request_threaded_irq() to request irq and set flag IRQF

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

2013-07-12 Thread Wei Ni
When the temperature exceed the limit range value, the driver can handle the interrupt. Signed-off-by: Wei Ni --- drivers/hwmon/lm90.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index c90037f..1cc3d19 100644

[PATCH v3 1/4] hwmon: (lm90) split set temp as common codes

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

[PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-12 Thread Wei Ni
-kernel@vger.kernel.org/msg465561.html Changes from v2: 1. remove the label "nct1008". Changes from v1: 1. add vendor strings "onnn" for nct1008 node. Changes from RFC: 1. Enable it for Tegra114 Dalmore. Wei Ni (2): ARM: dt: t30 cardhu: add dt entry for nct1008 ARM: dt: t114 d

[PATCH v3 1/2] ARM: dt: t30 cardhu: add dt entry for nct1008

2013-07-12 Thread Wei Ni
Enable thermal sensor nct1008 for t30 cardhu. Signed-off-by: Wei Ni --- arch/arm/boot/dts/tegra30-cardhu.dtsi |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi index f65b53d..e5759ca 100644 --- a/arch/arm

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

2013-07-12 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 --- drivers/hwmon/lm90.c | 179 -- 1 file changed, 114 insertions(+), 65 deletions(-) diff --git a/drivers/hwmon/lm90.c b

[PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-12 Thread Wei Ni
Add bit defines for the status register. Signed-off-by: Wei Ni --- drivers/hwmon/lm90.c | 72 ++ 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 5f30f90..c90037f 100644

[PATCH v3 2/4] hwmon: (lm90) use macro defines for the status bit

2013-07-12 Thread Wei Ni
Add bit defines for the status register. Signed-off-by: Wei Ni w...@nvidia.com --- drivers/hwmon/lm90.c | 72 ++ 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 5f30f90..c90037f

[PATCH v3 1/2] ARM: dt: t30 cardhu: add dt entry for nct1008

2013-07-12 Thread Wei Ni
Enable thermal sensor nct1008 for t30 cardhu. Signed-off-by: Wei Ni w...@nvidia.com --- arch/arm/boot/dts/tegra30-cardhu.dtsi |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi index f65b53d..e5759ca 100644

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

2013-07-12 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 | 179 -- 1 file changed, 114 insertions(+), 65 deletions(-) diff --git a/drivers/hwmon

[PATCH v3 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-12 Thread Wei Ni
-kernel@vger.kernel.org/msg465561.html Changes from v2: 1. remove the label nct1008. Changes from v1: 1. add vendor strings onnn for nct1008 node. Changes from RFC: 1. Enable it for Tegra114 Dalmore. Wei Ni (2): ARM: dt: t30 cardhu: add dt entry for nct1008 ARM: dt: t114 dalmore: add dt entry

[PATCH v3 0/4] Lm90 Enhancements

2013-07-12 Thread Wei Ni
defines for the alarm status 3. consider the shared IRQ. Changes from RFC: 1. change _show_temp() to read_temp(), _set_temp() to write_temp(). 2. simply return value for the read_temp(), not use pointer. 3. use devm_request_threaded_irq() to request irq and set flag IRQF_ONESHOT. Wei Ni (4): hwmon

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

2013-07-12 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 c90037f

[PATCH v3 1/4] hwmon: (lm90) split setshow temp as common codes

2013-07-12 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

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

2013-07-12 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 |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts index cb640eb..47ec7eb

[PATCH] mmc: dt: add host-off-card-on dt property

2013-07-11 Thread Wei Ni
Add "host-off-card-on" dt property and parse it to support the quirk SDHCI_QUIRK2_HOST_OFF_CARD_ON. Signed-off-by: Wei Ni --- Documentation/devicetree/bindings/mmc/mmc.txt |2 ++ drivers/mmc/host/sdhci-pltfm.c|3 +++ 2 files changed, 5 insertions(+)

Re: [PATCH v2 1/3] hwmon: (lm90) split set temp as common codes

2013-07-11 Thread Wei Ni
On 07/11/2013 02:21 AM, Guenter Roeck wrote: > On Wed, Jul 10, 2013 at 07:25:37PM +0800, Wei Ni wrote: >> Split set temp codes as common functions, so we can use it directly when >> implement linux thermal framework. >> >> Signed-off-by: Wei Ni >> --

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

2013-07-11 Thread Wei Ni
On 07/11/2013 02:18 AM, Guenter Roeck wrote: > On Wed, Jul 10, 2013 at 07:25:38PM +0800, Wei Ni wrote: >> When the temperature exceed the limit range value, >> the driver can handle the interrupt. >> >> Signed-off-by: Wei Ni >> --

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

2013-07-11 Thread Wei Ni
On 07/11/2013 02:12 AM, Guenter Roeck wrote: > On Wed, Jul 10, 2013 at 10:05:53AM -0700, Thierry Reding wrote: >> On Wed, Jul 10, 2013 at 07:25:38PM +0800, Wei Ni wrote: >>> When the temperature exceed the limit range value, >>> the driver can handle the interrupt. &g

Re: [PATCH v2 1/2] ARM: dt: t30 cardhu: add dt entry for nct1008

2013-07-11 Thread Wei Ni
On 07/11/2013 01:13 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Wed, Jul 10, 2013 at 07:29:57PM +0800, Wei Ni wrote: >> Enable thermal sensor nct1008 for t30 cardhu. > > Nit: "Tegra30 Cardhu" > >> diff --git a/arch/arm/boot/dts/teg

Re: [PATCH v2 1/2] ARM: dt: t30 cardhu: add dt entry for nct1008

2013-07-11 Thread Wei Ni
On 07/11/2013 01:13 AM, Thierry Reding wrote: * PGP Signed by an unknown key On Wed, Jul 10, 2013 at 07:29:57PM +0800, Wei Ni wrote: Enable thermal sensor nct1008 for t30 cardhu. Nit: Tegra30 Cardhu diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30

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

2013-07-11 Thread Wei Ni
On 07/11/2013 02:12 AM, Guenter Roeck wrote: On Wed, Jul 10, 2013 at 10:05:53AM -0700, Thierry Reding wrote: On Wed, Jul 10, 2013 at 07:25:38PM +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

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

2013-07-11 Thread Wei Ni
On 07/11/2013 02:18 AM, Guenter Roeck wrote: On Wed, Jul 10, 2013 at 07:25:38PM +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/hwmon/lm90.c | 77

Re: [PATCH v2 1/3] hwmon: (lm90) split setshow temp as common codes

2013-07-11 Thread Wei Ni
On 07/11/2013 02:21 AM, Guenter Roeck wrote: On Wed, Jul 10, 2013 at 07:25:37PM +0800, 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 | 118

[PATCH] mmc: dt: add host-off-card-on dt property

2013-07-11 Thread Wei Ni
Add host-off-card-on dt property and parse it to support the quirk SDHCI_QUIRK2_HOST_OFF_CARD_ON. Signed-off-by: Wei Ni w...@nvidia.com --- Documentation/devicetree/bindings/mmc/mmc.txt |2 ++ drivers/mmc/host/sdhci-pltfm.c|3 +++ 2 files changed, 5 insertions(+) diff

[PATCH v2 0/2] Enable lm90 in Tegra30 and Tegra114.

2013-07-10 Thread Wei Ni
;onnn" for nct1008 node. Changes from RFC: 1. Enable it for Tegra114 Dalmore. Wei Ni (2): ARM: dt: t30 cardhu: add dt entry for nct1008 ARM: dt: t114 dalmore: add dt entry for nct1008 arch/arm/boot/dts/tegra114-dalmore.dts |7 +++ arch/arm/boot/dts/tegra30-cardhu.dtsi |7

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

2013-07-10 Thread Wei Ni
Enable thermal sensor nct1008 for t114 dalmore. Signed-off-by: Wei Ni --- arch/arm/boot/dts/tegra114-dalmore.dts |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts index cb640eb..95c5079 100644

[PATCH v2 1/2] ARM: dt: t30 cardhu: add dt entry for nct1008

2013-07-10 Thread Wei Ni
Enable thermal sensor nct1008 for t30 cardhu. Signed-off-by: Wei Ni --- arch/arm/boot/dts/tegra30-cardhu.dtsi |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi index f65b53d..3d568a1 100644 --- a/arch/arm

<    4   5   6   7   8   9   10   11   >