* [PATCH v2] hwmon: (lm90) Add support for TI TMP451
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
@ 2013-10-09 5:40 ` Wei Ni
2012-01-23 17:24 ` Guenter Roeck
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-09 5:40 UTC (permalink / raw)
To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ
Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni
TI TMP451 is mostly compatible with ADT7461, except for
local temperature low byte and max conversion rate.
Add support to the LM90 driver.
Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Documentation/hwmon/lm90 | 6 ++++++
drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index b466974..ab81013 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -122,6 +122,12 @@ Supported chips:
Prefix: 'g781'
Addresses scanned: I2C 0x4c, 0x4d
Datasheet: Not publicly available from GMT
+ * Texas Instruments TMP451
+ Prefix: 'tmp451'
+ Addresses scanned: I2C 0x4c
+ Datasheet: Publicly available at TI website
+ http://www.ti.com/litv/pdf/sbos686
+
Author: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 82a1ca15..e9a5e30 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -60,6 +60,11 @@
* This driver also supports the G781 from GMT. This device is compatible
* with the ADM1032.
*
+ * This driver also supports TMP451 from Texas Instruments. This device is
+ * supported in both compatibility and extended mode. It's mostly compatible
+ * with ADT7461 except for local temperature low byte register and max
+ * conversion rate.
+ *
* 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.
@@ -111,7 +116,7 @@ static const unsigned short normal_i2c[] = {
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
- max6646, w83l771, max6696, sa56004, g781 };
+ max6646, w83l771, max6696, sa56004, g781, tmp451 };
/*
* The LM90 registers
@@ -168,6 +173,9 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
#define LM90_DEF_CONVRATE_RVAL 6 /* Def conversion rate register value */
#define LM90_MAX_CONVRATE_MS 16000 /* Maximum conversion rate in ms */
+/* TMP451 registers */
+#define TMP451_REG_R_LOCAL_TEMPL 0x15
+
/*
* Device flags
*/
@@ -206,6 +214,7 @@ static const struct i2c_device_id lm90_id[] = {
{ "nct1008", adt7461 },
{ "w83l771", w83l771 },
{ "sa56004", sa56004 },
+ { "tmp451", tmp451},
{ }
};
MODULE_DEVICE_TABLE(i2c, lm90_id);
@@ -294,6 +303,13 @@ static const struct lm90_params lm90_params[] = {
.max_convrate = 9,
.reg_local_ext = SA56004_REG_R_LOCAL_TEMPL,
},
+ [tmp451] = {
+ .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
+ | LM90_HAVE_BROKEN_ALERT,
+ .alert_alarms = 0x7c,
+ .max_convrate = 9,
+ .reg_local_ext = TMP451_REG_R_LOCAL_TEMPL,
+ }
};
/*
@@ -718,7 +734,7 @@ static int read_temp8(struct device *dev, int index)
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[index]);
else if (data->kind == max6646)
temp = temp_from_u8(data->temp8[index]);
@@ -762,7 +778,7 @@ static int write_temp8(struct device *dev, int index, long val)
val -= 16000;
mutex_lock(&data->update_lock);
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
data->temp8[index] = temp_to_u8_adt7461(data, val);
else if (data->kind == max6646)
data->temp8[index] = temp_to_u8(val);
@@ -803,7 +819,7 @@ static int read_temp11(struct device *dev, int index)
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
temp = temp_from_u16_adt7461(data, data->temp11[index]);
else if (data->kind == max6646)
temp = temp_from_u16(data->temp11[index]);
@@ -848,7 +864,7 @@ static int write_temp11(struct device *dev, int nr, int index, long val)
val -= 16000;
mutex_lock(&data->update_lock);
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
data->temp11[index] = temp_to_u16_adt7461(data, val);
else if (data->kind == max6646)
data->temp11[index] = temp_to_u8(val) << 8;
@@ -912,7 +928,7 @@ static ssize_t show_temphyst(struct device *dev,
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
else if (data->kind == max6646)
temp = temp_from_u8(data->temp8[attr->index]);
@@ -940,7 +956,7 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy,
return err;
mutex_lock(&data->update_lock);
- if (data->kind == adt7461)
+ if (data->kind == adt7461 || data->kind == tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[2]);
else if (data->kind == max6646)
temp = temp_from_u8(data->temp8[2]);
@@ -1368,6 +1384,19 @@ static int lm90_detect(struct i2c_client *client,
&& (config1 & 0x3F) == 0x00
&& convrate <= 0x08)
name = "g781";
+ } else
+ if (address == 0x4C
+ && man_id == 0x55) { /* Texas Instruments */
+ int local_ext;
+
+ local_ext = i2c_smbus_read_byte_data(client,
+ TMP451_REG_R_LOCAL_TEMPL);
+
+ if (chip_id == 0x00 /* TMP451 */
+ && (config1 & 0x1B) == 0x00
+ && convrate <= 0x09
+ && (local_ext & 0x0F) == 0x00)
+ name = "tmp451";
}
if (!name) { /* identification failed */
@@ -1429,7 +1458,7 @@ static void lm90_init_client(struct i2c_client *client)
data->config_orig = config;
/* Check Temperature Range Select */
- if (data->kind == adt7461) {
+ if (data->kind == adt7461 || data->kind == tmp451) {
if (config & 0x04)
data->flags |= LM90_FLAG_ADT7461_EXT;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-09 5:40 ` Wei Ni
0 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-09 5:40 UTC (permalink / raw)
To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ
Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni
TI TMP451 is mostly compatible with ADT7461, except for
local temperature low byte and max conversion rate.
Add support to the LM90 driver.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
Documentation/hwmon/lm90 | 6 ++++++
drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index b466974..ab81013 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -122,6 +122,12 @@ Supported chips:
Prefix: 'g781'
Addresses scanned: I2C 0x4c, 0x4d
Datasheet: Not publicly available from GMT
+ * Texas Instruments TMP451
+ Prefix: 'tmp451'
+ Addresses scanned: I2C 0x4c
+ Datasheet: Publicly available at TI website
+ http://www.ti.com/litv/pdf/sbos686
+
Author: Jean Delvare <khali@linux-fr.org>
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 82a1ca15..e9a5e30 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -60,6 +60,11 @@
* This driver also supports the G781 from GMT. This device is compatible
* with the ADM1032.
*
+ * This driver also supports TMP451 from Texas Instruments. This device is
+ * supported in both compatibility and extended mode. It's mostly compatible
+ * with ADT7461 except for local temperature low byte register and max
+ * conversion rate.
+ *
* 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.
@@ -111,7 +116,7 @@ static const unsigned short normal_i2c[] = {
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
- max6646, w83l771, max6696, sa56004, g781 };
+ max6646, w83l771, max6696, sa56004, g781, tmp451 };
/*
* The LM90 registers
@@ -168,6 +173,9 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
#define LM90_DEF_CONVRATE_RVAL 6 /* Def conversion rate register value */
#define LM90_MAX_CONVRATE_MS 16000 /* Maximum conversion rate in ms */
+/* TMP451 registers */
+#define TMP451_REG_R_LOCAL_TEMPL 0x15
+
/*
* Device flags
*/
@@ -206,6 +214,7 @@ static const struct i2c_device_id lm90_id[] = {
{ "nct1008", adt7461 },
{ "w83l771", w83l771 },
{ "sa56004", sa56004 },
+ { "tmp451", tmp451},
{ }
};
MODULE_DEVICE_TABLE(i2c, lm90_id);
@@ -294,6 +303,13 @@ static const struct lm90_params lm90_params[] = {
.max_convrate = 9,
.reg_local_ext = SA56004_REG_R_LOCAL_TEMPL,
},
+ [tmp451] = {
+ .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
+ | LM90_HAVE_BROKEN_ALERT,
+ .alert_alarms = 0x7c,
+ .max_convrate = 9,
+ .reg_local_ext = TMP451_REG_R_LOCAL_TEMPL,
+ }
};
/*
@@ -718,7 +734,7 @@ static int read_temp8(struct device *dev, int index)
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[index]);
else if (data->kind = max6646)
temp = temp_from_u8(data->temp8[index]);
@@ -762,7 +778,7 @@ static int write_temp8(struct device *dev, int index, long val)
val -= 16000;
mutex_lock(&data->update_lock);
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
data->temp8[index] = temp_to_u8_adt7461(data, val);
else if (data->kind = max6646)
data->temp8[index] = temp_to_u8(val);
@@ -803,7 +819,7 @@ static int read_temp11(struct device *dev, int index)
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
temp = temp_from_u16_adt7461(data, data->temp11[index]);
else if (data->kind = max6646)
temp = temp_from_u16(data->temp11[index]);
@@ -848,7 +864,7 @@ static int write_temp11(struct device *dev, int nr, int index, long val)
val -= 16000;
mutex_lock(&data->update_lock);
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
data->temp11[index] = temp_to_u16_adt7461(data, val);
else if (data->kind = max6646)
data->temp11[index] = temp_to_u8(val) << 8;
@@ -912,7 +928,7 @@ static ssize_t show_temphyst(struct device *dev,
struct lm90_data *data = lm90_update_device(dev);
int temp;
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
else if (data->kind = max6646)
temp = temp_from_u8(data->temp8[attr->index]);
@@ -940,7 +956,7 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy,
return err;
mutex_lock(&data->update_lock);
- if (data->kind = adt7461)
+ if (data->kind = adt7461 || data->kind = tmp451)
temp = temp_from_u8_adt7461(data, data->temp8[2]);
else if (data->kind = max6646)
temp = temp_from_u8(data->temp8[2]);
@@ -1368,6 +1384,19 @@ static int lm90_detect(struct i2c_client *client,
&& (config1 & 0x3F) = 0x00
&& convrate <= 0x08)
name = "g781";
+ } else
+ if (address = 0x4C
+ && man_id = 0x55) { /* Texas Instruments */
+ int local_ext;
+
+ local_ext = i2c_smbus_read_byte_data(client,
+ TMP451_REG_R_LOCAL_TEMPL);
+
+ if (chip_id = 0x00 /* TMP451 */
+ && (config1 & 0x1B) = 0x00
+ && convrate <= 0x09
+ && (local_ext & 0x0F) = 0x00)
+ name = "tmp451";
}
if (!name) { /* identification failed */
@@ -1429,7 +1458,7 @@ static void lm90_init_client(struct i2c_client *client)
data->config_orig = config;
/* Check Temperature Range Select */
- if (data->kind = adt7461) {
+ if (data->kind = adt7461 || data->kind = tmp451) {
if (config & 0x04)
data->flags |= LM90_FLAG_ADT7461_EXT;
}
--
1.7.9.5
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 19+ messages in thread[parent not found: <1381297248-13375-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <1381297248-13375-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-09 8:23 ` Jean Delvare
2013-10-09 15:17 ` [lm-sensors] " Guenter Roeck
1 sibling, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-09 8:23 UTC (permalink / raw)
To: Wei Ni
Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Hi Wei,
On Wed, 9 Oct 2013 13:40:48 +0800, Wei Ni wrote:
> TI TMP451 is mostly compatible with ADT7461, except for
> local temperature low byte and max conversion rate.
> Add support to the LM90 driver.
>
> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> Documentation/hwmon/lm90 | 6 ++++++
> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 43 insertions(+), 8 deletions(-)
If the lm90 driver supports and detects this chip then sensors-detect
should as well. I can do that for you if you provide a register dump of
your TMP451 chip (use the i2c-dev driver and i2cdump from the i2c-tools
package.)
Thanks,
--
Jean Delvare
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-09 8:23 ` Jean Delvare
0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-09 8:23 UTC (permalink / raw)
To: Wei Ni
Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Hi Wei,
On Wed, 9 Oct 2013 13:40:48 +0800, Wei Ni wrote:
> TI TMP451 is mostly compatible with ADT7461, except for
> local temperature low byte and max conversion rate.
> Add support to the LM90 driver.
>
> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
> Documentation/hwmon/lm90 | 6 ++++++
> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 43 insertions(+), 8 deletions(-)
If the lm90 driver supports and detects this chip then sensors-detect
should as well. I can do that for you if you provide a register dump of
your TMP451 chip (use the i2c-dev driver and i2cdump from the i2c-tools
package.)
Thanks,
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <20131009102323.169965ff-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <20131009102323.169965ff-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-10-09 8:57 ` Wei Ni
0 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-09 8:57 UTC (permalink / raw)
To: Jean Delvare
Cc: linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/09/2013 04:23 PM, Jean Delvare wrote:
> Hi Wei,
>
> On Wed, 9 Oct 2013 13:40:48 +0800, Wei Ni wrote:
>> TI TMP451 is mostly compatible with ADT7461, except for
>> local temperature low byte and max conversion rate.
>> Add support to the LM90 driver.
>>
>> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> ---
>> Documentation/hwmon/lm90 | 6 ++++++
>> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
>> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> If the lm90 driver supports and detects this chip then sensors-detect
> should as well. I can do that for you if you provide a register dump of
> your TMP451 chip (use the i2c-dev driver and i2cdump from the i2c-tools
> package.)
localhost device # i2cdump -f 0 0x4c
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x4c, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 5d 69 00 04 08 bf 00 ff 53 00 00 00 00 00 00 00 ]i.???..S.......
10: a0 00 00 00 00 f0 00 00 00 a9 00 00 00 00 00 00 ?....?...?......
20: b8 0a 01 00 00 XX 00 00 00 00 0e 00 00 00 00 00 ???..X....?.....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 00 ..............U.
localhost device #
Thanks.
Wei.
>
> Thanks,
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-09 8:57 ` Wei Ni
0 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-09 8:57 UTC (permalink / raw)
To: Jean Delvare
Cc: linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/09/2013 04:23 PM, Jean Delvare wrote:
> Hi Wei,
>
> On Wed, 9 Oct 2013 13:40:48 +0800, Wei Ni wrote:
>> TI TMP451 is mostly compatible with ADT7461, except for
>> local temperature low byte and max conversion rate.
>> Add support to the LM90 driver.
>>
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>> Documentation/hwmon/lm90 | 6 ++++++
>> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
>> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> If the lm90 driver supports and detects this chip then sensors-detect
> should as well. I can do that for you if you provide a register dump of
> your TMP451 chip (use the i2c-dev driver and i2cdump from the i2c-tools
> package.)
localhost device # i2cdump -f 0 0x4c
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x4c, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 5d 69 00 04 08 bf 00 ff 53 00 00 00 00 00 00 00 ]i.???..S.......
10: a0 00 00 00 00 f0 00 00 00 a9 00 00 00 00 00 00 ?....?...?......
20: b8 0a 01 00 00 XX 00 00 00 00 0e 00 00 00 00 00 ???..X....?.....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 00 ..............U.
localhost device #
Thanks.
Wei.
>
> Thanks,
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <1381297248-13375-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-09 15:17 ` Guenter Roeck
2013-10-09 15:17 ` [lm-sensors] " Guenter Roeck
1 sibling, 0 replies; 19+ messages in thread
From: Guenter Roeck @ 2013-10-09 15:17 UTC (permalink / raw)
To: Wei Ni
Cc: khali-PUYAD+kWke1g9hUCZPvPmw, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
> TI TMP451 is mostly compatible with ADT7461, except for
> local temperature low byte and max conversion rate.
> Add support to the LM90 driver.
>
> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Jean, I assume you'll take this one ? Otherwise, please let me know.
Thanks,
Guenter
> ---
> Documentation/hwmon/lm90 | 6 ++++++
> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> index b466974..ab81013 100644
> --- a/Documentation/hwmon/lm90
> +++ b/Documentation/hwmon/lm90
> @@ -122,6 +122,12 @@ Supported chips:
> Prefix: 'g781'
> Addresses scanned: I2C 0x4c, 0x4d
> Datasheet: Not publicly available from GMT
> + * Texas Instruments TMP451
> + Prefix: 'tmp451'
> + Addresses scanned: I2C 0x4c
> + Datasheet: Publicly available at TI website
> + http://www.ti.com/litv/pdf/sbos686
> +
>
> Author: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
>
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index 82a1ca15..e9a5e30 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -60,6 +60,11 @@
> * This driver also supports the G781 from GMT. This device is compatible
> * with the ADM1032.
> *
> + * This driver also supports TMP451 from Texas Instruments. This device is
> + * supported in both compatibility and extended mode. It's mostly compatible
> + * with ADT7461 except for local temperature low byte register and max
> + * conversion rate.
> + *
> * 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.
> @@ -111,7 +116,7 @@ static const unsigned short normal_i2c[] = {
> 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
>
> enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
> - max6646, w83l771, max6696, sa56004, g781 };
> + max6646, w83l771, max6696, sa56004, g781, tmp451 };
>
> /*
> * The LM90 registers
> @@ -168,6 +173,9 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
> #define LM90_DEF_CONVRATE_RVAL 6 /* Def conversion rate register value */
> #define LM90_MAX_CONVRATE_MS 16000 /* Maximum conversion rate in ms */
>
> +/* TMP451 registers */
> +#define TMP451_REG_R_LOCAL_TEMPL 0x15
> +
> /*
> * Device flags
> */
> @@ -206,6 +214,7 @@ static const struct i2c_device_id lm90_id[] = {
> { "nct1008", adt7461 },
> { "w83l771", w83l771 },
> { "sa56004", sa56004 },
> + { "tmp451", tmp451},
> { }
> };
> MODULE_DEVICE_TABLE(i2c, lm90_id);
> @@ -294,6 +303,13 @@ static const struct lm90_params lm90_params[] = {
> .max_convrate = 9,
> .reg_local_ext = SA56004_REG_R_LOCAL_TEMPL,
> },
> + [tmp451] = {
> + .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
> + | LM90_HAVE_BROKEN_ALERT,
> + .alert_alarms = 0x7c,
> + .max_convrate = 9,
> + .reg_local_ext = TMP451_REG_R_LOCAL_TEMPL,
> + }
> };
>
> /*
> @@ -718,7 +734,7 @@ static int read_temp8(struct device *dev, int index)
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[index]);
> else if (data->kind == max6646)
> temp = temp_from_u8(data->temp8[index]);
> @@ -762,7 +778,7 @@ static int write_temp8(struct device *dev, int index, long val)
> val -= 16000;
>
> mutex_lock(&data->update_lock);
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> data->temp8[index] = temp_to_u8_adt7461(data, val);
> else if (data->kind == max6646)
> data->temp8[index] = temp_to_u8(val);
> @@ -803,7 +819,7 @@ static int read_temp11(struct device *dev, int index)
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> temp = temp_from_u16_adt7461(data, data->temp11[index]);
> else if (data->kind == max6646)
> temp = temp_from_u16(data->temp11[index]);
> @@ -848,7 +864,7 @@ static int write_temp11(struct device *dev, int nr, int index, long val)
> val -= 16000;
>
> mutex_lock(&data->update_lock);
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> data->temp11[index] = temp_to_u16_adt7461(data, val);
> else if (data->kind == max6646)
> data->temp11[index] = temp_to_u8(val) << 8;
> @@ -912,7 +928,7 @@ static ssize_t show_temphyst(struct device *dev,
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
> else if (data->kind == max6646)
> temp = temp_from_u8(data->temp8[attr->index]);
> @@ -940,7 +956,7 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy,
> return err;
>
> mutex_lock(&data->update_lock);
> - if (data->kind == adt7461)
> + if (data->kind == adt7461 || data->kind == tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[2]);
> else if (data->kind == max6646)
> temp = temp_from_u8(data->temp8[2]);
> @@ -1368,6 +1384,19 @@ static int lm90_detect(struct i2c_client *client,
> && (config1 & 0x3F) == 0x00
> && convrate <= 0x08)
> name = "g781";
> + } else
> + if (address == 0x4C
> + && man_id == 0x55) { /* Texas Instruments */
> + int local_ext;
> +
> + local_ext = i2c_smbus_read_byte_data(client,
> + TMP451_REG_R_LOCAL_TEMPL);
> +
> + if (chip_id == 0x00 /* TMP451 */
> + && (config1 & 0x1B) == 0x00
> + && convrate <= 0x09
> + && (local_ext & 0x0F) == 0x00)
> + name = "tmp451";
> }
>
> if (!name) { /* identification failed */
> @@ -1429,7 +1458,7 @@ static void lm90_init_client(struct i2c_client *client)
> data->config_orig = config;
>
> /* Check Temperature Range Select */
> - if (data->kind == adt7461) {
> + if (data->kind == adt7461 || data->kind == tmp451) {
> if (config & 0x04)
> data->flags |= LM90_FLAG_ADT7461_EXT;
> }
> --
> 1.7.9.5
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-09 15:17 ` Guenter Roeck
0 siblings, 0 replies; 19+ messages in thread
From: Guenter Roeck @ 2013-10-09 15:17 UTC (permalink / raw)
To: Wei Ni
Cc: khali-PUYAD+kWke1g9hUCZPvPmw, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
> TI TMP451 is mostly compatible with ADT7461, except for
> local temperature low byte and max conversion rate.
> Add support to the LM90 driver.
>
> Signed-off-by: Wei Ni <wni@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Jean, I assume you'll take this one ? Otherwise, please let me know.
Thanks,
Guenter
> ---
> Documentation/hwmon/lm90 | 6 ++++++
> drivers/hwmon/lm90.c | 45 +++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> index b466974..ab81013 100644
> --- a/Documentation/hwmon/lm90
> +++ b/Documentation/hwmon/lm90
> @@ -122,6 +122,12 @@ Supported chips:
> Prefix: 'g781'
> Addresses scanned: I2C 0x4c, 0x4d
> Datasheet: Not publicly available from GMT
> + * Texas Instruments TMP451
> + Prefix: 'tmp451'
> + Addresses scanned: I2C 0x4c
> + Datasheet: Publicly available at TI website
> + http://www.ti.com/litv/pdf/sbos686
> +
>
> Author: Jean Delvare <khali@linux-fr.org>
>
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index 82a1ca15..e9a5e30 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -60,6 +60,11 @@
> * This driver also supports the G781 from GMT. This device is compatible
> * with the ADM1032.
> *
> + * This driver also supports TMP451 from Texas Instruments. This device is
> + * supported in both compatibility and extended mode. It's mostly compatible
> + * with ADT7461 except for local temperature low byte register and max
> + * conversion rate.
> + *
> * 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.
> @@ -111,7 +116,7 @@ static const unsigned short normal_i2c[] = {
> 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
>
> enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
> - max6646, w83l771, max6696, sa56004, g781 };
> + max6646, w83l771, max6696, sa56004, g781, tmp451 };
>
> /*
> * The LM90 registers
> @@ -168,6 +173,9 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
> #define LM90_DEF_CONVRATE_RVAL 6 /* Def conversion rate register value */
> #define LM90_MAX_CONVRATE_MS 16000 /* Maximum conversion rate in ms */
>
> +/* TMP451 registers */
> +#define TMP451_REG_R_LOCAL_TEMPL 0x15
> +
> /*
> * Device flags
> */
> @@ -206,6 +214,7 @@ static const struct i2c_device_id lm90_id[] = {
> { "nct1008", adt7461 },
> { "w83l771", w83l771 },
> { "sa56004", sa56004 },
> + { "tmp451", tmp451},
> { }
> };
> MODULE_DEVICE_TABLE(i2c, lm90_id);
> @@ -294,6 +303,13 @@ static const struct lm90_params lm90_params[] = {
> .max_convrate = 9,
> .reg_local_ext = SA56004_REG_R_LOCAL_TEMPL,
> },
> + [tmp451] = {
> + .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
> + | LM90_HAVE_BROKEN_ALERT,
> + .alert_alarms = 0x7c,
> + .max_convrate = 9,
> + .reg_local_ext = TMP451_REG_R_LOCAL_TEMPL,
> + }
> };
>
> /*
> @@ -718,7 +734,7 @@ static int read_temp8(struct device *dev, int index)
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[index]);
> else if (data->kind = max6646)
> temp = temp_from_u8(data->temp8[index]);
> @@ -762,7 +778,7 @@ static int write_temp8(struct device *dev, int index, long val)
> val -= 16000;
>
> mutex_lock(&data->update_lock);
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> data->temp8[index] = temp_to_u8_adt7461(data, val);
> else if (data->kind = max6646)
> data->temp8[index] = temp_to_u8(val);
> @@ -803,7 +819,7 @@ static int read_temp11(struct device *dev, int index)
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> temp = temp_from_u16_adt7461(data, data->temp11[index]);
> else if (data->kind = max6646)
> temp = temp_from_u16(data->temp11[index]);
> @@ -848,7 +864,7 @@ static int write_temp11(struct device *dev, int nr, int index, long val)
> val -= 16000;
>
> mutex_lock(&data->update_lock);
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> data->temp11[index] = temp_to_u16_adt7461(data, val);
> else if (data->kind = max6646)
> data->temp11[index] = temp_to_u8(val) << 8;
> @@ -912,7 +928,7 @@ static ssize_t show_temphyst(struct device *dev,
> struct lm90_data *data = lm90_update_device(dev);
> int temp;
>
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
> else if (data->kind = max6646)
> temp = temp_from_u8(data->temp8[attr->index]);
> @@ -940,7 +956,7 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy,
> return err;
>
> mutex_lock(&data->update_lock);
> - if (data->kind = adt7461)
> + if (data->kind = adt7461 || data->kind = tmp451)
> temp = temp_from_u8_adt7461(data, data->temp8[2]);
> else if (data->kind = max6646)
> temp = temp_from_u8(data->temp8[2]);
> @@ -1368,6 +1384,19 @@ static int lm90_detect(struct i2c_client *client,
> && (config1 & 0x3F) = 0x00
> && convrate <= 0x08)
> name = "g781";
> + } else
> + if (address = 0x4C
> + && man_id = 0x55) { /* Texas Instruments */
> + int local_ext;
> +
> + local_ext = i2c_smbus_read_byte_data(client,
> + TMP451_REG_R_LOCAL_TEMPL);
> +
> + if (chip_id = 0x00 /* TMP451 */
> + && (config1 & 0x1B) = 0x00
> + && convrate <= 0x09
> + && (local_ext & 0x0F) = 0x00)
> + name = "tmp451";
> }
>
> if (!name) { /* identification failed */
> @@ -1429,7 +1458,7 @@ static void lm90_init_client(struct i2c_client *client)
> data->config_orig = config;
>
> /* Check Temperature Range Select */
> - if (data->kind = adt7461) {
> + if (data->kind = adt7461 || data->kind = tmp451) {
> if (config & 0x04)
> data->flags |= LM90_FLAG_ADT7461_EXT;
> }
> --
> 1.7.9.5
>
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread[parent not found: <20131009151744.GA7787-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>]
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <20131009151744.GA7787-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
@ 2013-10-09 15:35 ` Jean Delvare
0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-09 15:35 UTC (permalink / raw)
To: Guenter Roeck
Cc: Wei Ni, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Wed, 9 Oct 2013 08:17:44 -0700, Guenter Roeck wrote:
> On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
> > TI TMP451 is mostly compatible with ADT7461, except for
> > local temperature low byte and max conversion rate.
> > Add support to the LM90 driver.
> >
> > Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>
> Jean, I assume you'll take this one ? Otherwise, please let me know.
Yes I will, thank for the review.
--
Jean Delvare
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-09 15:35 ` Jean Delvare
0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-09 15:35 UTC (permalink / raw)
To: Guenter Roeck
Cc: Wei Ni, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Wed, 9 Oct 2013 08:17:44 -0700, Guenter Roeck wrote:
> On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
> > TI TMP451 is mostly compatible with ADT7461, except for
> > local temperature low byte and max conversion rate.
> > Add support to the LM90 driver.
> >
> > Signed-off-by: Wei Ni <wni@nvidia.com>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>
> Jean, I assume you'll take this one ? Otherwise, please let me know.
Yes I will, thank for the review.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <20131009173555.74c0d5f5-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <20131009173555.74c0d5f5-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-10-11 1:57 ` Wei Ni
0 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-11 1:57 UTC (permalink / raw)
To: Jean Delvare
Cc: Guenter Roeck, lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/09/2013 11:35 PM, Jean Delvare wrote:
> On Wed, 9 Oct 2013 08:17:44 -0700, Guenter Roeck wrote:
>> On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
>>> TI TMP451 is mostly compatible with ADT7461, except for
>>> local temperature low byte and max conversion rate.
>>> Add support to the LM90 driver.
>>>
>>> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>>
>> Jean, I assume you'll take this one ? Otherwise, please let me know.
>
> Yes I will, thank for the review.
Hi, Jean, do you have git repository, so that I can clone it to get
latest changes.
Thanks.
Wei.
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-11 1:57 ` Wei Ni
0 siblings, 0 replies; 19+ messages in thread
From: Wei Ni @ 2013-10-11 1:57 UTC (permalink / raw)
To: Jean Delvare
Cc: Guenter Roeck, lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/09/2013 11:35 PM, Jean Delvare wrote:
> On Wed, 9 Oct 2013 08:17:44 -0700, Guenter Roeck wrote:
>> On Wed, Oct 09, 2013 at 01:40:48PM +0800, Wei Ni wrote:
>>> TI TMP451 is mostly compatible with ADT7461, except for
>>> local temperature low byte and max conversion rate.
>>> Add support to the LM90 driver.
>>>
>>> Signed-off-by: Wei Ni <wni@nvidia.com>
>>
>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
>> Jean, I assume you'll take this one ? Otherwise, please let me know.
>
> Yes I will, thank for the review.
Hi, Jean, do you have git repository, so that I can clone it to get
latest changes.
Thanks.
Wei.
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <52575B1E.60504-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v2] hwmon: (lm90) Add support for TI TMP451
[not found] ` <52575B1E.60504-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-11 6:14 ` Jean Delvare
0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-11 6:14 UTC (permalink / raw)
To: Wei Ni
Cc: Guenter Roeck, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Hi Wei,
On Fri, 11 Oct 2013 09:57:50 +0800, Wei Ni wrote:
> Hi, Jean, do you have git repository, so that I can clone it to get
> latest changes.
No, I don't. I'm using quilt. But at this point there's nothing in my
public quilt tree because this patch depends on another one from you
(hwmon: (lm90) split set&show temp as common codes) which I need to
update first. When this is done, they will both appear at:
http://khali.linux-fr.org/devel/linux-3/jdelvare-hwmon/
Note though that quilt patch series are not carved in stone, so just
because a patch ever appears here doesn't mean it will go upstream
unchanged (or at all.)
--
Jean Delvare
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for TI TMP451
@ 2013-10-11 6:14 ` Jean Delvare
0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2013-10-11 6:14 UTC (permalink / raw)
To: Wei Ni
Cc: Guenter Roeck, lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Hi Wei,
On Fri, 11 Oct 2013 09:57:50 +0800, Wei Ni wrote:
> Hi, Jean, do you have git repository, so that I can clone it to get
> latest changes.
No, I don't. I'm using quilt. But at this point there's nothing in my
public quilt tree because this patch depends on another one from you
(hwmon: (lm90) split set&show temp as common codes) which I need to
update first. When this is done, they will both appear at:
http://khali.linux-fr.org/devel/linux-3/jdelvare-hwmon/
Note though that quilt patch series are not carved in stone, so just
because a patch ever appears here doesn't mean it will go upstream
unchanged (or at all.)
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
* [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781
@ 2012-01-23 16:26 Guenter Roeck
2012-01-23 17:08 ` Jean Delvare
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Guenter Roeck @ 2012-01-23 16:26 UTC (permalink / raw)
To: lm-sensors
GMT G781 is a ADM1032-compatible temperature sensor chip.
Add support to the LM90 driver.
Cc: Mike Gorchak <lestat@i.com.ua>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2:
- Drop device ID 0x03, since its existence is not confirmed.
Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either,
and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting
Documentation/hwmon/lm90 | 5 +++++
drivers/hwmon/Kconfig | 3 ++-
drivers/hwmon/lm90.c | 19 ++++++++++++++++++-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index 9cd14cfe..d8f1e66 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -118,6 +118,11 @@ Supported chips:
Addresses scanned: I2C 0x48 through 0x4F
Datasheet: Publicly available at NXP website
http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+ * GMT G781
+ Prefix: 'g781'
+ Addresses scanned: I2C 0x4c, 0x4d
+ Datasheet: Publicly available, for example from
+ http://www.datasheetarchive.com/G781-datasheet.html
Author: Jean Delvare <khali@linux-fr.org>
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 0226040..930428c 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -647,7 +647,8 @@ config SENSORS_LM90
LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A,
Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008,
- Winbond/Nuvoton W83L771W/G/AWG/ASG and Philips SA56004 sensor chips.
+ Winbond/Nuvoton W83L771W/G/AWG/ASG, Philips SA56004, and GMT G781
+ sensor chips.
This driver can also be built as a module. If so, the module
will be called lm90.
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 2e207de..0af8f8f 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -57,6 +57,9 @@
* This driver also supports the SA56004 from Philips. This device is
* pin-compatible with the LM86, the ED/EDP parts are also address-compatible.
*
+ * This driver also supports the G781 from GMT. This device is compatible
+ * with the ADM1032.
+ *
* 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.
@@ -107,7 +110,7 @@ static const unsigned short normal_i2c[] = {
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
- max6646, w83l771, max6696, sa56004 };
+ max6646, w83l771, max6696, sa56004, g781 };
/*
* The LM90 registers
@@ -184,6 +187,7 @@ static const struct i2c_device_id lm90_id[] = {
{ "adm1032", adm1032 },
{ "adt7461", adt7461 },
{ "adt7461a", adt7461 },
+ { "g781", g781 },
{ "lm90", lm90 },
{ "lm86", lm86 },
{ "lm89", lm86 },
@@ -229,6 +233,12 @@ static const struct lm90_params lm90_params[] = {
.alert_alarms = 0x7c,
.max_convrate = 10,
},
+ [g781] = {
+ .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
+ | LM90_HAVE_BROKEN_ALERT,
+ .alert_alarms = 0x7c,
+ .max_convrate = 8,
+ },
[lm86] = {
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT,
.alert_alarms = 0x7b,
@@ -1291,6 +1301,13 @@ static int lm90_detect(struct i2c_client *client,
&& convrate <= 0x09) {
name = "sa56004";
}
+ } else
+ if ((address = 0x4C || address = 0x4D)
+ && man_id = 0x47) { /* GMT */
+ if (chip_id = 0x01 /* G781 */
+ && (config1 & 0x3F) = 0x00
+ && convrate <= 0x08)
+ name = "g781";
}
if (!name) { /* identification failed */
--
1.7.5.4
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
@ 2012-01-23 17:08 ` Jean Delvare
2012-01-23 17:24 ` Guenter Roeck
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2012-01-23 17:08 UTC (permalink / raw)
To: lm-sensors
Hi Guenter,
On Mon, 23 Jan 2012 08:26:29 -0800, Guenter Roeck wrote:
> GMT G781 is a ADM1032-compatible temperature sensor chip.
> Add support to the LM90 driver.
>
> Cc: Mike Gorchak <lestat@i.com.ua>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2:
> - Drop device ID 0x03, since its existence is not confirmed.
> Instead, accept device ID 0x01 on both 0x4c and 0x4d.
> - Drop referring to G781-1; we don't do that for other chips either,
> and it is not clear if it is even possible to distinguish G781 from G781-1.
> - Add G781 information to Kconfig, lm90 documentation
> - Mention G781 support in lm90.c file comments
> - Modify formatting to better match file formatting
>
> Documentation/hwmon/lm90 | 5 +++++
> drivers/hwmon/Kconfig | 3 ++-
> drivers/hwmon/lm90.c | 19 ++++++++++++++++++-
> 3 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> index 9cd14cfe..d8f1e66 100644
> --- a/Documentation/hwmon/lm90
> +++ b/Documentation/hwmon/lm90
> @@ -118,6 +118,11 @@ Supported chips:
> Addresses scanned: I2C 0x48 through 0x4F
> Datasheet: Publicly available at NXP website
> http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
> + * GMT G781
> + Prefix: 'g781'
> + Addresses scanned: I2C 0x4c, 0x4d
> + Datasheet: Publicly available, for example from
> + http://www.datasheetarchive.com/G781-datasheet.html
Not sure if we really want to document the availability from a 3rd
party site. There may be legal concerns. If the datasheet isn't
publicly available for download from the vendor, it might have been
obtained under NDA in the first place.
It probably doesn't add much value anyway... I guess it was found by
googling, the reader can do the same.
All the rest looks good, so:
Acked-by: Jean Delvare <khali@linux-fr.org>
Let me know if you want me to pick this in my tree as the maintainer of
the lm90 driver.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
2012-01-23 17:08 ` Jean Delvare
@ 2012-01-23 17:24 ` Guenter Roeck
2012-01-23 17:29 ` Jean Delvare
2012-01-23 17:30 ` Guenter Roeck
3 siblings, 0 replies; 19+ messages in thread
From: Guenter Roeck @ 2012-01-23 17:24 UTC (permalink / raw)
To: lm-sensors
On Mon, 2012-01-23 at 12:08 -0500, Jean Delvare wrote:
> Hi Guenter,
>
> On Mon, 23 Jan 2012 08:26:29 -0800, Guenter Roeck wrote:
> > GMT G781 is a ADM1032-compatible temperature sensor chip.
> > Add support to the LM90 driver.
> >
> > Cc: Mike Gorchak <lestat@i.com.ua>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > v2:
> > - Drop device ID 0x03, since its existence is not confirmed.
> > Instead, accept device ID 0x01 on both 0x4c and 0x4d.
> > - Drop referring to G781-1; we don't do that for other chips either,
> > and it is not clear if it is even possible to distinguish G781 from G781-1.
> > - Add G781 information to Kconfig, lm90 documentation
> > - Mention G781 support in lm90.c file comments
> > - Modify formatting to better match file formatting
> >
> > Documentation/hwmon/lm90 | 5 +++++
> > drivers/hwmon/Kconfig | 3 ++-
> > drivers/hwmon/lm90.c | 19 ++++++++++++++++++-
> > 3 files changed, 25 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> > index 9cd14cfe..d8f1e66 100644
> > --- a/Documentation/hwmon/lm90
> > +++ b/Documentation/hwmon/lm90
> > @@ -118,6 +118,11 @@ Supported chips:
> > Addresses scanned: I2C 0x48 through 0x4F
> > Datasheet: Publicly available at NXP website
> > http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
> > + * GMT G781
> > + Prefix: 'g781'
> > + Addresses scanned: I2C 0x4c, 0x4d
> > + Datasheet: Publicly available, for example from
> > + http://www.datasheetarchive.com/G781-datasheet.html
>
> Not sure if we really want to document the availability from a 3rd
> party site. There may be legal concerns. If the datasheet isn't
> publicly available for download from the vendor, it might have been
> obtained under NDA in the first place.
>
> It probably doesn't add much value anyway... I guess it was found by
> googling, the reader can do the same.
>
I agree; lets drop it. Wasn't sure about that myself. Want me to
resubmit ?
> All the rest looks good, so:
>
> Acked-by: Jean Delvare <khali@linux-fr.org>
>
> Let me know if you want me to pick this in my tree as the maintainer of
> the lm90 driver.
>
Your call; I also have the multi-line comment patch pending for it. I
would suggest either you take both patches, or I do. I am fine either
way.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
2012-01-23 17:08 ` Jean Delvare
2012-01-23 17:24 ` Guenter Roeck
@ 2012-01-23 17:29 ` Jean Delvare
2012-01-23 17:30 ` Guenter Roeck
3 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2012-01-23 17:29 UTC (permalink / raw)
To: lm-sensors
On Mon, 23 Jan 2012 09:24:13 -0800, Guenter Roeck wrote:
> On Mon, 2012-01-23 at 12:08 -0500, Jean Delvare wrote:
> > Hi Guenter,
> >
> > On Mon, 23 Jan 2012 08:26:29 -0800, Guenter Roeck wrote:
> > > GMT G781 is a ADM1032-compatible temperature sensor chip.
> > > Add support to the LM90 driver.
> > >
> > > Cc: Mike Gorchak <lestat@i.com.ua>
> > > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > > ---
> > > v2:
> > > - Drop device ID 0x03, since its existence is not confirmed.
> > > Instead, accept device ID 0x01 on both 0x4c and 0x4d.
> > > - Drop referring to G781-1; we don't do that for other chips either,
> > > and it is not clear if it is even possible to distinguish G781 from G781-1.
> > > - Add G781 information to Kconfig, lm90 documentation
> > > - Mention G781 support in lm90.c file comments
> > > - Modify formatting to better match file formatting
> > >
> > > Documentation/hwmon/lm90 | 5 +++++
> > > drivers/hwmon/Kconfig | 3 ++-
> > > drivers/hwmon/lm90.c | 19 ++++++++++++++++++-
> > > 3 files changed, 25 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> > > index 9cd14cfe..d8f1e66 100644
> > > --- a/Documentation/hwmon/lm90
> > > +++ b/Documentation/hwmon/lm90
> > > @@ -118,6 +118,11 @@ Supported chips:
> > > Addresses scanned: I2C 0x48 through 0x4F
> > > Datasheet: Publicly available at NXP website
> > > http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
> > > + * GMT G781
> > > + Prefix: 'g781'
> > > + Addresses scanned: I2C 0x4c, 0x4d
> > > + Datasheet: Publicly available, for example from
> > > + http://www.datasheetarchive.com/G781-datasheet.html
> >
> > Not sure if we really want to document the availability from a 3rd
> > party site. There may be legal concerns. If the datasheet isn't
> > publicly available for download from the vendor, it might have been
> > obtained under NDA in the first place.
> >
> > It probably doesn't add much value anyway... I guess it was found by
> > googling, the reader can do the same.
> >
> I agree; lets drop it. Wasn't sure about that myself. Want me to
> resubmit ?
No need to resubmit.
> > All the rest looks good, so:
> >
> > Acked-by: Jean Delvare <khali@linux-fr.org>
> >
> > Let me know if you want me to pick this in my tree as the maintainer of
> > the lm90 driver.
> >
> Your call; I also have the multi-line comment patch pending for it. I
> would suggest either you take both patches, or I do. I am fine either
> way.
I'll take them both. Easier that way, if more lm90 patches come I'll be
the one to review them anyway.
Mike, please test this new patch and confirm it works OK for you.
Thanks,
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
` (2 preceding siblings ...)
2012-01-23 17:29 ` Jean Delvare
@ 2012-01-23 17:30 ` Guenter Roeck
3 siblings, 0 replies; 19+ messages in thread
From: Guenter Roeck @ 2012-01-23 17:30 UTC (permalink / raw)
To: lm-sensors
On Mon, 2012-01-23 at 12:29 -0500, Jean Delvare wrote:
> On Mon, 23 Jan 2012 09:24:13 -0800, Guenter Roeck wrote:
> > On Mon, 2012-01-23 at 12:08 -0500, Jean Delvare wrote:
> > > Hi Guenter,
> > >
> > > On Mon, 23 Jan 2012 08:26:29 -0800, Guenter Roeck wrote:
> > > > GMT G781 is a ADM1032-compatible temperature sensor chip.
> > > > Add support to the LM90 driver.
> > > >
> > > > Cc: Mike Gorchak <lestat@i.com.ua>
> > > > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > > > ---
> > > > v2:
> > > > - Drop device ID 0x03, since its existence is not confirmed.
> > > > Instead, accept device ID 0x01 on both 0x4c and 0x4d.
> > > > - Drop referring to G781-1; we don't do that for other chips either,
> > > > and it is not clear if it is even possible to distinguish G781 from G781-1.
> > > > - Add G781 information to Kconfig, lm90 documentation
> > > > - Mention G781 support in lm90.c file comments
> > > > - Modify formatting to better match file formatting
> > > >
> > > > Documentation/hwmon/lm90 | 5 +++++
> > > > drivers/hwmon/Kconfig | 3 ++-
> > > > drivers/hwmon/lm90.c | 19 ++++++++++++++++++-
> > > > 3 files changed, 25 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
> > > > index 9cd14cfe..d8f1e66 100644
> > > > --- a/Documentation/hwmon/lm90
> > > > +++ b/Documentation/hwmon/lm90
> > > > @@ -118,6 +118,11 @@ Supported chips:
> > > > Addresses scanned: I2C 0x48 through 0x4F
> > > > Datasheet: Publicly available at NXP website
> > > > http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
> > > > + * GMT G781
> > > > + Prefix: 'g781'
> > > > + Addresses scanned: I2C 0x4c, 0x4d
> > > > + Datasheet: Publicly available, for example from
> > > > + http://www.datasheetarchive.com/G781-datasheet.html
> > >
> > > Not sure if we really want to document the availability from a 3rd
> > > party site. There may be legal concerns. If the datasheet isn't
> > > publicly available for download from the vendor, it might have been
> > > obtained under NDA in the first place.
> > >
> > > It probably doesn't add much value anyway... I guess it was found by
> > > googling, the reader can do the same.
> > >
> > I agree; lets drop it. Wasn't sure about that myself. Want me to
> > resubmit ?
>
> No need to resubmit.
>
> > > All the rest looks good, so:
> > >
> > > Acked-by: Jean Delvare <khali@linux-fr.org>
> > >
> > > Let me know if you want me to pick this in my tree as the maintainer of
> > > the lm90 driver.
> > >
> > Your call; I also have the multi-line comment patch pending for it. I
> > would suggest either you take both patches, or I do. I am fine either
> > way.
>
> I'll take them both. Easier that way, if more lm90 patches come I'll be
> the one to review them anyway.
>
Ok, deal.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2013-10-11 6:14 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 5:40 [PATCH v2] hwmon: (lm90) Add support for TI TMP451 Wei Ni
2013-10-09 5:40 ` [lm-sensors] " Wei Ni
[not found] ` <1381297248-13375-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-09 8:23 ` Jean Delvare
2013-10-09 8:23 ` [lm-sensors] " Jean Delvare
[not found] ` <20131009102323.169965ff-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-10-09 8:57 ` Wei Ni
2013-10-09 8:57 ` [lm-sensors] " Wei Ni
2013-10-09 15:17 ` Guenter Roeck
2013-10-09 15:17 ` [lm-sensors] " Guenter Roeck
[not found] ` <20131009151744.GA7787-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-10-09 15:35 ` Jean Delvare
2013-10-09 15:35 ` [lm-sensors] " Jean Delvare
[not found] ` <20131009173555.74c0d5f5-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-10-11 1:57 ` Wei Ni
2013-10-11 1:57 ` [lm-sensors] " Wei Ni
[not found] ` <52575B1E.60504-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-11 6:14 ` Jean Delvare
2013-10-11 6:14 ` [lm-sensors] " Jean Delvare
-- strict thread matches above, loose matches on Subject: below --
2012-01-23 16:26 [lm-sensors] [PATCH v2] hwmon: (lm90) Add support for G781 Guenter Roeck
2012-01-23 17:08 ` Jean Delvare
2012-01-23 17:24 ` Guenter Roeck
2012-01-23 17:29 ` Jean Delvare
2012-01-23 17:30 ` Guenter Roeck
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.