mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Documentation/hwmon/via686a | 17 +++++++++++++++-- drivers/hwmon/via686a.c | 18 +++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-)
This commit is contained in:
parent
e415e48b68
commit
b918ecd242
2 changed files with 26 additions and 9 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue