All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <42274958.4050400@katalix.com>

diff --git a/a/1.txt b/N1/1.txt
index c1a82a9..1770111 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -3,107 +3,3 @@ attached.
 
 This driver will detect the adt7461 chip only if boot firmware
 has left the chip in its default lm90-compatible mode.
-
-
--------------- next part --------------
-i2c: add adt7461 chip support
-
-Signed-off-by: James Chapman <jchapman@katalix.com>
-
-The Analog Devices ADT7461 temperature sensor chip is compatible with
-the lm90 device provided its extended temperature range is not
-enabled.  The chip will be ignored if the boot firmware enables
-extended temperature range.
-
-Also, since the adt7461 treats temp values <0 as 0 and >127 as 127,
-the driver prevents temperature values outside the supported range
-from being set.
-
-Index: linux-2.6.i2c/drivers/i2c/chips/lm90.c
-=================================--- linux-2.6.i2c.orig/drivers/i2c/chips/lm90.c	2005-03-03 15:02:40.000000000 +0000
-+++ linux-2.6.i2c/drivers/i2c/chips/lm90.c	2005-03-03 15:44:34.000000000 +0000
-@@ -43,6 +43,12 @@
-  * variants. The extra address and features of the MAX6659 are not
-  * supported by this driver.
-  *
-+ * This driver also supports the ADT7461 chip from Analog Devices but
-+ * only in its "compatability mode". If an ADT7461 chip is found but
-+ * is configured in non-compatible mode (where its temperature
-+ * register values are decoded differently) it is ignored by this
-+ * driver.
-+ *
-  * Since the LM90 was the first chipset supported by this driver, most
-  * comments will refer to this chipset, but are actually general and
-  * concern all supported chipsets, unless mentioned otherwise.
-@@ -76,6 +82,7 @@
-  * LM86, LM89, LM90, LM99, ADM1032, MAX6657 and MAX6658 have address 0x4c.
-  * LM89-1, and LM99-1 have address 0x4d.
-  * MAX6659 can have address 0x4c, 0x4d or 0x4e (unsupported).
-+ * ADT7461 always has address 0x4c.
-  */
- 
- static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END };
-@@ -85,7 +92,7 @@
-  * Insmod parameters
-  */
- 
--SENSORS_INSMOD_5(lm90, adm1032, lm99, lm86, max6657);
-+SENSORS_INSMOD_6(lm90, adm1032, lm99, lm86, max6657, adt7461);
- 
- /*
-  * The LM90 registers
-@@ -180,6 +187,7 @@
- 	struct semaphore update_lock;
- 	char valid; /* zero until following fields are valid */
- 	unsigned long last_updated; /* in jiffies */
-+	int kind;
- 
- 	/* registers values */
- 	s8 temp_input1, temp_low1, temp_high1; /* local */
-@@ -221,6 +229,8 @@
- 	struct i2c_client *client = to_i2c_client(dev); \
- 	struct lm90_data *data = i2c_get_clientdata(client); \
- 	long val = simple_strtol(buf, NULL, 10); \
-+	if ((data->kind = adt7461) && ((val < 0) || (val > 127000))) \
-+		return -EINVAL; \
- 	data->value = TEMP1_TO_REG(val); \
- 	i2c_smbus_write_byte_data(client, reg, data->value); \
- 	return count; \
-@@ -232,6 +242,8 @@
- 	struct i2c_client *client = to_i2c_client(dev); \
- 	struct lm90_data *data = i2c_get_clientdata(client); \
- 	long val = simple_strtol(buf, NULL, 10); \
-+	if ((data->kind = adt7461) && ((val < 0) || (val > 127000))) \
-+		return -EINVAL; \
- 	data->value = TEMP2_TO_REG(val); \
- 	i2c_smbus_write_byte_data(client, regh, data->value >> 8); \
- 	i2c_smbus_write_byte_data(client, regl, data->value & 0xff); \
-@@ -386,6 +398,12 @@
- 			 && (reg_config1 & 0x3F) = 0x00
- 			 && reg_convrate <= 0x0A) {
- 				kind = adm1032;
-+			} else
-+			if (address = 0x4c
-+			 && chip_id = 0x51 /* ADT7461 */
-+			 && (reg_config1 & 0x3F) = 0x00
-+			 && reg_convrate <= 0x0A) {
-+				kind = adt7461;
- 			}
- 		} else
- 		if (man_id = 0x4D) { /* Maxim */
-@@ -423,12 +441,15 @@
- 		name = "lm86";
- 	} else if (kind = max6657) {
- 		name = "max6657";
-+	} else if (kind = adt7461) {
-+		name = "adt7461";
- 	}
- 
- 	/* We can fill in the remaining client fields */
- 	strlcpy(new_client->name, name, I2C_NAME_SIZE);
- 	new_client->id = lm90_id++;
- 	data->valid = 0;
-+	data->kind = kind;
- 	init_MUTEX(&data->update_lock);
- 
- 	/* Tell the I2C layer a new client has arrived */
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..57c503c
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/plain;
+ name="adt7461.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="adt7461.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..546273a
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,102 @@
+i2c: add adt7461 chip support
+
+Signed-off-by: James Chapman <jchapman@katalix.com>
+
+The Analog Devices ADT7461 temperature sensor chip is compatible with
+the lm90 device provided its extended temperature range is not
+enabled.  The chip will be ignored if the boot firmware enables
+extended temperature range.
+
+Also, since the adt7461 treats temp values <0 as 0 and >127 as 127,
+the driver prevents temperature values outside the supported range
+from being set.
+
+Index: linux-2.6.i2c/drivers/i2c/chips/lm90.c
+===================================================================
+--- linux-2.6.i2c.orig/drivers/i2c/chips/lm90.c	2005-03-03 15:02:40.000000000 +0000
++++ linux-2.6.i2c/drivers/i2c/chips/lm90.c	2005-03-03 15:44:34.000000000 +0000
+@@ -43,6 +43,12 @@
+  * variants. The extra address and features of the MAX6659 are not
+  * supported by this driver.
+  *
++ * This driver also supports the ADT7461 chip from Analog Devices but
++ * only in its "compatability mode". If an ADT7461 chip is found but
++ * is configured in non-compatible mode (where its temperature
++ * register values are decoded differently) it is ignored by this
++ * driver.
++ *
+  * Since the LM90 was the first chipset supported by this driver, most
+  * comments will refer to this chipset, but are actually general and
+  * concern all supported chipsets, unless mentioned otherwise.
+@@ -76,6 +82,7 @@
+  * LM86, LM89, LM90, LM99, ADM1032, MAX6657 and MAX6658 have address 0x4c.
+  * LM89-1, and LM99-1 have address 0x4d.
+  * MAX6659 can have address 0x4c, 0x4d or 0x4e (unsupported).
++ * ADT7461 always has address 0x4c.
+  */
+ 
+ static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END };
+@@ -85,7 +92,7 @@
+  * Insmod parameters
+  */
+ 
+-SENSORS_INSMOD_5(lm90, adm1032, lm99, lm86, max6657);
++SENSORS_INSMOD_6(lm90, adm1032, lm99, lm86, max6657, adt7461);
+ 
+ /*
+  * The LM90 registers
+@@ -180,6 +187,7 @@
+ 	struct semaphore update_lock;
+ 	char valid; /* zero until following fields are valid */
+ 	unsigned long last_updated; /* in jiffies */
++	int kind;
+ 
+ 	/* registers values */
+ 	s8 temp_input1, temp_low1, temp_high1; /* local */
+@@ -221,6 +229,8 @@
+ 	struct i2c_client *client = to_i2c_client(dev); \
+ 	struct lm90_data *data = i2c_get_clientdata(client); \
+ 	long val = simple_strtol(buf, NULL, 10); \
++	if ((data->kind == adt7461) && ((val < 0) || (val > 127000))) \
++		return -EINVAL; \
+ 	data->value = TEMP1_TO_REG(val); \
+ 	i2c_smbus_write_byte_data(client, reg, data->value); \
+ 	return count; \
+@@ -232,6 +242,8 @@
+ 	struct i2c_client *client = to_i2c_client(dev); \
+ 	struct lm90_data *data = i2c_get_clientdata(client); \
+ 	long val = simple_strtol(buf, NULL, 10); \
++	if ((data->kind == adt7461) && ((val < 0) || (val > 127000))) \
++		return -EINVAL; \
+ 	data->value = TEMP2_TO_REG(val); \
+ 	i2c_smbus_write_byte_data(client, regh, data->value >> 8); \
+ 	i2c_smbus_write_byte_data(client, regl, data->value & 0xff); \
+@@ -386,6 +398,12 @@
+ 			 && (reg_config1 & 0x3F) == 0x00
+ 			 && reg_convrate <= 0x0A) {
+ 				kind = adm1032;
++			} else
++			if (address == 0x4c
++			 && chip_id == 0x51 /* ADT7461 */
++			 && (reg_config1 & 0x3F) == 0x00
++			 && reg_convrate <= 0x0A) {
++				kind = adt7461;
+ 			}
+ 		} else
+ 		if (man_id == 0x4D) { /* Maxim */
+@@ -423,12 +441,15 @@
+ 		name = "lm86";
+ 	} else if (kind == max6657) {
+ 		name = "max6657";
++	} else if (kind == adt7461) {
++		name = "adt7461";
+ 	}
+ 
+ 	/* We can fill in the remaining client fields */
+ 	strlcpy(new_client->name, name, I2C_NAME_SIZE);
+ 	new_client->id = lm90_id++;
+ 	data->valid = 0;
++	data->kind = kind;
+ 	init_MUTEX(&data->update_lock);
+ 
+ 	/* Tell the I2C layer a new client has arrived */
diff --git a/a/content_digest b/N1/content_digest
index 40a6475..b0847b0 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,22 +1,22 @@
  "ref\04223513F.4030403@katalix.com\0"
  "ref\020050302165532.GB2311@kroah.com\0"
  "ref\020050302203721.7cce650d.khali@linux-fr.org\0"
- "From\0jchapman@katalix.com (James Chapman)\0"
- "Subject\0[PATCH: 2.6.11-rc5] i2c chips: add adt7461 support to lm90 driver\0"
- "Date\0Thu, 19 May 2005 06:25:41 +0000\0"
+ "From\0James Chapman <jchapman@katalix.com>\0"
+ "Subject\0Re: [PATCH: 2.6.11-rc5] i2c chips: add adt7461 support to lm90 driver\0"
+ "Date\0Thu, 03 Mar 2005 17:28:56 +0000\0"
  "To\0LKML <linux-kernel@vger.kernel.org>\0"
  "Cc\0LM Sensors <sensors@stimpy.netroedge.com>"
  " Greg KH <greg@kroah.com>\0"
- "\00:1\0"
+ "\01:1\0"
  "b\0"
  "A revised adt7461 patch addressing all of Jean's comments is\n"
  "attached.\n"
  "\n"
  "This driver will detect the adt7461 chip only if boot firmware\n"
- "has left the chip in its default lm90-compatible mode.\n"
- "\n"
- "\n"
- "-------------- next part --------------\n"
+ has left the chip in its default lm90-compatible mode.
+ "\01:2\0"
+ "fn\0adt7461.patch\0"
+ "b\0"
  "i2c: add adt7461 chip support\n"
  "\n"
  "Signed-off-by: James Chapman <jchapman@katalix.com>\n"
@@ -31,7 +31,8 @@
  "from being set.\n"
  "\n"
  "Index: linux-2.6.i2c/drivers/i2c/chips/lm90.c\n"
- "=================================--- linux-2.6.i2c.orig/drivers/i2c/chips/lm90.c\t2005-03-03 15:02:40.000000000 +0000\n"
+ "===================================================================\n"
+ "--- linux-2.6.i2c.orig/drivers/i2c/chips/lm90.c\t2005-03-03 15:02:40.000000000 +0000\n"
  "+++ linux-2.6.i2c/drivers/i2c/chips/lm90.c\t2005-03-03 15:44:34.000000000 +0000\n"
  "@@ -43,6 +43,12 @@\n"
  "  * variants. The extra address and features of the MAX6659 are not\n"
@@ -75,7 +76,7 @@
  " \tstruct i2c_client *client = to_i2c_client(dev); \\\n"
  " \tstruct lm90_data *data = i2c_get_clientdata(client); \\\n"
  " \tlong val = simple_strtol(buf, NULL, 10); \\\n"
- "+\tif ((data->kind = adt7461) && ((val < 0) || (val > 127000))) \\\n"
+ "+\tif ((data->kind == adt7461) && ((val < 0) || (val > 127000))) \\\n"
  "+\t\treturn -EINVAL; \\\n"
  " \tdata->value = TEMP1_TO_REG(val); \\\n"
  " \ti2c_smbus_write_byte_data(client, reg, data->value); \\\n"
@@ -84,29 +85,29 @@
  " \tstruct i2c_client *client = to_i2c_client(dev); \\\n"
  " \tstruct lm90_data *data = i2c_get_clientdata(client); \\\n"
  " \tlong val = simple_strtol(buf, NULL, 10); \\\n"
- "+\tif ((data->kind = adt7461) && ((val < 0) || (val > 127000))) \\\n"
+ "+\tif ((data->kind == adt7461) && ((val < 0) || (val > 127000))) \\\n"
  "+\t\treturn -EINVAL; \\\n"
  " \tdata->value = TEMP2_TO_REG(val); \\\n"
  " \ti2c_smbus_write_byte_data(client, regh, data->value >> 8); \\\n"
  " \ti2c_smbus_write_byte_data(client, regl, data->value & 0xff); \\\n"
  "@@ -386,6 +398,12 @@\n"
- " \t\t\t && (reg_config1 & 0x3F) = 0x00\n"
+ " \t\t\t && (reg_config1 & 0x3F) == 0x00\n"
  " \t\t\t && reg_convrate <= 0x0A) {\n"
  " \t\t\t\tkind = adm1032;\n"
  "+\t\t\t} else\n"
- "+\t\t\tif (address = 0x4c\n"
- "+\t\t\t && chip_id = 0x51 /* ADT7461 */\n"
- "+\t\t\t && (reg_config1 & 0x3F) = 0x00\n"
+ "+\t\t\tif (address == 0x4c\n"
+ "+\t\t\t && chip_id == 0x51 /* ADT7461 */\n"
+ "+\t\t\t && (reg_config1 & 0x3F) == 0x00\n"
  "+\t\t\t && reg_convrate <= 0x0A) {\n"
  "+\t\t\t\tkind = adt7461;\n"
  " \t\t\t}\n"
  " \t\t} else\n"
- " \t\tif (man_id = 0x4D) { /* Maxim */\n"
+ " \t\tif (man_id == 0x4D) { /* Maxim */\n"
  "@@ -423,12 +441,15 @@\n"
  " \t\tname = \"lm86\";\n"
- " \t} else if (kind = max6657) {\n"
+ " \t} else if (kind == max6657) {\n"
  " \t\tname = \"max6657\";\n"
- "+\t} else if (kind = adt7461) {\n"
+ "+\t} else if (kind == adt7461) {\n"
  "+\t\tname = \"adt7461\";\n"
  " \t}\n"
  " \n"
@@ -119,4 +120,4 @@
  " \n"
  " \t/* Tell the I2C layer a new client has arrived */"
 
-d3ded8cabb692caf369a38e051c14f361a1104fabe586a3bfd25291b2fb64978
+4f73ecec407efe9722010f32de65fb0da1c3a95ce45bc3f6f6bf2bd572fad4e0

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.