Skip to content

Commit

Permalink
hwmon: (nct6775) Enable IO mapping for NCT6797D and NCT6798D
Browse files Browse the repository at this point in the history
Similar to other recent chips from Nuvoton, IO mapping may be disabled
by default. Enable it when instantiating the driver and after resume.

Fixes: 0599682 ("hwmon: (nct6775) Add support for NCT6798D")
Fixes: e41da28 ("hwmon: (nct6775) Add support for NCT6797D")
Reported-by: Michael Cook <mcook@mackal.net>
Cc: Michael Cook <mcook@mackal.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Jan 7, 2019
1 parent 264142b commit 9de15c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/hwmon/nct6775.c
Original file line number Diff line number Diff line change
@@ -4508,7 +4508,8 @@ static int __maybe_unused nct6775_resume(struct device *dev)

if (data->kind == nct6791 || data->kind == nct6792 ||
data->kind == nct6793 || data->kind == nct6795 ||
data->kind == nct6796)
data->kind == nct6796 || data->kind == nct6797 ||
data->kind == nct6798)
nct6791_enable_io_mapping(sioreg);

superio_exit(sioreg);
@@ -4644,7 +4645,8 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data)

if (sio_data->kind == nct6791 || sio_data->kind == nct6792 ||
sio_data->kind == nct6793 || sio_data->kind == nct6795 ||
sio_data->kind == nct6796)
sio_data->kind == nct6796 || sio_data->kind == nct6797 ||
sio_data->kind == nct6798)
nct6791_enable_io_mapping(sioaddr);

superio_exit(sioaddr);

0 comments on commit 9de15c9

Please sign in to comment.