提交 dbac00f0 编写于 作者: G Guenter Roeck

hwmon: (nct6683) Enable EC access if disabled at boot

On Asrock Z370M Pro4, it was observed that EC access was disabled after
initially booting the system. As a result, the driver failed to load
with
	nct6683: EC is disabled
After a suspend/resume cycle, the driver loaded correctly.
	nct6683: Found NCT6683D or compatible chip at 0x2e:0xa20
	nct6683 nct6683.2592: NCT6683D EC firmware version 1.0 build 07/18/16

Enable EC access after identifying the chip if disabled to fix the problem.
Warn the user that the data it reports may be unusable, similar to other
drivers for chips from Nuvoton.

Fixes: 41082d66 ("hwmon: Driver for NCT6683D")
Reported-by: NJonathan Sims <jonathan.625266@earthlink.net>
Tested-by: NJonathan Sims <jonathan.625266@earthlink.net>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 f18a36cf
......@@ -1380,8 +1380,8 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)
/* Activate logical device if needed */
val = superio_inb(sioaddr, SIO_REG_ENABLE);
if (!(val & 0x01)) {
pr_err("EC is disabled\n");
goto fail;
pr_warn("Forcibly enabling EC access. Data may be unusable.\n");
superio_outb(sioaddr, SIO_REG_ENABLE, val | 0x01);
}
superio_exit(sioaddr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册