All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-scsi@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] [PATCH 04/12] adt7470: Fix pwm*-auto-point* to be temp*-auto-point*
Date: Wed, 8 Oct 2008 11:25:29 +0200	[thread overview]
Message-ID: <20081008112529.7a13443c@hyperion.delvare> (raw)
In-Reply-To: <20081007011844.12701.12127.stgit@elm3a70.beaverton.ibm.com>

Hi Darrick,

On Mon, 06 Oct 2008 18:18:44 -0700, Darrick J. Wong wrote:
> It turns out that Tmin/Tmax should be attached to the temperature sensors, not
> to the pwm control.  Fix my misinterpretation of the datasheet.

Really? I'm confused. The ADT7470 has 4 PWM outputs and 10 temperature
inputs. There are only 4 Tmin registers. How can they be attached to
temperature inputs? What about inputs temp5 to temp10? I think your
original interpretation is correct and Tmin is attached to a PWM
channel, and this patch is incorrect. What makes you think otherwise?

> 
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> 
>  drivers/hwmon/adt7470.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c
> index d368d8f..656bf3d 100644
> --- a/drivers/hwmon/adt7470.c
> +++ b/drivers/hwmon/adt7470.c
> @@ -888,22 +888,22 @@ static SENSOR_DEVICE_ATTR(pwm3_auto_point2_pwm, S_IWUSR | S_IRUGO,
>  static SENSOR_DEVICE_ATTR(pwm4_auto_point2_pwm, S_IWUSR | S_IRUGO,
>  		    show_pwm_max, set_pwm_max, 3);
>  
> -static SENSOR_DEVICE_ATTR(pwm1_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp1_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 0);
> -static SENSOR_DEVICE_ATTR(pwm2_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp2_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 1);
> -static SENSOR_DEVICE_ATTR(pwm3_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp3_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 2);
> -static SENSOR_DEVICE_ATTR(pwm4_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp4_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 3);
>  
> -static SENSOR_DEVICE_ATTR(pwm1_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp1_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 0);
> -static SENSOR_DEVICE_ATTR(pwm2_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp2_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 1);
> -static SENSOR_DEVICE_ATTR(pwm3_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp3_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 2);
> -static SENSOR_DEVICE_ATTR(pwm4_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp4_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 3);
>  
>  static SENSOR_DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
> @@ -996,14 +996,14 @@ static struct attribute *adt7470_attr[] =
>  	&sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr,
>  	&sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr,
>  	&sensor_dev_attr_pwm4_auto_point2_pwm.dev_attr.attr,
> -	&sensor_dev_attr_pwm1_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm2_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm3_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm4_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm1_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm2_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm3_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm4_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp1_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp2_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp3_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp4_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp1_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp2_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp3_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp4_auto_point2_temp.dev_attr.attr,
>  	&sensor_dev_attr_pwm1_enable.dev_attr.attr,
>  	&sensor_dev_attr_pwm2_enable.dev_attr.attr,
>  	&sensor_dev_attr_pwm3_enable.dev_attr.attr,
> 
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


-- 
Jean Delvare

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-scsi@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] [PATCH 04/12] adt7470: Fix pwm*-auto-point* to be
Date: Wed, 08 Oct 2008 09:25:29 +0000	[thread overview]
Message-ID: <20081008112529.7a13443c@hyperion.delvare> (raw)
In-Reply-To: <20081007011844.12701.12127.stgit@elm3a70.beaverton.ibm.com>

Hi Darrick,

On Mon, 06 Oct 2008 18:18:44 -0700, Darrick J. Wong wrote:
> It turns out that Tmin/Tmax should be attached to the temperature sensors, not
> to the pwm control.  Fix my misinterpretation of the datasheet.

Really? I'm confused. The ADT7470 has 4 PWM outputs and 10 temperature
inputs. There are only 4 Tmin registers. How can they be attached to
temperature inputs? What about inputs temp5 to temp10? I think your
original interpretation is correct and Tmin is attached to a PWM
channel, and this patch is incorrect. What makes you think otherwise?

