#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/mfd/kempld.h>
#define KEMPLD_WDT_STAGE_TIMEOUT(x) …
#define KEMPLD_WDT_STAGE_CFG(x) …
#define STAGE_CFG_GET_PRESCALER(x) …
#define STAGE_CFG_SET_PRESCALER(x) …
#define STAGE_CFG_PRESCALER_MASK …
#define STAGE_CFG_ACTION_MASK …
#define STAGE_CFG_ASSERT …
#define KEMPLD_WDT_MAX_STAGES …
#define KEMPLD_WDT_KICK …
#define KEMPLD_WDT_CFG …
#define KEMPLD_WDT_CFG_ENABLE …
#define KEMPLD_WDT_CFG_ENABLE_LOCK …
#define KEMPLD_WDT_CFG_GLOBAL_LOCK …
enum { … };
enum { … };
enum { … };
static const u32 kempld_prescaler[] = …;
struct kempld_wdt_stage { … };
struct kempld_wdt_data { … };
#define DEFAULT_TIMEOUT …
#define DEFAULT_PRETIMEOUT …
static unsigned int timeout = …;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(…) …;
static unsigned int pretimeout = …;
module_param(pretimeout, uint, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static int kempld_wdt_set_stage_action(struct kempld_wdt_data *wdt_data,
struct kempld_wdt_stage *stage,
u8 action)
{ … }
static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data,
struct kempld_wdt_stage *stage,
unsigned int timeout)
{ … }
static unsigned int kempld_wdt_get_timeout(struct kempld_wdt_data *wdt_data,
struct kempld_wdt_stage *stage)
{ … }
static int kempld_wdt_set_timeout(struct watchdog_device *wdd,
unsigned int timeout)
{ … }
static int kempld_wdt_set_pretimeout(struct watchdog_device *wdd,
unsigned int pretimeout)
{ … }
static void kempld_wdt_update_timeouts(struct kempld_wdt_data *wdt_data)
{ … }
static int kempld_wdt_start(struct watchdog_device *wdd)
{ … }
static int kempld_wdt_stop(struct watchdog_device *wdd)
{ … }
static int kempld_wdt_keepalive(struct watchdog_device *wdd)
{ … }
static long kempld_wdt_ioctl(struct watchdog_device *wdd, unsigned int cmd,
unsigned long arg)
{ … }
static int kempld_wdt_probe_stages(struct watchdog_device *wdd)
{ … }
static const struct watchdog_info kempld_wdt_info = …;
static const struct watchdog_ops kempld_wdt_ops = …;
static int kempld_wdt_probe(struct platform_device *pdev)
{ … }
static int kempld_wdt_suspend(struct platform_device *pdev,
pm_message_t message)
{ … }
static int kempld_wdt_resume(struct platform_device *pdev)
{ … }
static struct platform_driver kempld_wdt_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;