Ticket #2282 (closed defect: fixed)
enable vbat monitoring
| Reported by: | ticket | Owned by: | khali |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | kernel | Version: | |
| Keywords: | Cc: |
Description
hello,
we have problems with measuring of vbat on our motherboard with w83627hf-chip. The vbat values are only valid when we visited the bios-hardware-monitor-pages during startup of our linux installation.
kernel version: 2.6.22.1-rt9
We then figured out, that in the chipset exists a bit(W83627HF_REG_VBAT:Bit0) which controls the measuring behaviour of vbat. When we visit the bios or when we switch on the bit in the kernel-file w83627hf.c, then vbat shows valid values. (in /sys/devices/platform/w83627hf.656/in8_input)
In parallel we found a bugfix for the w83627ehf.c-driver (see below) which enables exactly this bit. It seems that the same Bugfix should be made to the w83627hf.c-driver. But please note: In another motherboard with another bios everything worked well, It looks like that the initial Value of this Bit is bios-dependant.
Thomas Husterer
hwmon/w83627ehf: Enable VBAT monitoring
If VBAT monitoring is disabled, enable it. Original patch from an anonymous contributor on the lm-sensors trac system: http://lm-sensors.org/ticket/2218
[kernel/mhoffman/hwmon-2.6.git] / drivers / hwmon / w83627ehf.c
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index a336793..e87fcf8 100644 (file)
--- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1205,6 +1205,11 @@ static inline void devinit w83627ehf_init_device(struct w83627ehf_data *data)
W83627EHF_REG_TEMP_CONFIG[i], tmp & 0xfe);
}
+ + /* Enable VBAT monitoring if needed */ + tmp = w83627ehf_read_value(data, W83627EHF_REG_VBAT); + if (!(tmp & 0x01)) + w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01);
}
static int devinit w83627ehf_probe(struct platform_device *pdev)