> 
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> 
>  drivers/hwmon/adt7470.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c
> index d368d8f..656bf3d 100644
> --- a/drivers/hwmon/adt7470.c
> +++ b/drivers/hwmon/adt7470.c
> @@ -888,22 +888,22 @@ static SENSOR_DEVICE_ATTR(pwm3_auto_point2_pwm, S_IWUSR | S_IRUGO,
>  static SENSOR_DEVICE_ATTR(pwm4_auto_point2_pwm, S_IWUSR | S_IRUGO,
>  		    show_pwm_max, set_pwm_max, 3);
>  
> -static SENSOR_DEVICE_ATTR(pwm1_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp1_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 0);
> -static SENSOR_DEVICE_ATTR(pwm2_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp2_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 1);
> -static SENSOR_DEVICE_ATTR(pwm3_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp3_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 2);
> -static SENSOR_DEVICE_ATTR(pwm4_auto_point1_temp, S_IWUSR | S_IRUGO,
> +static SENSOR_DEVICE_ATTR(temp4_auto_point1_temp, S_IWUSR | S_IRUGO,
>  		    show_pwm_tmin, set_pwm_tmin, 3);
>  
> -static SENSOR_DEVICE_ATTR(pwm1_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp1_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 0);
> -static SENSOR_DEVICE_ATTR(pwm2_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp2_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 1);
> -static SENSOR_DEVICE_ATTR(pwm3_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp3_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 2);
> -static SENSOR_DEVICE_ATTR(pwm4_auto_point2_temp, S_IRUGO, show_pwm_tmax,
> +static SENSOR_DEVICE_ATTR(temp4_auto_point2_temp, S_IRUGO, show_pwm_tmax,
>  		    NULL, 3);
>  
>  static SENSOR_DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
> @@ -996,14 +996,14 @@ static struct attribute *adt7470_attr[] >  	&sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr,
>  	&sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr,
>  	&sensor_dev_attr_pwm4_auto_point2_pwm.dev_attr.attr,
> -	&sensor_dev_attr_pwm1_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm2_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm3_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm4_auto_point1_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm1_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm2_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm3_auto_point2_temp.dev_attr.attr,
> -	&sensor_dev_attr_pwm4_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp1_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp2_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp3_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp4_auto_point1_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp1_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp2_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp3_auto_point2_temp.dev_attr.attr,
> +	&sensor_dev_attr_temp4_auto_point2_temp.dev_attr.attr,
>  	&sensor_dev_attr_pwm1_enable.dev_attr.attr,
>  	&sensor_dev_attr_pwm2_enable.dev_attr.attr,
>  	&sensor_dev_attr_pwm3_enable.dev_attr.attr,
> 
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2008-10-08  9:25 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07  1:18 [PATCH 00/12] Various hwmon patches Darrick J. Wong
2008-10-07  1:18 ` [lm-sensors] " Darrick J. Wong
2008-10-07  1:18 ` [PATCH 01/12] hwmon: Define sysfs interface for energy consumption register Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] [PATCH 01/12] hwmon: Define sysfs interface for energy Darrick J. Wong
2008-10-08  8:09   ` [lm-sensors] [PATCH 01/12] hwmon: Define sysfs interface for energy consumption register Jean Delvare
2008-10-08  8:09     ` [lm-sensors] [PATCH 01/12] hwmon: Define sysfs interface for Jean Delvare
2008-10-07  1:18 ` [PATCH 02/12] adt7462: New hwmon driver Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] " Darrick J. Wong
2008-10-07  1:18 ` [PATCH 03/12] adt7473: Fix some bogosity in documentation file Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] [PATCH 03/12] adt7473: Fix some bogosity in Darrick J. Wong
2008-10-08  9:08   ` [lm-sensors] [PATCH 03/12] adt7473: Fix some bogosity in documentation file Jean Delvare
2008-10-08  9:08     ` [lm-sensors] [PATCH 03/12] adt7473: Fix some bogosity in Jean Delvare
2008-10-07  1:18 ` [PATCH 04/12] adt7470: Fix pwm*-auto-point* to be temp*-auto-point* Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] [PATCH 04/12] adt7470: Fix pwm*-auto-point* to be Darrick J. Wong
2008-10-08  9:25   ` Jean Delvare [this message]
2008-10-08  9:25     ` Jean Delvare
2008-10-08 18:36   ` [lm-sensors] [PATCH 04/12] adt7470: Fix pwm*-auto-point* to Darrick J. Wong
2008-10-07  1:18 ` [PATCH 05/12] adt7470: Add documentation Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] " Darrick J. Wong
2008-10-08  9:46   ` Jean Delvare
2008-10-08  9:46     ` Jean Delvare
2008-10-08 18:50   ` Darrick J. Wong
2008-10-09 10:31   ` Jean Delvare
2008-10-09 21:25   ` Darrick J. Wong
2008-10-10  8:25   ` Jean Delvare
2008-10-07  1:18 ` [PATCH 06/12] adt7470: Load automatically on IntelliStation Z30 via DMI Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] [PATCH 06/12] adt7470: Load automatically on Darrick J. Wong
2008-10-08 11:08   ` [lm-sensors] [PATCH 06/12] adt7470: Load automatically on IntelliStation Z30 via DMI Jean Delvare
2008-10-08 11:08     ` [lm-sensors] [PATCH 06/12] adt7470: Load automatically on Jean Delvare
2008-10-07  1:18 ` [PATCH 07/12] ics932s401: New driver Darrick J. Wong
2008-10-07  1:18   ` [lm-sensors] " Darrick J. Wong
2008-10-08 11:09   ` Jean Delvare
2008-10-08 11:09     ` Jean Delvare
2008-10-08 18:26   ` Darrick J. Wong
2008-10-09 11:37   ` Jean Delvare
2008-10-07  1:19 ` [PATCH 08/12] i5k_amb: Load automatically on all 5000/5400 chipsets Darrick J. Wong
2008-10-07  1:19   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on all Darrick J. Wong
2008-10-08 11:13   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on all 5000/5400 chipsets Jean Delvare
2008-10-08 11:13     ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on all Jean Delvare
2008-10-08 18:19   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on Darrick J. Wong
2008-10-09 11:43   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on all Jean Delvare
2008-10-10 17:54   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on Darrick J. Wong
2008-10-15  8:48   ` [lm-sensors] [PATCH 08/12] i5k_amb: Load automatically on all Jean Delvare
2008-10-07  1:19 ` [PATCH 09/12] ibmpex: Automatically load on IBM systems via DMI Darrick J. Wong
2008-10-07  1:19   ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM Darrick J. Wong
2008-10-08 12:01   ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM systems via DMI Jean Delvare
2008-10-08 12:01     ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM Jean Delvare
2008-10-08 14:33     ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM systems via DMI Christian Krafft
2008-10-08 14:33       ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM Christian Krafft
2008-10-08 18:09   ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on Darrick J. Wong
2008-10-09 11:47   ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on IBM Jean Delvare
2008-10-09 17:21   ` [lm-sensors] [PATCH 09/12] ibmpex: Automatically load on Darrick J. Wong
2008-10-07  1:19 ` [PATCH 10/12] ibmaem: Automatically load on IBM systems via DMI Darrick J. Wong
2008-10-07  1:19   ` [lm-sensors] [PATCH 10/12] ibmaem: Automatically load on IBM Darrick J. Wong
2008-10-07  1:19 ` [PATCH 11/12] adt7470: Check input range when sysfs files are written Darrick J. Wong
2008-10-07  1:19   ` [lm-sensors] [PATCH 11/12] adt7470: Check input range when sysfs Darrick J. Wong
2008-10-09  9:09   ` [lm-sensors] [PATCH 11/12] adt7470: Check input range when Jean Delvare
2008-10-07  1:19 ` [PATCH 12/12] adt7473: Check inputs from sysfs writes Darrick J. Wong
2008-10-07  1:19   ` [lm-sensors] " Darrick J. Wong
2008-10-07  1:27 ` [PATCH 00/12] Various hwmon patches Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081008112529.7a13443c@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=akpm@linux-foundation.org \
    --cc=djwong@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.