#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 WDT_EN …
#define WDT_TIMER …
#define WDT_SET …
#define DEFAULT_HEARTBEAT …
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0444);
static unsigned int heartbeat;
module_param(heartbeat, uint, 0444);
struct ls1x_wdt_drvdata { … };
static int ls1x_wdt_ping(struct watchdog_device *wdt_dev)
{ … }
static int ls1x_wdt_set_timeout(struct watchdog_device *wdt_dev,
unsigned int timeout)
{ … }
static int ls1x_wdt_start(struct watchdog_device *wdt_dev)
{ … }
static int ls1x_wdt_stop(struct watchdog_device *wdt_dev)
{ … }
static int ls1x_wdt_restart(struct watchdog_device *wdt_dev,
unsigned long action, void *data)
{ … }
static const struct watchdog_info ls1x_wdt_info = …;
static const struct watchdog_ops ls1x_wdt_ops = …;
static int ls1x_wdt_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id ls1x_wdt_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, ls1x_wdt_dt_ids);
#endif
static struct platform_driver ls1x_wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;