#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/rohm-bd96801.h>
#include <linux/mfd/rohm-generic.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/watchdog.h>
static bool nowayout;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
#define BD96801_WD_TMO_SHORT_MASK …
#define BD96801_WD_RATIO_MASK …
#define BD96801_WD_TYPE_MASK …
#define BD96801_WD_TYPE_SLOW …
#define BD96801_WD_TYPE_WIN …
#define BD96801_WD_EN_MASK …
#define BD96801_WD_IF_EN …
#define BD96801_WD_QA_EN …
#define BD96801_WD_DISABLE …
#define BD96801_WD_ASSERT_MASK …
#define BD96801_WD_ASSERT_RST …
#define BD96801_WD_ASSERT_IRQ …
#define BD96801_WD_FEED_MASK …
#define BD96801_WD_FEED …
#define FASTNG_MIN …
#define FASTNG_MAX_US …
#define SLOWNG_MAX_US …
#define BD96801_WDT_DEFAULT_MARGIN_MS …
#define DEFAULT_TIMEOUT …
struct wdtbd96801 { … };
static int bd96801_wdt_ping(struct watchdog_device *wdt)
{ … }
static int bd96801_wdt_start(struct watchdog_device *wdt)
{ … }
static int bd96801_wdt_stop(struct watchdog_device *wdt)
{ … }
static const struct watchdog_info bd96801_wdt_info = …;
static const struct watchdog_ops bd96801_wdt_ops = …;
static int find_closest_fast(unsigned int target, int *sel, unsigned int *val)
{ … }
static int find_closest_slow_by_fast(unsigned int fast_val, unsigned int *target,
int *slowsel)
{ … }
static int find_closest_slow(unsigned int *target, int *slow_sel, int *fast_sel)
{ … }
static int bd96801_set_wdt_mode(struct wdtbd96801 *w, unsigned int hw_margin,
unsigned int hw_margin_min)
{ … }
static int bd96801_set_heartbeat_from_hw(struct wdtbd96801 *w,
unsigned int conf_reg)
{ … }
static int init_wdg_hw(struct wdtbd96801 *w)
{ … }
static irqreturn_t bd96801_irq_hnd(int irq, void *data)
{ … }
static int bd96801_wdt_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id bd96801_wdt_id[] = …;
MODULE_DEVICE_TABLE(platform, bd96801_wdt_id);
static struct platform_driver bd96801_wdt = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;