All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] [2.6.21] Add adt7467 to lm85
Date: Thu, 25 Jan 2007 16:38:25 +0000	[thread overview]
Message-ID: <20070125173825.c7a60c7e.khali@linux-fr.org> (raw)

Hi Olof,

You hit the wrong list. Hardware monitoring driver updates should be
directed to the lm-sensors list, to which I am replying.

On Thu, 25 Jan 2007 01:10:02 -0600, Olof Johansson wrote:
> Enable ADT7467 support in lm85.

Did you make sure that the ADT7467 is 100% compatible with the ADT7463?
The change of major revision number causes me to have a doubt.

> 
> Signed-off-by: Olof Johansson <olof at lixom.net>
> 
> Index: powerpc/drivers/hwmon/lm85.c
> =================================> --- powerpc.orig/drivers/hwmon/lm85.c
> +++ powerpc/drivers/hwmon/lm85.c
> @@ -37,7 +37,7 @@
>  static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
>  
>  /* Insmod parameters */
> -I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
> +I2C_CLIENT_INSMOD_7(lm85b, lm85c, adm1027, adt7463, adt7467, emc6d100, emc6d102);
>  
>  /* The LM85 registers */
>  
> @@ -75,6 +75,7 @@ I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm102
>  #define	LM85_VERSTEP_ADM1027		0x60
>  #define	LM85_VERSTEP_ADT7463		0x62
>  #define	LM85_VERSTEP_ADT7463C		0x6A
> +#define	LM85_VERSTEP_ADT7467		0x71
>  #define	LM85_VERSTEP_EMC6D100_A0        0x60
>  #define	LM85_VERSTEP_EMC6D100_A1        0x61
>  #define	LM85_VERSTEP_EMC6D102		0x65
> @@ -1172,6 +1173,9 @@ static int lm85_detect(struct i2c_adapte
>  			 || verstep = LM85_VERSTEP_ADT7463C) ) {
>  			kind = adt7463 ;
>  		} else if( company = LM85_COMPANY_ANALOG_DEV
> +		    && (verstep = LM85_VERSTEP_ADT7467) ) {
> +			kind = adt7467 ;
> +		} else if( company = LM85_COMPANY_ANALOG_DEV
>  		    && (verstep & LM85_VERSTEP_VMASK) = LM85_VERSTEP_GENERIC ) {
>  			dev_err(&adapter->dev, "Unrecognized version/stepping 0x%02x"
>  				" Defaulting to Generic LM85.\n", verstep );
> @@ -1223,6 +1227,8 @@ static int lm85_detect(struct i2c_adapte
>  		type_name = "adm1027";
>  	} else if ( kind = adt7463 ) {
>  		type_name = "adt7463";
> +	} else if ( kind = adt7467 ) {
> +		type_name = "adt7467";
>  	} else if ( kind = emc6d100){
>  		type_name = "emc6d100";
>  	} else if ( kind = emc6d102 ) {
> @@ -1410,7 +1416,8 @@ static struct lm85_data *lm85_update_dev
>  		/* Have to read extended bits first to "freeze" the
>  		 * more significant bits that are read later.
>  		 */
> -		if ( (data->type = adm1027) || (data->type = adt7463) ) {
> +		if ( (data->type = adm1027) || (data->type = adt7463) ||
> +		     (data->type = adt7467) ) {
>  			int ext1 = lm85_read_value(client,
>  						   ADM1027_REG_EXTEND_ADC1);
>  			int ext2 =  lm85_read_value(client,
> @@ -1459,7 +1466,7 @@ static struct lm85_data *lm85_update_dev
>  
>  		data->alarms = lm85_read_value(client, LM85_REG_ALARM1);
>  
> -		if ( data->type = adt7463 ) {
> +		if ( data->type = adt7463 || data->type = adt7467 ) {
>  			if( data->therm_total < ULONG_MAX - 256 ) {
>  			    data->therm_total +>  				lm85_read_value(client, ADT7463_REG_THERM );

Please also update Documentation/hwmon/lm85 and drivers/hwmon/Kconfig.

Thanks,
-- 
Jean Delvare


             reply	other threads:[~2007-01-25 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 16:38 Jean Delvare [this message]
2007-01-25 17:11 ` [lm-sensors] [PATCH] [2.6.21] Add adt7467 to lm85 Olof Johansson
2007-01-26  8:24 ` Jean Delvare

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=20070125173825.c7a60c7e.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.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.