hwmon: (lm63) Add support for LM96163
Subsystems (2)
PATCH v3 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.
--- Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm63.c | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 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/pf/LM/LM96163.html 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 +2 -2
@@ -515,11 +515,11 @@ config SENSORS_LINEAGE will be called lineage-pem. config SENSORS_LM63 - tristate "National Semiconductor LM63 and LM64" + tristate "National Semiconductor LM63 and compatibles" 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 +36 -5
97 lines not on this page · raw message
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 v3 2/2] hwmon: (lm63) Add support for
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]>--- Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm63.c | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-)(...)
drivers/hwmon/lm63.c +5
-0@@ -605,6 +619,23 @@ 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. +* Also, check if unsigned temperature format is enabled +* and display a warning message if it is. +*/
drivers/hwmon/lm63.c static void lm63_init_client(struct i2c_client *client) · line 636
Quoted 10 lines
drivers/hwmon/lm63.c +10
-0+if (data->kind = lm96163) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); +if ((config_enhanced &0x10 ) + && !(data->config_fan &0x08 ) && data->pwm1_freq =8 ) + data->pwm_highres = true; +if (config_enhanced &0x08 ) +dev_warn (&client->dev, +"Unsigned format for High and Crit setpoints enabled but not supported by driver" );
Line too long and missing trailing newline. I fixed both, and queued the patch for kernel 3.3, thank you. Care to update wiki/Devices?
Quoted 5 lines
drivers/hwmon/lm63.c +2
-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 v3 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckHi Jean,
Quoted 26 lines · Jean Delvare
Quoted 25 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]>--- Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm63.c | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-)(...)
drivers/hwmon/lm63.c +10
-0@@ -605,6 +619,23 @@ 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. +* Also, check if unsigned temperature format is enabled +* and display a warning message if it is. +*/ +if (data->kind = lm96163) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); + if ((config_enhanced & 0x10)
Quoted 9 lines
drivers/hwmon/lm63.c static void lm63_init_client(struct i2c_client *client) · line 636
Quoted 5 lines
drivers/hwmon/lm63.c +5
-0+ && !(data->config_fan & 0x08) && data->pwm1_freq = 8) + data->pwm_highres = true; +if (config_enhanced &0x08 ) +dev_warn (&client->dev, +"Unsigned format for High and Crit setpoints enabled but not supported by driver" );Line too long and missing trailing newline. I fixed both, and queued the patch for kernel 3.3, thank you. Care to update wiki/Devices?
I thought long lines are now accepted and recommended for strings, to avoid breaking a string into multiple lines. No idea where the missing newline comes from - checkpatch didn't report anything, and the patch seems to be ok when I look at it.
I updated the wiki a minute ago.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v3 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckQuoted 38 lines · Guenter Roeck
Hi Jean,
Quoted 26 lines · Jean Delvare
Quoted 25 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]>--- Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm63.c | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-)(...)
drivers/hwmon/lm63.c +10
-0@@ -605,6 +619,23 @@ 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. +* Also, check if unsigned temperature format is enabled +* and display a warning message if it is. +*/ +if (data->kind = lm96163) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); + if ((config_enhanced & 0x10)Quoted 9 lines
drivers/hwmon/lm63.c static void lm63_init_client(struct i2c_client *client) · line 636
Quoted 5 lines
drivers/hwmon/lm63.c +5
-0+ && !(data->config_fan & 0x08) && data->pwm1_freq = 8) + data->pwm_highres = true; +if (config_enhanced &0x08 ) +dev_warn (&client->dev, +"Unsigned format for High and Crit setpoints enabled but not supported by driver" );Line too long and missing trailing newline. I fixed both, and queued the patch for kernel 3.3, thank you. Care to update wiki/Devices?
Quoted 2 lines
I thought long lines are now accepted and recommended for strings, to avoid breaking a string into multiple lines.
You appear to be right, I had missed that policy change, sorry. I've reverted the line split.
Quoted 3 lines
No idea where the missing
newline comes from - checkpatch didn't report anything, and the patch seems to be ok when I look at it.
I didn't mean a patch formatting error. I meant missing "\n" at the end of the log message itself. It would certainly make sense for checkpatch to warn about these, but so far it does not.
Quoted 1 line
I updated the wiki a minute ago.
Thanks.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v3 2/2] hwmon: (lm63) Add support for
In reply to Guenter RoeckQuoted 45 lines · Jean Delvare
Quoted 38 lines · Guenter Roeck
Hi Jean,
Quoted 26 lines · Jean Delvare
Quoted 25 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]>--- Documentation/hwmon/lm63 | 8 ++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm63.c | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-)(...)
drivers/hwmon/lm63.c +10
-0@@ -605,6 +619,23 @@ 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. +* Also, check if unsigned temperature format is enabled +* and display a warning message if it is. +*/ +if (data->kind = lm96163) { +u8 config_enhanced + =i2c_smbus_read_byte_data (client, +LM96163_REG_CONFIG_ENHANCED ); + if ((config_enhanced & 0x10)Quoted 9 lines
drivers/hwmon/lm63.c static void lm63_init_client(struct i2c_client *client) · line 636
Quoted 5 lines
drivers/hwmon/lm63.c +5
-0+ && !(data->config_fan & 0x08) && data->pwm1_freq = 8) + data->pwm_highres = true; +if (config_enhanced &0x08 ) +dev_warn (&client->dev, +"Unsigned format for High and Crit setpoints enabled but not supported by driver" );Line too long and missing trailing newline. I fixed both, and queued the patch for kernel 3.3, thank you. Care to update wiki/Devices?
Quoted 2 lines
I thought long lines are now accepted and recommended for strings, to avoid breaking a string into multiple lines.
You appear to be right, I had missed that policy change, sorry. I've reverted the line split.
Quoted 8 lines
Quoted 3 lines
No idea where the missing
newline comes from - checkpatch didn't report anything, and the patch seems to be ok when I look at it.I didn't mean a patch formatting error. I meant missing "\n" at the end of the log message itself. It would certainly make sense for checkpatch to warn about these, but so far it does not.
Ah, you are right. Thanks for the clarification.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors