diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-09-25 10:18:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:06 -0400 |
commit | b918ecd2429e1a89b846d9e49ca4520b963c13e8 (patch) | |
tree | 396e8a1f2e958f713722b53c2ab68c66e9b265b3 /drivers | |
parent | e415e48b68155bea8b5452113dedba4ec486f3f6 (diff) |
[PATCH] hwmon: Do not forcibly enable via686a by default
Do not enable the VIA VT82C686A/B integrated sensors by default, as
disabled sensors usually means that this feature is not used so the
values won't make any sense. This has been confusing many users in the
past:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1786
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1811
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=2052
It is still possible to forcibly enable the sensors by using the
force_addr module parameter.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/hwmon/via686a | 17 +++++++++++++++--
drivers/hwmon/via686a.c | 18 +++++++++++-------
2 files changed, 26 insertions(+), 9 deletions(-)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/via686a.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c index 60e94879f415..688ccf924c3a 100644 --- a/drivers/hwmon/via686a.c +++ b/drivers/hwmon/via686a.c | |||
@@ -589,10 +589,8 @@ static int via686a_detect(struct i2c_adapter *adapter) | |||
589 | u16 val; | 589 | u16 val; |
590 | 590 | ||
591 | /* 8231 requires multiple of 256, we enforce that on 686 as well */ | 591 | /* 8231 requires multiple of 256, we enforce that on 686 as well */ |
592 | if (force_addr) | ||
593 | address = force_addr & 0xFF00; | ||
594 | |||
595 | if (force_addr) { | 592 | if (force_addr) { |
593 | address = force_addr & 0xFF00; | ||
596 | dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", | 594 | dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", |
597 | address); | 595 | address); |
598 | if (PCIBIOS_SUCCESSFUL != | 596 | if (PCIBIOS_SUCCESSFUL != |
@@ -603,11 +601,17 @@ static int via686a_detect(struct i2c_adapter *adapter) | |||
603 | pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) | 601 | pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) |
604 | return -ENODEV; | 602 | return -ENODEV; |
605 | if (!(val & 0x0001)) { | 603 | if (!(val & 0x0001)) { |
606 | dev_warn(&adapter->dev, "enabling sensors\n"); | 604 | if (force_addr) { |
607 | if (PCIBIOS_SUCCESSFUL != | 605 | dev_info(&adapter->dev, "enabling sensors\n"); |
608 | pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, | 606 | if (PCIBIOS_SUCCESSFUL != |
609 | val | 0x0001)) | 607 | pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, |
608 | val | 0x0001)) | ||
609 | return -ENODEV; | ||
610 | } else { | ||
611 | dev_warn(&adapter->dev, "sensors disabled - enable " | ||
612 | "with force_addr=0x%x\n", address); | ||
610 | return -ENODEV; | 613 | return -ENODEV; |
614 | } | ||
611 | } | 615 | } |
612 | 616 | ||
613 | /* Reserve the ISA region */ | 617 | /* Reserve the ISA region */ |