hwmon: (lm63) LM64 has a dedicated pin for tachometer
Subsystems (2)
PATCH 1/1 hwmon: (lm63) LM64 has a dedicated pin for tachometer
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled.
--- Documentation/hwmon/lm63 | 4 +++- drivers/hwmon/lm63.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
Documentation/hwmon/lm63 +3 -1
@@ -54,7 +54,9 @@ value for measuring the speed of the fan Note that the pin used for fan monitoring is shared with an alert out function. Depending on how the board designer wanted to use the chip, fan speed monitoring will or will not be possible. The proper chip configuration -is left to the BIOS, and the driver will blindly trust it. +is left to the BIOS, and the driver will blindly trust it. Only the original +LM63 suffers from this limitation, the LM64 and LM96163 have separate pins +for fan monitoring and alert out. A PWM output can be used to control the speed of the fan. The LM63 has two PWM modes: manual and automatic. Automatic mode is not fully implemented yet
drivers/hwmon/lm63.c +2 -1
@@ -745,7 +745,8 @@ static int lm63_probe(struct i2c_client err =sysfs_create_group (&new_client->dev.kobj, &lm63_group);if (err) goto exit_free; -if (data->config &0x04 ) {/* tachometer enabled */ +if (data->kind = lm64 ||/* tachometer has dedicated pin */ + (data->config &0x04 )) {/* tachometer enabled */ err =sysfs_create_group (&new_client->dev.kobj, &lm63_group_fan1);if (err)
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 13 lines · Jean Delvare
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled.
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm63 | 4 +++- drivers/hwmon/lm63.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
Documentation/hwmon/lm63 value for measuring the speed of the fan · line 60
Quoted 8 lines
Documentation/hwmon/lm63 +3
-1@@ -54,7 +54,9 @@ value for measuring the speed of the fan Note that the pin used for fan monitoring is shared with an alert out function. Depending on how the board designer wanted to use the chip, fan speed monitoring will or will not be possible. The proper chip configuration -is left to the BIOS, and the driver will blindly trust it. +is left to the BIOS, and the driver will blindly trust it. Only the original +LM63 suffers from this limitation, the LM64 and LM96163 have separate pins +for fan monitoring and alert out.
Maybe add a note here indicating that fan control is always enabled on LM64 only ? Otherwise people may wonder why fans don't (always) show up on LM96163.
Other than that,
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 26 lines · Jean Delvare
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled.
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm63 | 4 +++- drivers/hwmon/lm63.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)Documentation/hwmon/lm63 +3
-1@@ -54,7 +54,9 @@ value for measuring the speed of the fan Note that the pin used for fan monitoring is shared with an alert out function. Depending on how the board designer wanted to use the chip, fan speed monitoring will or will not be possible. The proper chip configuration -is left to the BIOS, and the driver will blindly trust it. +is left to the BIOS, and the driver will blindly trust it. Only the original +LM63 suffers from this limitation, the LM64 and LM96163 have separate pins +for fan monitoring and alert out. A PWM output can be used to control the speed of the fan. The LM63 has two PWM modes: manual and automatic. Automatic mode is not fully implemented yet
drivers/hwmon/lm63.c static int lm63_probe(struct i2c_client · line 752
Quoted 9 lines
drivers/hwmon/lm63.c +2
-1@@ -745,7 +745,8 @@ static int lm63_probe(struct i2c_client err =sysfs_create_group (&new_client->dev.kobj, &lm63_group);if (err) goto exit_free; -if (data->config &0x04 ) {/* tachometer enabled */ +if (data->kind = lm64 ||/* tachometer has dedicated pin */ + (data->config &0x04 )) {/* tachometer enabled */ err =sysfs_create_group (&new_client->dev.kobj, &lm63_group_fan1);if (err)
Just realized: In lm63_update_device(), the code checks for data->config & 0x04 again and never reads the fan registers if it is 0. Since the bit is reserved on LM64, fan status will never be read for it.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 31 lines · Guenter Roeck
Quoted 30 lines · Jean Delvare
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled.
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm63 | 4 +++- drivers/hwmon/lm63.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)Documentation/hwmon/lm63 +3
-1@@ -54,7 +54,9 @@ value for measuring the speed of the fan Note that the pin used for fan monitoring is shared with an alert out function. Depending on how the board designer wanted to use the chip, fan speed monitoring will or will not be possible. The proper chip configuration -is left to the BIOS, and the driver will blindly trust it. +is left to the BIOS, and the driver will blindly trust it. Only the original +LM63 suffers from this limitation, the LM64 and LM96163 have separate pins +for fan monitoring and alert out. A PWM output can be used to control the speed of the fan. The LM63 has two PWM modes: manual and automatic. Automatic mode is not fully implemented yetdrivers/hwmon/lm63.c +1
-1@@ -745,7 +745,8 @@ static int lm63_probe(struct i2c_client err =sysfs_create_group (&new_client->dev.kobj, &lm63_group);if (err) goto exit_free; -if (data->config &0x04 ) {/* tachometer enabled */ + if (data->kind = lm64 || /* tachometer has dedicated pin */
Quoted 8 lines
drivers/hwmon/lm63.c static int lm63_probe(struct i2c_client · line 752
Quoted 5 lines
drivers/hwmon/lm63.c +1
-0+ (data->config & 0x04)) { /* tachometer enabled */ err =sysfs_create_group (&new_client->dev.kobj, &lm63_group_fan1);if (err)Just realized: In
lm63_update_device(), the code checks fordata->config&0x04again and never reads the fan registers if it is 0. Since the bit is reserved on LM64, fan status will never be read for it.
Yeah, my patch is crap, I noticed right after sending it. I should have tested before sending rather than the other way around, sorry. An update is coming.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Guenter Roeck
Quoted 10 lines · Jean Delvare
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled.
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm63 | 4 +++- drivers/hwmon/lm63.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
Quoted 12 lines
Documentation/hwmon/lm63 value for measuring the speed of the fan · line 60
Quoted 11 lines
Documentation/hwmon/lm63 +3
-1@@ -54,7 +54,9 @@ value for measuring the speed of the fan Note that the pin used for fan monitoring is shared with an alert out function. Depending on how the board designer wanted to use the chip, fan speed monitoring will or will not be possible. The proper chip configuration -is left to the BIOS, and the driver will blindly trust it. +is left to the BIOS, and the driver will blindly trust it. Only the original +LM63 suffers from this limitation, the LM64 and LM96163 have separate pins +for fan monitoring and alert out.Maybe add a note here indicating that fan control is always enabled on LM64 only ?
You mean fan monitoring here, not fan control.
Quoted 1 line
Otherwise people may wonder why fans don't (always) show up on LM96163.
Will clarify, thanks for the suggestion.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors