#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/ioport.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#define WDT_ENABLE …
#define WDT_DISABLE …
#define ALI_7101_WDT …
#define ALI_7101_GPIO …
#define ALI_7101_GPIO_O …
#define ALI_WDT_ARM …
#define WDT_INTERVAL …
#define WATCHDOG_TIMEOUT …
static int timeout = …;
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
static int use_gpio;
module_param(use_gpio, int, 0);
MODULE_PARM_DESC(…) …;
static void wdt_timer_ping(struct timer_list *);
static DEFINE_TIMER(timer, wdt_timer_ping);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
static struct pci_dev *alim7101_pmu;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static void wdt_timer_ping(struct timer_list *unused)
{ … }
static void wdt_change(int writeval)
{ … }
static void wdt_startup(void)
{ … }
static void wdt_turnoff(void)
{ … }
static void wdt_keepalive(void)
{ … }
static ssize_t fop_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static int fop_open(struct inode *inode, struct file *file)
{ … }
static int fop_close(struct inode *inode, struct file *file)
{ … }
static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static const struct file_operations wdt_fops = …;
static struct miscdevice wdt_miscdev = …;
static int wdt_restart_handle(struct notifier_block *this, unsigned long mode,
void *cmd)
{ … }
static struct notifier_block wdt_restart_handler = …;
static int wdt_notify_sys(struct notifier_block *this,
unsigned long code, void *unused)
{ … }
static struct notifier_block wdt_notifier = …;
static void __exit alim7101_wdt_unload(void)
{ … }
static int __init alim7101_wdt_init(void)
{ … }
module_init(…) …;
module_exit(alim7101_wdt_unload);
static const struct pci_device_id alim7101_pci_tbl[] __used = …;
MODULE_DEVICE_TABLE(pci, alim7101_pci_tbl);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;