diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-01-26 11:53:56 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-02-17 15:33:37 -0500 |
commit | a77841d59eb54ceb7b97b5e23053cd205e3a4c00 (patch) | |
tree | 5e1955903b1e01f0917b9007c884a4a2461da235 | |
parent | 1cc7495c60879eeeda52385a70c99c4cbaace7ef (diff) |
watchdog: w83627hf_wdt: Add support for NCT6791 and NCT6792
The watchdog functionality in both chips is almost identical to NCT6779.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/Kconfig | 2 | ||||
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 4fd4a13cb261..60a2bf400082 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -1015,6 +1015,8 @@ config W83627HF_WDT | |||
1015 | NCT6775 | 1015 | NCT6775 |
1016 | NCT6776 | 1016 | NCT6776 |
1017 | NCT6779 | 1017 | NCT6779 |
1018 | NCT6791 | ||
1019 | NCT6792 | ||
1018 | 1020 | ||
1019 | This watchdog simply watches your kernel to make sure it doesn't | 1021 | This watchdog simply watches your kernel to make sure it doesn't |
1020 | freeze, and if it does, it reboots your computer after a certain | 1022 | freeze, and if it does, it reboots your computer after a certain |
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 7165704a3e33..5824e25eebbb 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c | |||
@@ -50,7 +50,7 @@ static int cr_wdt_control; /* WDT control register */ | |||
50 | 50 | ||
51 | enum chips { w83627hf, w83627s, w83697hf, w83697ug, w83637hf, w83627thf, | 51 | enum chips { w83627hf, w83627s, w83697hf, w83697ug, w83637hf, w83627thf, |
52 | w83687thf, w83627ehf, w83627dhg, w83627uhg, w83667hg, w83627dhg_p, | 52 | w83687thf, w83627ehf, w83627dhg, w83627uhg, w83667hg, w83627dhg_p, |
53 | w83667hg_b, nct6775, nct6776, nct6779 }; | 53 | w83667hg_b, nct6775, nct6776, nct6779, nct6791, nct6792 }; |
54 | 54 | ||
55 | static int timeout; /* in seconds */ | 55 | static int timeout; /* in seconds */ |
56 | module_param(timeout, int, 0); | 56 | module_param(timeout, int, 0); |
@@ -95,6 +95,8 @@ MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)"); | |||
95 | #define NCT6775_ID 0xb4 | 95 | #define NCT6775_ID 0xb4 |
96 | #define NCT6776_ID 0xc3 | 96 | #define NCT6776_ID 0xc3 |
97 | #define NCT6779_ID 0xc5 | 97 | #define NCT6779_ID 0xc5 |
98 | #define NCT6791_ID 0xc8 | ||
99 | #define NCT6792_ID 0xc9 | ||
98 | 100 | ||
99 | #define W83627HF_WDT_TIMEOUT 0xf6 | 101 | #define W83627HF_WDT_TIMEOUT 0xf6 |
100 | #define W83697HF_WDT_TIMEOUT 0xf4 | 102 | #define W83697HF_WDT_TIMEOUT 0xf4 |
@@ -195,6 +197,8 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip) | |||
195 | case nct6775: | 197 | case nct6775: |
196 | case nct6776: | 198 | case nct6776: |
197 | case nct6779: | 199 | case nct6779: |
200 | case nct6791: | ||
201 | case nct6792: | ||
198 | /* | 202 | /* |
199 | * These chips have a fixed WDTO# output pin (W83627UHG), | 203 | * These chips have a fixed WDTO# output pin (W83627UHG), |
200 | * or support more than one WDTO# output pin. | 204 | * or support more than one WDTO# output pin. |
@@ -395,6 +399,12 @@ static int wdt_find(int addr) | |||
395 | case NCT6779_ID: | 399 | case NCT6779_ID: |
396 | ret = nct6779; | 400 | ret = nct6779; |
397 | break; | 401 | break; |
402 | case NCT6791_ID: | ||
403 | ret = nct6791; | ||
404 | break; | ||
405 | case NCT6792_ID: | ||
406 | ret = nct6792; | ||
407 | break; | ||
398 | case 0xff: | 408 | case 0xff: |
399 | ret = -ENODEV; | 409 | ret = -ENODEV; |
400 | break; | 410 | break; |
@@ -428,6 +438,8 @@ static int __init wdt_init(void) | |||
428 | "NCT6775", | 438 | "NCT6775", |
429 | "NCT6776", | 439 | "NCT6776", |
430 | "NCT6779", | 440 | "NCT6779", |
441 | "NCT6791", | ||
442 | "NCT6792", | ||
431 | }; | 443 | }; |
432 | 444 | ||
433 | wdt_io = 0x2e; | 445 | wdt_io = 0x2e; |