#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
#define LPC18XX_WDT_MOD …
#define LPC18XX_WDT_MOD_WDEN …
#define LPC18XX_WDT_MOD_WDRESET …
#define LPC18XX_WDT_TC …
#define LPC18XX_WDT_TC_MIN …
#define LPC18XX_WDT_TC_MAX …
#define LPC18XX_WDT_FEED …
#define LPC18XX_WDT_FEED_MAGIC1 …
#define LPC18XX_WDT_FEED_MAGIC2 …
#define LPC18XX_WDT_TV …
#define LPC18XX_WDT_CLK_DIV …
#define LPC18XX_WDT_DEF_TIMEOUT …
static int heartbeat;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
struct lpc18xx_wdt_dev { … };
static int lpc18xx_wdt_feed(struct watchdog_device *wdt_dev)
{ … }
static void lpc18xx_wdt_timer_feed(struct timer_list *t)
{ … }
static int lpc18xx_wdt_stop(struct watchdog_device *wdt_dev)
{ … }
static void __lpc18xx_wdt_set_timeout(struct lpc18xx_wdt_dev *lpc18xx_wdt)
{ … }
static int lpc18xx_wdt_set_timeout(struct watchdog_device *wdt_dev,
unsigned int new_timeout)
{ … }
static unsigned int lpc18xx_wdt_get_timeleft(struct watchdog_device *wdt_dev)
{ … }
static int lpc18xx_wdt_start(struct watchdog_device *wdt_dev)
{ … }
static int lpc18xx_wdt_restart(struct watchdog_device *wdt_dev,
unsigned long action, void *data)
{ … }
static const struct watchdog_info lpc18xx_wdt_info = …;
static const struct watchdog_ops lpc18xx_wdt_ops = …;
static int lpc18xx_wdt_probe(struct platform_device *pdev)
{ … }
static void lpc18xx_wdt_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id lpc18xx_wdt_match[] = …;
MODULE_DEVICE_TABLE(of, lpc18xx_wdt_match);
static struct platform_driver lpc18xx_wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;