summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-25 16:18:49 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 14:02:06 -0700
commitb918ecd2429e1a89b846d9e49ca4520b963c13e8 (patch)
tree396e8a1f2e958f713722b53c2ab68c66e9b265b3 /drivers/hwmon
parente415e48b68155bea8b5452113dedba4ec486f3f6 (diff)
downloadlinux-3.10-b918ecd2429e1a89b846d9e49ca4520b963c13e8.tar.gz
linux-3.10-b918ecd2429e1a89b846d9e49ca4520b963c13e8.tar.bz2
linux-3.10-b918ecd2429e1a89b846d9e49ca4520b963c13e8.zip
[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/hwmon')
-rw-r--r--drivers/hwmon/via686a.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c
index 60e94879f41..688ccf924c3 100644
--- a/drivers/hwmon/via686a.c
+++ b/drivers/hwmon/via686a.c
@@ -589,10 +589,8 @@ static int via686a_detect(struct i2c_adapter *adapter)
u16 val;
/* 8231 requires multiple of 256, we enforce that on 686 as well */
- if (force_addr)
- address = force_addr & 0xFF00;
-
if (force_addr) {
+ address = force_addr & 0xFF00;
dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n",
address);
if (PCIBIOS_SUCCESSFUL !=
@@ -603,11 +601,17 @@ static int via686a_detect(struct i2c_adapter *adapter)
pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val))
return -ENODEV;
if (!(val & 0x0001)) {
- dev_warn(&adapter->dev, "enabling sensors\n");
- if (PCIBIOS_SUCCESSFUL !=
- pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
- val | 0x0001))
+ if (force_addr) {
+ dev_info(&adapter->dev, "enabling sensors\n");
+ if (PCIBIOS_SUCCESSFUL !=
+ pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
+ val | 0x0001))
+ return -ENODEV;
+ } else {
+ dev_warn(&adapter->dev, "sensors disabled - enable "
+ "with force_addr=0x%x\n", address);
return -ENODEV;
+ }
}
/* Reserve the ISA region */