hwmon: (lm63) Add support for LM96163
Subsystems (2)
PATCH v2 2/2 hwmon: (lm63) Add support for LM96163
LM96163 is an enhanced version of LM63 with improved PWM resolution. Add chip detection code as well as support for improved PWM resolution if the chip is configured to use it.
---
Tested with LM63 and LM96163.
v2: Update documentation.
Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm63.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 6 deletions(-)
Documentation/hwmon/lm63 +8 -0
@@ -12,6 +12,11 @@ Supported chips: Addresses scanned: I2C 0x18 and 0x4e Datasheet: Publicly available at the National Semiconductor website http://www.national.com/pf/LM/LM64.html + * National Semiconductor LM96163 + Prefix: 'lm96163' + Addresses scanned: I2C 0x4c + Datasheet: Publicly available at the National Semiconductor website + http://www.national.com/ds/LM/LM96163.pdf Author: Jean Delvare <[email protected]>
@@ -62,3 +67,6 @@ values. The LM64 is effectively an LM63 with GPIO lines. The driver does not support these GPIO lines at present. + +The LM96163 is an enhanced version of LM63 with improved temperature accuracy +and better PWM resolution.
drivers/hwmon/Kconfig +1 -1
@@ -519,7 +519,7 @@ config SENSORS_LM63 depends on I2C help If you say yes here you get support for the National - Semiconductor LM63 and LM64 remote diode digital temperature + Semiconductor LM63, LM64, and LM96163 remote diode digital temperature sensors with integrated fan control. Such chips are found on the Tyan S4882 (Thunder K8QS Pro) motherboard, among others.
drivers/hwmon/lm63.c +28 -5
@@ -91,6 +91,8 @@ static const unsigned short normal_i2c[] = { 0x18, 0x4c, 0x4e, I2C_CLIENT_END };#define LM63_REG_MAN_ID 0xFE#define LM63_REG_CHIP_ID 0xFF +#define LM96163_REG_CONFIG_ENHANCED 0x45 +/* * Conversions and various macros * For tachometer counts, the LM63 uses 16-bit values.
@@ -134,7 +136,7 @@ static struct lm63_data *lm63_update_device(struct device *dev);static int lm63_detect (struct i2c_client *client,struct i2c_board_info *info);static void lm63_init_client (struct i2c_client *client); -enum chips { lm63, lm64 }; +enum chips { lm63, lm64, lm96163 };/* * Driver data (common to all clients)
@@ -143,6 +145,7 @@ enum chips { lm63, lm64 };static const struct i2c_device_id lm63_id[] = { {"lm63" , lm63 }, {"lm64" , lm64 }, + {"lm96163" , lm96163 }, { } };MODULE_DEVICE_TABLE (i2c, lm63_id);
@@ -185,6 +188,7 @@ struct lm63_data {2: remote high limit */ u8 temp2_crit_hyst;u8 alarms; +bool pwm_highres; };/*
@@ -225,9 +229,16 @@ static ssize_t show_pwm1(struct device *dev, struct device_attribute *dummy, char *buf) {struct lm63_data *data =lm63_update_device (dev); -return sprintf (buf,"%d\n" , data->pwm1_value >=2 * data->pwm1_freq ? +int pwm; + +if (data->pwm_highres) + pwm = data->pwm1_value; +else + pwm = data->pwm1_value >=2 * data->pwm1_freq ?255 : (data->pwm1_value *255 + data->pwm1_freq) / - (2 * data->pwm1_freq)); + (2 * data->pwm1_freq); + +return sprintf (buf,"%d\n" , pwm); } static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,
@@ -245,9 +256,9 @@ static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,if (err)return err; + val =SENSORS_LIMIT (val,0 ,255 );mutex_lock (&data->update_lock); - data->pwm1_value = val <=0 ?0 : - val >=255 ?2 * data->pwm1_freq : + data->pwm1_value = data->pwm_highres ? val : (val * data->pwm1_freq *2 +127 ) /255 ;i2c_smbus_write_byte_data (client,LM63_REG_PWM_VALUE , data->pwm1_value);mutex_unlock (&data->update_lock);
@@ -516,6 +527,8 @@ static int lm63_detect(struct i2c_client *new_client,strlcpy (info->type,"lm63" ,I2C_NAME_SIZE ); else if (chip_id = 0x51 && (address = 0x18 || address = 0x4e))strlcpy (info->type,"lm64" ,I2C_NAME_SIZE ); + else if (chip_id = 0x49 && address = 0x4c) +strlcpy (info->type,"lm96163" ,I2C_NAME_SIZE ); else return -ENODEV;
@@ -599,6 +612,16 @@ static void lm63_init_client(struct i2c_client *client)if (data->pwm1_freq =0 ) data->pwm1_freq =1 ; +/* For LM96163, check if high resolution PWM is enabled */ +if (data->kind = lm96163 + && !(data->config_fan &0x08 ) && data->pwm1_freq =8 ) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); +if (config_enhanced &0x10 ) + data->pwm_highres = true; + } +/* Show some debug info about the LM63 configuration */ dev_dbg(&client->dev, "Alert/tach pin configured for %s\n", (data->config & 0x04) ? "tachometer input" :
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
Hi Guenter,
Quoted 20 lines · Guenter Roeck
LM96163 is an enhanced version of LM63 with improved PWM resolution. Add chip detection code as well as support for improved PWM resolution if the chip is configured to use it.
Signed-off-by Guenter Roeck <[email protected]>---
Tested with LM63 and LM96163.v2: Update documentation.
Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm63.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 6 deletions(-)Documentation/hwmon/lm63 +0
-0
Documentation/hwmon/lm63 Supported chips: · line 19
Quoted 8 lines
Documentation/hwmon/lm63 +5
-0@@ -12,6 +12,11 @@ Supported chips: Addresses scanned: I2C 0x18 and 0x4e Datasheet: Publicly available at the National Semiconductor website http://www.national.com/pf/LM/LM64.html + * National Semiconductor LM96163 + Prefix: 'lm96163' + Addresses scanned: I2C 0x4c + Datasheet: Publicly available at the National Semiconductor website + http://www.national.com/ds/LM/LM96163.pdf
Other entries point to the product page rather than the datasheet directly.
Quoted 15 lines
Documentation/hwmon/lm63 +3
-0Author: Jean Delvare <[email protected]>@@ -62,3 +67,6 @@ values. The LM64 is effectively an LM63 with GPIO lines. The driver does not support these GPIO lines at present. + +The LM96163 is an enhanced version of LM63 with improved temperature accuracy +and better PWM resolution.drivers/hwmon/Kconfig +0
-0
drivers/hwmon/Kconfig config SENSORS_LM63 · line 525
Quoted 8 lines
drivers/hwmon/Kconfig +1
-1@@ -519,7 +519,7 @@ config SENSORS_LM63 depends on I2C help If you say yes here you get support for the National - Semiconductor LM63 and LM64 remote diode digital temperature + Semiconductor LM63, LM64, and LM96163 remote diode digital temperature sensors with integrated fan control. Such chips are found on the Tyan S4882 (Thunder K8QS Pro) motherboard, among others.
You could also change the menu entry from
tristate "National Semiconductor LM63 and LM64"
to
tristate "National Semiconductor LM63 and compatibles"
Quoted 31 lines
drivers/hwmon/lm63.c +4
-1@@ -91,6 +91,8 @@ static const unsigned short normal_i2c[] = { 0x18, 0x4c, 0x4e, I2C_CLIENT_END };#define LM63_REG_MAN_ID 0xFE#define LM63_REG_CHIP_ID 0xFF +#define LM96163_REG_CONFIG_ENHANCED 0x45 +/* * Conversions and various macros * For tachometer counts, the LM63 uses 16-bit values. @@ -134,7 +136,7 @@ static struct lm63_data *lm63_update_device(struct device *dev);static int lm63_detect (struct i2c_client *client,struct i2c_board_info *info);static void lm63_init_client (struct i2c_client *client); -enum chips { lm63, lm64 }; +enum chips { lm63, lm64, lm96163 };/* * Driver data (common to all clients) @@ -143,6 +145,7 @@ enum chips { lm63, lm64 };static const struct i2c_device_id lm63_id[] = { {"lm63" , lm63 }, {"lm64" , lm64 }, + {"lm96163" , lm96163 }, { } };MODULE_DEVICE_TABLE (i2c, lm63_id);
drivers/hwmon/lm63.c struct lm63_data { · line 191
Quoted 4 lines
drivers/hwmon/lm63.c +1
-0@@ -185,6 +188,7 @@ struct lm63_data {2: remote high limit */ u8 temp2_crit_hyst;u8 alarms; +bool pwm_highres;
You have to include <linux/types.h> or <linux/kernel.h> for bool (well it should have been included for u8 already, but better late than never...)
Quoted 47 lines
drivers/hwmon/lm63.c +13
-4};/* @@ -225,9 +229,16 @@ static ssize_t show_pwm1(struct device *dev, struct device_attribute *dummy, char *buf) {struct lm63_data *data =lm63_update_device (dev); -return sprintf (buf,"%d\n" , data->pwm1_value >=2 * data->pwm1_freq ? +int pwm; + +if (data->pwm_highres) + pwm = data->pwm1_value; +else + pwm = data->pwm1_value >=2 * data->pwm1_freq ?255 : (data->pwm1_value *255 + data->pwm1_freq) / - (2 * data->pwm1_freq)); + (2 * data->pwm1_freq); + +return sprintf (buf,"%d\n" , pwm); } static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,@@ -245,9 +256,9 @@ static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,if (err)return err; + val =SENSORS_LIMIT (val,0 ,255 );mutex_lock (&data->update_lock); - data->pwm1_value = val <=0 ?0 : - val >=255 ?2 * data->pwm1_freq : + data->pwm1_value = data->pwm_highres ? val : (val * data->pwm1_freq *2 +127 ) /255 ;i2c_smbus_write_byte_data (client,LM63_REG_PWM_VALUE , data->pwm1_value);mutex_unlock (&data->update_lock);@@ -516,6 +527,8 @@ static int lm63_detect(struct i2c_client *new_client,strlcpy (info->type,"lm63" ,I2C_NAME_SIZE ); else if (chip_id = 0x51 && (address = 0x18 || address = 0x4e))strlcpy (info->type,"lm64" ,I2C_NAME_SIZE ); + else if (chip_id = 0x49 && address = 0x4c) +strlcpy (info->type,"lm96163" ,I2C_NAME_SIZE ); else return -ENODEV;@@ -599,6 +612,16 @@ static void lm63_init_client(struct i2c_client *client)if (data->pwm1_freq =0 ) data->pwm1_freq =1 ;
drivers/hwmon/lm63.c static void lm63_init_client(struct i2c_client *client) · line 624
Quoted 10 lines
drivers/hwmon/lm63.c +10
-0+/* For LM96163, check if high resolution PWM is enabled */ +if (data->kind = lm96163 + && !(data->config_fan &0x08 ) && data->pwm1_freq =8 ) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); +if (config_enhanced &0x10 ) + data->pwm_highres = true; + } +
What about bit 3 (USF) in this enhanced configuration register? When set, it would affect the way we encode and decode _max and _crit temperature limits, right?
Quoted 3 lines
drivers/hwmon/lm63.c +0
-0/* Show some debug info about the LM63 configuration */ dev_dbg(&client->dev, "Alert/tach pin configured for %s\n", (data->config & 0x04) ? "tachometer input" :
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckQuoted 3 lines · Jean Delvare
What about bit 3 (USF) in this enhanced configuration register? When set, it would affect the way we encode and decode
_maxand_crittemperature limits, right?
BTW, if you agree but don't have time to work on this, I would be perfectly fine with a check at probe time that would complain (and eventually bail out) if the way the chip is configured is not properly supported by the driver. If anyone needs the feature, it can be added later.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckQuoted 148 lines · Guenter Roeck
LM96163 is an enhanced version of LM63 with improved PWM resolution. Add chip detection code as well as support for improved PWM resolution if the chip is configured to use it.
Signed-off-by Guenter Roeck <[email protected]>---
Tested with LM63 and LM96163.v2: Update documentation.
Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm63.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 6 deletions(-)Documentation/hwmon/lm63 +8
-0@@ -12,6 +12,11 @@ Supported chips: Addresses scanned: I2C 0x18 and 0x4e Datasheet: Publicly available at the National Semiconductor website http://www.national.com/pf/LM/LM64.html + * National Semiconductor LM96163 + Prefix: 'lm96163' + Addresses scanned: I2C 0x4c + Datasheet: Publicly available at the National Semiconductor website + http://www.national.com/ds/LM/LM96163.pdf Author: Jean Delvare <[email protected]>@@ -62,3 +67,6 @@ values. The LM64 is effectively an LM63 with GPIO lines. The driver does not support these GPIO lines at present. + +The LM96163 is an enhanced version of LM63 with improved temperature accuracy +and better PWM resolution.drivers/hwmon/Kconfig +1
-1@@ -519,7 +519,7 @@ config SENSORS_LM63 depends on I2C help If you say yes here you get support for the National - Semiconductor LM63 and LM64 remote diode digital temperature + Semiconductor LM63, LM64, and LM96163 remote diode digital temperature sensors with integrated fan control. Such chips are found on the Tyan S4882 (Thunder K8QS Pro) motherboard, among others.drivers/hwmon/lm63.c +28
-5@@ -91,6 +91,8 @@ static const unsigned short normal_i2c[] = { 0x18, 0x4c, 0x4e, I2C_CLIENT_END };#define LM63_REG_MAN_ID 0xFE#define LM63_REG_CHIP_ID 0xFF +#define LM96163_REG_CONFIG_ENHANCED 0x45 +/* * Conversions and various macros * For tachometer counts, the LM63 uses 16-bit values. @@ -134,7 +136,7 @@ static struct lm63_data *lm63_update_device(struct device *dev);static int lm63_detect (struct i2c_client *client,struct i2c_board_info *info);static void lm63_init_client (struct i2c_client *client); -enum chips { lm63, lm64 }; +enum chips { lm63, lm64, lm96163 };/* * Driver data (common to all clients) @@ -143,6 +145,7 @@ enum chips { lm63, lm64 };static const struct i2c_device_id lm63_id[] = { {"lm63" , lm63 }, {"lm64" , lm64 }, + {"lm96163" , lm96163 }, { } };MODULE_DEVICE_TABLE (i2c, lm63_id);@@ -185,6 +188,7 @@ struct lm63_data {2: remote high limit */ u8 temp2_crit_hyst;u8 alarms; +bool pwm_highres; };/* @@ -225,9 +229,16 @@ static ssize_t show_pwm1(struct device *dev, struct device_attribute *dummy, char *buf) {struct lm63_data *data =lm63_update_device (dev); -return sprintf (buf,"%d\n" , data->pwm1_value >=2 * data->pwm1_freq ? +int pwm; + +if (data->pwm_highres) + pwm = data->pwm1_value; +else + pwm = data->pwm1_value >=2 * data->pwm1_freq ?255 : (data->pwm1_value *255 + data->pwm1_freq) / - (2 * data->pwm1_freq)); + (2 * data->pwm1_freq); + +return sprintf (buf,"%d\n" , pwm); } static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,@@ -245,9 +256,9 @@ static ssize_t set_pwm1(struct device *dev, struct device_attribute *dummy,if (err)return err; + val =SENSORS_LIMIT (val,0 ,255 );mutex_lock (&data->update_lock); - data->pwm1_value = val <=0 ?0 : - val >=255 ?2 * data->pwm1_freq : + data->pwm1_value = data->pwm_highres ? val : (val * data->pwm1_freq *2 +127 ) /255 ;i2c_smbus_write_byte_data (client,LM63_REG_PWM_VALUE , data->pwm1_value);mutex_unlock (&data->update_lock);@@ -516,6 +527,8 @@ static int lm63_detect(struct i2c_client *new_client,strlcpy (info->type,"lm63" ,I2C_NAME_SIZE ); else if (chip_id == 0x51 && (address == 0x18 || address == 0x4e))strlcpy (info->type,"lm64" ,I2C_NAME_SIZE ); + else if (chip_id == 0x49 && address == 0x4c) +strlcpy (info->type,"lm96163" ,I2C_NAME_SIZE ); else return -ENODEV;@@ -599,6 +612,16 @@ static void lm63_init_client(struct i2c_client *client)if (data->pwm1_freq ==0 ) data->pwm1_freq =1 ; +/* For LM96163, check if high resolution PWM is enabled */ +if (data->kind == lm96163 + && !(data->config_fan &0x08 ) && data->pwm1_freq ==8 ) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); +if (config_enhanced &0x10 ) + data->pwm_highres = true; + } +/* Show some debug info about the LM63 configuration */ dev_dbg(&client->dev, "Alert/tach pin configured for %s\n", (data->config & 0x04) ? "tachometer input" :Signature · 1 line
1.7.3.1
Thanks for taking care of this.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckHi Jean,
Quoted 11 lines · Jean Delvare
Quoted 3 lines · Jean Delvare
What about bit 3 (USF) in this enhanced configuration register? When set, it would affect the way we encode and decode
_maxand_crittemperature limits, right?BTW, if you agree but don't have time to work on this, I would be perfectly fine with a check at probe time that would complain (and eventually bail out) if the way the chip is configured is not properly supported by the driver. If anyone needs the feature, it can be added later.
Gives me something to do if I need some distraction ;). It will need some thinking, so I may choose the complain option for now and submit a patch later. Bailing out seems a bit harsh - as are temperatures above 127 C anyway.
Do you remember why you did not add support for the remote temperature offset registers ?
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckHi Guenter,
Quoted 12 lines · Guenter Roeck
Quoted 11 lines · Jean Delvare
Quoted 3 lines · Jean Delvare
What about bit 3 (USF) in this enhanced configuration register? When set, it would affect the way we encode and decode
_maxand_crittemperature limits, right?BTW, if you agree but don't have time to work on this, I would be perfectly fine with a check at probe time that would complain (and eventually bail out) if the way the chip is configured is not properly supported by the driver. If anyone needs the feature, it can be added later.
Quoted 4 lines
Gives me something to do if I need some distraction ;). It will need some thinking, so I may choose the complain option for now and submit a patch later. Bailing out seems a bit harsh - as are temperatures above 127 C anyway.
Temperatures above 127°C are frequent in high-end graphics cards. I would never want any of these in my own machines, but gamers do.
I am more surprised by the implementation. I'd have expected a single configuration but to change the range of all temperature-related registers, not just the high and critical limits. Other chips do this.
Quoted 2 lines
Do you remember why you did not add support for the remote temperature offset registers ?
Probably because nobody ever asked for it. Also, originally we did not have a standard sysfs file name for this feature, so it was often left out of driver submissions. For some drivers it was added later when a standard name was defined, for others it was not. Feel free to add it if you want. I don't expect any difficulty.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckT24gTW9uLCAyMDExLTExLTIxIGF0IDExOjEwIC0wNTAwLCBKZWFuIERlbHZhcmUgd3JvdGU6Cj4g SGkgR3VlbnRlciwKPiAKPiBPbiBNb24sIDIxIE5vdiAyMDExIDA1OjQ4OjI1IC0wODAwLCBHdWVu dGVyIFJvZWNrIHdyb3RlOgo+ID4gT24gTW9uLCBOb3YgMjEsIDIwMTEgYXQgMDg6MDc6MDdBTSAt MDUwMCwgSmVhbiBEZWx2YXJlIHdyb3RlOgo+ID4gPiBPbiBNb24sIDIxIE5vdiAyM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AuLi4uLi4uLi4uLi4uLi4uCmEwOiAwMCAw MCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAgICAuLi4uLi4uLi4u Li4uLi4uCmIwOiAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAw MCAgICAuLi4uLi4uLi4uLi4uLi4uCmMwOiAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAw MCAwMCAwMCAwMCAwMCAwMCAgICAuLi4uLi4uLi4uLi4uLi4uCmQwOiAwMCAwMCAwMCAwMCAwMCAw MCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAgICAuLi4uLi4uLi4uLi4uLi4uCmUwOiAw MCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAgICAuLi4uLi4u Li4uLi4uLi4uCmYwOiAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAw MSA0OSAgICAuLi4uLi4uLi4uLi4uLj9JCgpHdWVudGVyCgoKCl9fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fCmxtLXNlbnNvcnMgbWFpbGluZyBsaXN0CmxtLXNl bnNvcnNAbG0tc2Vuc29ycy5vcmcKaHR0cDovL2xpc3RzLmxtLXNlbnNvcnMub3JnL21haWxtYW4v bGlzdGluZm8vbG0tc2Vuc29ycw=
Re: [lm-sensors] [PATCH v2 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckQuoted 34 lines · Guenter Roeck
Quoted 11 lines · Jean Delvare
Quoted 3 lines · Jean Delvare
What about bit 3 (USF) in this enhanced configuration register? When set, it would affect the way we encode and decode
_maxand_crittemperature limits, right?BTW, if you agree but don't have time to work on this, I would be perfectly fine with a check at probe time that would complain (and eventually bail out) if the way the chip is configured is not properly supported by the driver. If anyone needs the feature, it can be added later.
Reminds me:
root@server:/sys/class/hwmon/hwmon2/device# sensors lm96163-i2c-15-4c lm96163-i2c-15-4c Adapter: i2c-diolan-u2c:004 fan1: 0 RPM (min = 0 RPM) temp1: +23.0°C (high = +70.0°C) temp2: +23.0°C (low = +0.0°C, high = +85.0°C) (crit = +110.0°C, hyst = +100.0°C)root@server:/sys/class/hwmon/hwmon2/device# i2cdump -y -f 15 0x4c No size specified (using byte-data access) 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 17 17 80 86 08 46 00 55 00 86 08 46 00 55 00 00 ?????F.U.??F.U.. 10: 20 00 00 00 00 00 a4 00 00 6e 00 00 00 00 00 00 .....?..n...... 20: 00 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .?.............. 30: 00 17 20 00 00 00 00 00 00 00 00 00 00 00 00 00 .? ............. 40: 00 00 00 00 00 00 ff ff fc ff 20 3f 01 08 00 04 ........?. ???.? 50: 7f 3f 7f 3f 7f 3f 7f 3f 7f 3f 7f 3f 7f 3f 7f 3f ???????????????? 60: 7f 3f 7f 3f 7f 3f 7f 3f 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 ................
Quoted 8 lines
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 01 49 ..............?I
Added to my collection, thank you :)
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors