#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#define DEFAULT_HEARTBEAT …
#define MAX_HEARTBEAT …
#define WDTIM_INT(p) …
#define WDTIM_CTRL(p) …
#define WDTIM_COUNTER(p) …
#define WDTIM_MCTRL(p) …
#define WDTIM_MATCH0(p) …
#define WDTIM_EMR(p) …
#define WDTIM_PULSE(p) …
#define WDTIM_RES(p) …
#define MATCH_INT …
#define COUNT_ENAB …
#define RESET_COUNT …
#define DEBUG_EN …
#define MR0_INT …
#undef RESET_COUNT0
#define RESET_COUNT0 …
#define STOP_COUNT0 …
#define M_RES1 …
#define M_RES2 …
#define RESFRC1 …
#define RESFRC2 …
#define EXT_MATCH0 …
#define MATCH_OUTPUT_HIGH …
#define WDOG_RESET …
#define WDOG_COUNTER_RATE …
static bool nowayout = … WATCHDOG_NOWAYOUT;
static unsigned int heartbeat;
static DEFINE_SPINLOCK(io_lock);
static void __iomem *wdt_base;
static struct clk *wdt_clk;
static int pnx4008_wdt_start(struct watchdog_device *wdd)
{ … }
static int pnx4008_wdt_stop(struct watchdog_device *wdd)
{ … }
static int pnx4008_wdt_set_timeout(struct watchdog_device *wdd,
unsigned int new_timeout)
{ … }
static int pnx4008_restart_handler(struct watchdog_device *wdd,
unsigned long mode, void *cmd)
{ … }
static const struct watchdog_info pnx4008_wdt_ident = …;
static const struct watchdog_ops pnx4008_wdt_ops = …;
static struct watchdog_device pnx4008_wdd = …;
static int pnx4008_wdt_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id pnx4008_wdt_match[] = …;
MODULE_DEVICE_TABLE(of, pnx4008_wdt_match);
#endif
static struct platform_driver platform_wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(…) …;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;