diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-27 09:46:12 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2009-09-18 04:35:49 -0400 |
commit | 502a0106b2cc31940f690dc6693fddfd3b97cab5 (patch) | |
tree | fc6e7c4aa8a8df5b5a72566a9a3cda9153e7802d /include | |
parent | 0400e3134b03336617138f9ebf2cd0f117ceef20 (diff) |
[WATCHDOG] Add support for WM831x watchdog
The WM831x series of devices provide a watchdog with configurable
behaviour on timer expiry.
Currently this driver support refreshes via a register or GPIO line and
autonomous refreshes from a hardware source (eg, a clock).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/wm831x/watchdog.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/linux/mfd/wm831x/watchdog.h b/include/linux/mfd/wm831x/watchdog.h new file mode 100644 index 000000000000..97a99b52956f --- /dev/null +++ b/include/linux/mfd/wm831x/watchdog.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * include/linux/mfd/wm831x/watchdog.h -- Watchdog for WM831x | ||
3 | * | ||
4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
5 | * | ||
6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __MFD_WM831X_WATCHDOG_H__ | ||
16 | #define __MFD_WM831X_WATCHDOG_H__ | ||
17 | |||
18 | |||
19 | /* | ||
20 | * R16388 (0x4004) - Watchdog | ||
21 | */ | ||
22 | #define WM831X_WDOG_ENA 0x8000 /* WDOG_ENA */ | ||
23 | #define WM831X_WDOG_ENA_MASK 0x8000 /* WDOG_ENA */ | ||
24 | #define WM831X_WDOG_ENA_SHIFT 15 /* WDOG_ENA */ | ||
25 | #define WM831X_WDOG_ENA_WIDTH 1 /* WDOG_ENA */ | ||
26 | #define WM831X_WDOG_DEBUG 0x4000 /* WDOG_DEBUG */ | ||
27 | #define WM831X_WDOG_DEBUG_MASK 0x4000 /* WDOG_DEBUG */ | ||
28 | #define WM831X_WDOG_DEBUG_SHIFT 14 /* WDOG_DEBUG */ | ||
29 | #define WM831X_WDOG_DEBUG_WIDTH 1 /* WDOG_DEBUG */ | ||
30 | #define WM831X_WDOG_RST_SRC 0x2000 /* WDOG_RST_SRC */ | ||
31 | #define WM831X_WDOG_RST_SRC_MASK 0x2000 /* WDOG_RST_SRC */ | ||
32 | #define WM831X_WDOG_RST_SRC_SHIFT 13 /* WDOG_RST_SRC */ | ||
33 | #define WM831X_WDOG_RST_SRC_WIDTH 1 /* WDOG_RST_SRC */ | ||
34 | #define WM831X_WDOG_SLPENA 0x1000 /* WDOG_SLPENA */ | ||
35 | #define WM831X_WDOG_SLPENA_MASK 0x1000 /* WDOG_SLPENA */ | ||
36 | #define WM831X_WDOG_SLPENA_SHIFT 12 /* WDOG_SLPENA */ | ||
37 | #define WM831X_WDOG_SLPENA_WIDTH 1 /* WDOG_SLPENA */ | ||
38 | #define WM831X_WDOG_RESET 0x0800 /* WDOG_RESET */ | ||
39 | #define WM831X_WDOG_RESET_MASK 0x0800 /* WDOG_RESET */ | ||
40 | #define WM831X_WDOG_RESET_SHIFT 11 /* WDOG_RESET */ | ||
41 | #define WM831X_WDOG_RESET_WIDTH 1 /* WDOG_RESET */ | ||
42 | #define WM831X_WDOG_SECACT_MASK 0x0300 /* WDOG_SECACT - [9:8] */ | ||
43 | #define WM831X_WDOG_SECACT_SHIFT 8 /* WDOG_SECACT - [9:8] */ | ||
44 | #define WM831X_WDOG_SECACT_WIDTH 2 /* WDOG_SECACT - [9:8] */ | ||
45 | #define WM831X_WDOG_PRIMACT_MASK 0x0030 /* WDOG_PRIMACT - [5:4] */ | ||
46 | #define WM831X_WDOG_PRIMACT_SHIFT 4 /* WDOG_PRIMACT - [5:4] */ | ||
47 | #define WM831X_WDOG_PRIMACT_WIDTH 2 /* WDOG_PRIMACT - [5:4] */ | ||
48 | #define WM831X_WDOG_TO_MASK 0x0007 /* WDOG_TO - [2:0] */ | ||
49 | #define WM831X_WDOG_TO_SHIFT 0 /* WDOG_TO - [2:0] */ | ||
50 | #define WM831X_WDOG_TO_WIDTH 3 /* WDOG_TO - [2:0] */ | ||
51 | |||
52 | #endif | ||