All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add support for several
Date: Fri, 09 Jul 2010 09:15:08 +0000	[thread overview]
Message-ID: <20100709111508.7e8ceabf@hyperion.delvare> (raw)
In-Reply-To: <20100706222437.GA31051@ericsson.com>

Hi Gunter,

On Thu, 8 Jul 2010 13:15:06 -0700, Guenter Roeck wrote:
> This patch adds support for several JC42.4 compliant temperature sensors to
> sensors-detect.

Applied, thanks.

> ---
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5851)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -1195,6 +1195,51 @@
>  		i2c_addrs => [0x18..0x1f],
>  		i2c_detect => sub { jedec_JC42_4_detect(@_, 1); },
>  	}, {
> +		name => "NXP SE98",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 2); },
> +	}, {
> +		name => "Analog Devices ADT7408",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 3); },
> +	}, {
> +		name => "IDT TS3000/TSE2002",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 4); },
> +	}, {
> +		name => "Maxim MAX6604",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 5); },
> +	}, {
> +		name => "Microchip MCP98242",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 6); },
> +	}, {
> +		name => "Microchip MCP98243",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
> +	}, {
> +		name => "Microchip MCP9843",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 8); },
> +	}, {
> +		name => "ON CAT6095/CAT34TS02",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 9); },
> +	}, {
> +		name => "ST STTS424E",
> +		driver => "to-be-written",
> +		i2c_addrs => [0x18..0x1f],
> +		i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
> +	}, {

FYI, I moved this one right after the STTS424 entry. The output of
sensors-detect looks slightly nicer when several chips of the same
manufacturer are tested in a row.

>  		name => "Smart Battery",
>  		driver => "sbs", # ACPI driver, not sure if it always works
>  		i2c_addrs => [0x0b],
> @@ -5314,7 +5359,10 @@
>  	return 6;
>  }
>  
> -# Chip to detect: 0 = STTS424, 1 = SE97/SE97B
> +# Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
> +#                 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
> +#                 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
> +#                 10 = STTS424E
>  # Registers used:
>  #   0x00: Capabilities
>  #   0x01: Configuration
> @@ -5340,10 +5388,37 @@
>  
>  	if ($chip = 0) {
>  		return unless $manid = 0x10;		# STMicrolectronics
> -		return unless $devid = 0x00;		# STTS424
> +		return unless $devid = 0x01;		# STTS424
>  	} elsif ($chip = 1) {
>  		return unless $manid = 0x11;		# NXP
>  		return unless $devid = 0xa2;		# SE97
> +	} elsif ($chip = 2) {
> +		return unless $manid = 0x11;		# NXP
> +		return unless $devid = 0xa1;		# SE98
> +	} elsif ($chip = 3) {
> +		return unless $manid = 0x11;		# ADT
> +		return unless $devid = 0x08;		# ADT7408
> +	} elsif ($chip = 4) {
> +		return unless $manid = 0x00;		# IDT
> +		return unless $devid = 0x29;		# TS3000/TSE2002
> +	} elsif ($chip = 5) {
> +		return unless $manid = 0x00;		# MAXIM
> +		return unless $devid = 0x3e;		# MAX6604
> +	} elsif ($chip = 6) {
> +		return unless $manid = 0x00;		# MCP
> +		return unless $devid = 0x20;		# MCP98242
> +	} elsif ($chip = 7) {
> +		return unless $manid = 0x00;		# MCP
> +		return unless $devid = 0x21;		# MCP98243
> +	} elsif ($chip = 8) {
> +		return unless $manid = 0x00;		# MCP
> +		return unless $devid = 0x00;		# MCP9843
> +	} elsif ($chip = 9) {
> +		return unless $manid = 0x1b;		# ONS
> +		return unless $devid = 0x08;		# CAT6095 / CAT34TS02
> +	} elsif ($chip = 10) {
> +		return unless $manid = 0x10;		# STMicrolectronics
> +		return unless $devid = 0x00;		# STTS424E02
>  	}
>  
>  	# Now, do it all again with words. Note that we get
> @@ -5358,10 +5433,37 @@
>  	return if $manid < 0 || $devid < 0;
>  	if ($chip = 0) {
>  		return unless $manid = 0x4a10;		# STMicrolectronics
> -		return unless ($devid & 0xfeff) = 0x0000; # STTS424
> +		return unless ($devid & 0xfeff) = 0x0001; # STTS424
>  	} elsif ($chip = 1) {
>  		return unless $manid = 0x3111;		# NXP
>  		return unless ($devid & 0xfcff) = 0x00a2; # SE97
> +	} elsif ($chip = 2) {
> +		return unless $manid = 0x3111;		# NXP
> +		return unless ($devid & 0xfcff) = 0x00a1; # SE98
> +	} elsif ($chip = 3) {
> +		return unless $manid = 0xd411;		# ADT
> +		return unless $devid = 0x0108;		# ADT7408
> +	} elsif ($chip = 4) {
> +		return unless $manid = 0xb300;		# IDT
> +		return unless $devid = 0x0329;		# TS3000/TSE2002
> +	} elsif ($chip = 5) {
> +		return unless $manid = 0x4d00;		# MAXIM
> +		return unless $devid = 0x003e;		# MAX6604
> +	} elsif ($chip = 6) {
> +		return unless $manid = 0x5400;		# MCP
> +		return unless ($devid & 0xfcff) = 0x0020; # MCP98242
> +	} elsif ($chip = 7) {
> +		return unless $manid = 0x5400;		# MCP
> +		return unless ($devid & 0xfcff) = 0x0021; # MCP98243
> +	} elsif ($chip = 8) {
> +		return unless $manid = 0x5400;		# MCP
> +		return unless ($devid & 0xfcff) = 0x0000; # MCP9843
> +	} elsif ($chip = 9) {
> +		return unless $manid = 0x091b;		# ONS
> +		return unless ($devid & 0xe0ff) = 0x0008; # CAT6095 / CAT34TS02
> +	} elsif ($chip = 10) {
> +		return unless $manid = 0x4a10;		# STMicrolectronics
> +		return unless ($devid & 0xfeff) = 0x0000; # STTS424E02
>  	}
>  
>  	return 5;
> Index: CHANGES
> =================================> --- CHANGES	(revision 5851)
> +++ CHANGES	(working copy)
> @@ -20,6 +20,7 @@
>                    Add support for STMicroelectronics STTS424
>                    Add support for NXP SE97 / SE97B
>                    Add reference to NCT6771F/NCT6772F/NCT6775F
> +                  Add support for several JC42.4 compliant temperature sensors
>  
>  3.1.2 (2010-02-02)
>    libsensors: Support upcoming sysfs path to i2c adapters


-- 
Jean Delvare

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

  parent reply	other threads:[~2010-07-09  9:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06 22:24 [lm-sensors] [PATCH] sensors-detect: Add support for NCT6775F and Guenter Roeck
2010-07-07 11:40 ` [lm-sensors] [PATCH] sensors-detect: Add support for NCT6775F Jean Delvare
2010-07-07 15:53 ` Jean Delvare
2010-07-07 16:03 ` Guenter Roeck
2010-07-07 19:32 ` Jean Delvare
2010-07-08 20:15 ` [lm-sensors] [PATCH] sensors-detect: Add support for several JC42.4 Guenter Roeck
2010-07-09  9:15 ` Jean Delvare [this message]
2010-09-08 15:35 ` [lm-sensors] [PATCH] sensors-detect: Add support for max6695/96 Guenter Roeck
2010-09-08 19:06 ` Jean Delvare
2010-09-08 19:39 ` Guenter Roeck
2011-06-26 20:38 ` [lm-sensors] [PATCH] sensors-detect: Add support for NXP/Philips Guenter Roeck

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=20100709111508.7e8ceabf@hyperion.delvare \
    --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.