mirror of https://gitee.com/openkylin/linux.git
hwmon: (it87) Don't configure 16 bit fan counters it not necessary
On IT8728F, IT8771E, and IT8772E, fans counters are always 16 bit and don't need to be configured for it. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
0ea2f1db8e
commit
fd044868e8
|
@ -2463,9 +2463,12 @@ static void it87_init_device(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
data->has_fan = (data->fan_main_ctrl >> 4) & 0x07;
|
data->has_fan = (data->fan_main_ctrl >> 4) & 0x07;
|
||||||
|
|
||||||
/* Set tachometers to 16-bit mode if needed, IT8603E (and IT8728F?)
|
/*
|
||||||
* has it by default */
|
* Set tachometers to 16-bit mode if needed. IT8603E, IT8728F,
|
||||||
if (has_16bit_fans(data) && data->type != it8603) {
|
* IT8771E (guesswork), and IT8772E have it by default.
|
||||||
|
*/
|
||||||
|
if (has_16bit_fans(data) && data->type != it8603 && data->type != it8728
|
||||||
|
&& data->type != it8771 && data->type != it8772) {
|
||||||
tmp = it87_read_value(data, IT87_REG_FAN_16BIT);
|
tmp = it87_read_value(data, IT87_REG_FAN_16BIT);
|
||||||
if (~tmp & 0x07 & data->has_fan) {
|
if (~tmp & 0x07 & data->has_fan) {
|
||||||
dev_dbg(&pdev->dev,
|
dev_dbg(&pdev->dev,
|
||||||
|
|
Loading…
Reference in New Issue