#include <linux/bitops.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/property.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/watchdog.h>
#define PON_POFF_REASON1 …
#define PON_POFF_REASON1_PMIC_WD …
#define PON_POFF_REASON2 …
#define PON_POFF_REASON2_UVLO …
#define PON_POFF_REASON2_OTST3 …
#define PON_INT_RT_STS …
#define PMIC_WD_BARK_STS_BIT …
#define PON_PMIC_WD_RESET_S1_TIMER …
#define PON_PMIC_WD_RESET_S2_TIMER …
#define PON_PMIC_WD_RESET_S2_CTL …
#define RESET_TYPE_WARM …
#define RESET_TYPE_SHUTDOWN …
#define RESET_TYPE_HARD …
#define PON_PMIC_WD_RESET_S2_CTL2 …
#define S2_RESET_EN_BIT …
#define PON_PMIC_WD_RESET_PET …
#define WATCHDOG_PET_BIT …
#define PM8916_WDT_DEFAULT_TIMEOUT …
#define PM8916_WDT_MIN_TIMEOUT …
#define PM8916_WDT_MAX_TIMEOUT …
struct pm8916_wdt { … };
static int pm8916_wdt_start(struct watchdog_device *wdev)
{ … }
static int pm8916_wdt_stop(struct watchdog_device *wdev)
{ … }
static int pm8916_wdt_ping(struct watchdog_device *wdev)
{ … }
static int pm8916_wdt_configure_timers(struct watchdog_device *wdev)
{ … }
static int pm8916_wdt_set_timeout(struct watchdog_device *wdev,
unsigned int timeout)
{ … }
static int pm8916_wdt_set_pretimeout(struct watchdog_device *wdev,
unsigned int pretimeout)
{ … }
static irqreturn_t pm8916_wdt_isr(int irq, void *arg)
{ … }
static const struct watchdog_info pm8916_wdt_ident = …;
static const struct watchdog_info pm8916_wdt_pt_ident = …;
static const struct watchdog_ops pm8916_wdt_ops = …;
static int pm8916_wdt_probe(struct platform_device *pdev)
{ … }
static int __maybe_unused pm8916_wdt_suspend(struct device *dev)
{ … }
static int __maybe_unused pm8916_wdt_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(pm8916_wdt_pm_ops, pm8916_wdt_suspend,
pm8916_wdt_resume);
static const struct of_device_id pm8916_wdt_id_table[] = …;
MODULE_DEVICE_TABLE(of, pm8916_wdt_id_table);
static struct platform_driver pm8916_wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;