#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#define ESB_MODULE_NAME …
#define ESB_CONFIG_REG …
#define ESB_LOCK_REG …
#define ESB_TIMER1_REG(w) …
#define ESB_TIMER2_REG(w) …
#define ESB_GINTSR_REG(w) …
#define ESB_RELOAD_REG(w) …
#define ESB_WDT_FUNC …
#define ESB_WDT_ENABLE …
#define ESB_WDT_LOCK …
#define ESB_WDT_REBOOT …
#define ESB_WDT_FREQ …
#define ESB_WDT_INTTYPE …
#define ESB_WDT_TIMEOUT …
#define ESB_WDT_RELOAD …
#define ESB_UNLOCK1 …
#define ESB_UNLOCK2 …
#define ESB_HEARTBEAT_MIN …
#define ESB_HEARTBEAT_MAX …
#define ESB_HEARTBEAT_DEFAULT …
#define ESB_HEARTBEAT_RANGE …
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 esb_dev { … };
#define to_esb_dev(wptr) …
static inline void esb_unlock_registers(struct esb_dev *edev)
{ … }
static int esb_timer_start(struct watchdog_device *wdd)
{ … }
static int esb_timer_stop(struct watchdog_device *wdd)
{ … }
static int esb_timer_keepalive(struct watchdog_device *wdd)
{ … }
static int esb_timer_set_heartbeat(struct watchdog_device *wdd,
unsigned int time)
{ … }
static struct watchdog_info esb_info = …;
static const struct watchdog_ops esb_ops = …;
static const struct pci_device_id esb_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, esb_pci_tbl);
static unsigned char esb_getdevice(struct esb_dev *edev)
{ … }
static void esb_initdevice(struct esb_dev *edev)
{ … }
static int esb_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
static void esb_remove(struct pci_dev *pdev)
{ … }
static struct pci_driver esb_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;