watchdog: max77620: Add support for watchdog timer
PATCH v3 1/1 watchdog: max77620: Add support for watchdog timer
Maxim PMIC MAX77620 is Power management IC which have multiple sub blocks like regulators (DCDC/LDOs), GPIO, RTC, Clock, Watchdog timer etc.
Add the driver for watchdog timer under watchdog framework. The driver implements the watchdog callbacks to start, stop, ping and set timeout for watchodg framework.
---
Changes from V1:
- Remove the error prints from start/stop/ping to simplify the function.
- Instead of stopping running WDT, inform HW RUNNING and update the required param accordingly.
- Resequence the param sets for wdt device to avoid race condition, move all wdt device setting before registration.
Changes from V2:
- Set timeout regardless of WDT running or not in probe.
drivers/watchdog/Kconfig | 9 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/max77620_wdt.c | 227 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 drivers/watchdog/max77620_wdt.c
drivers/watchdog/Kconfig +9 -0
@@ -516,6 +516,15 @@ config MAX63XX_WATCHDOG help Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. +config MAX77620_WATCHDOG + tristate "Maxim Max77620 Watchdog Timer" + depends on MFD_MAX77620 + help + This is the driver for the Max77620 watchdog timer. + Say 'Y' here to enable the watchdog timer support for + MAX77620 chips. To compile this driver as a module, + choose M here: the module will be called max77620_wdt. + config IMX2_WDT tristate "IMX2+ Watchdog" depends on ARCH_MXC || ARCH_LAYERSCAPE
drivers/watchdog/Makefile +1 -0
@@ -203,6 +203,7 @@ obj-$(CONFIG_TANGOX_WATCHDOG) += tangox_wdt.o obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o +obj-$(CONFIG_MAX77620_WATCHDOG) += max77620_wdt.o obj-$(CONFIG_ZIIRAVE_WATCHDOG) += ziirave_wdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o obj-$(CONFIG_MENF21BMC_WATCHDOG) += menf21bmc_wdt.o
drivers/watchdog/max77620_wdt.c new file +227 -0
227 lines not on this page · raw message
Signature · 1 line
2.1.4
Quoted 9 lines · Laxman Dewangan
Maxim PMIC MAX77620 is Power management IC which have multiple sub blocks like regulators (DCDC/LDOs), GPIO, RTC, Clock, Watchdog timer etc.
Add the driver for watchdog timer under watchdog framework. The driver implements the watchdog callbacks to start, stop, ping and set timeout for watchodg framework.
Signed-off-by Laxman Dewangan <[email protected]>
Mostly good.
[ ... ]
drivers/watchdog/max77620_wdt.c line 157
Quoted 1 line
drivers/watchdog/max77620_wdt.c new file +1
-0+/* Check if WDT running and ig yes then set flags properly */
s/ig/if/
Please fix this up and resend, with
Can you by any chance send me a copy of the datasheet ? I wanted to look up the chip default for the watchdog timeout and realized that the chip does not officially exist.
Thanks,
Guenter