public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/hwmon/emc1403.c: add new revision numbers to emc1403_detect()
@ 2014-05-12 11:48 Josef Gajdusek
  2014-05-12 13:11 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Josef Gajdusek @ 2014-05-12 11:48 UTC (permalink / raw)
  To: jdelvare; +Cc: linux, lm-sensors, linux-kernel

Adds new chip revision numbers to emc1403.c. Altough the datasheet (for emc1412) does not say so directly, it seems to suggest, that chips with revision ID 0x03 exist.

Signed-off-by: Josef Gajdusek <atx@atx.name>
---
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
index 61d89d6..b2b6a52 100644
--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -330,7 +330,7 @@ static int emc1403_detect(struct i2c_client *client,
 	}
 
 	id = i2c_smbus_read_byte_data(client, THERMAL_REVISION_REG);
-	if (id != 0x01)
+	if (id < 0x01 || id > 0x04)
 		return -ENODEV;
 
 	return 0;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/hwmon/emc1403.c: add new revision numbers to emc1403_detect()
  2014-05-12 11:48 [PATCH] drivers/hwmon/emc1403.c: add new revision numbers to emc1403_detect() Josef Gajdusek
@ 2014-05-12 13:11 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2014-05-12 13:11 UTC (permalink / raw)
  To: Josef Gajdusek, jdelvare; +Cc: lm-sensors, linux-kernel

On 05/12/2014 04:48 AM, Josef Gajdusek wrote:
> Adds new chip revision numbers to emc1403.c. Altough the datasheet (for emc1412) does not say so directly, it seems to suggest, that chips with revision ID 0x03 exist.
>

In Table 10.1:

Rev. 1.37 (12-23-09) Section 7.17, "Revision Register"

Changed default from 01h to 03h to match the actual value.

Rev. 1.38 changed it to 0x04.

> Signed-off-by: Josef Gajdusek <atx@atx.name>

Thanks, will apply.

Guenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-12 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 11:48 [PATCH] drivers/hwmon/emc1403.c: add new revision numbers to emc1403_detect() Josef Gajdusek
2014-05-12 13:11 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox