#include <dt-bindings/reset/mt2712-resets.h>
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
#include <dt-bindings/reset/mt7986-resets.h>
#include <dt-bindings/reset/mt8183-resets.h>
#include <dt-bindings/reset/mt8186-resets.h>
#include <dt-bindings/reset/mt8188-resets.h>
#include <dt-bindings/reset/mt8192-resets.h>
#include <dt-bindings/reset/mt8195-resets.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/interrupt.h>
#define WDT_MAX_TIMEOUT …
#define WDT_MIN_TIMEOUT …
#define WDT_LENGTH_TIMEOUT(n) …
#define WDT_LENGTH …
#define WDT_LENGTH_KEY …
#define WDT_RST …
#define WDT_RST_RELOAD …
#define WDT_MODE …
#define WDT_MODE_EN …
#define WDT_MODE_EXT_POL_LOW …
#define WDT_MODE_EXT_POL_HIGH …
#define WDT_MODE_EXRST_EN …
#define WDT_MODE_IRQ_EN …
#define WDT_MODE_AUTO_START …
#define WDT_MODE_DUAL_EN …
#define WDT_MODE_CNT_SEL …
#define WDT_MODE_KEY …
#define WDT_SWRST …
#define WDT_SWRST_KEY …
#define WDT_SWSYSRST …
#define WDT_SWSYS_RST_KEY …
#define WDT_SWSYSRST_EN …
#define DRV_NAME …
#define DRV_VERSION …
#define MT7988_TOPRGU_SW_RST_NUM …
static bool nowayout = … WATCHDOG_NOWAYOUT;
static unsigned int timeout;
struct mtk_wdt_dev { … };
struct mtk_wdt_data { … };
static const struct mtk_wdt_data mt2712_data = …;
static const struct mtk_wdt_data mt6795_data = …;
static const struct mtk_wdt_data mt7986_data = …;
static const struct mtk_wdt_data mt7988_data = …;
static const struct mtk_wdt_data mt8183_data = …;
static const struct mtk_wdt_data mt8186_data = …;
static const struct mtk_wdt_data mt8188_data = …;
static const struct mtk_wdt_data mt8192_data = …;
static const struct mtk_wdt_data mt8195_data = …;
static void toprgu_reset_sw_en_unlocked(struct mtk_wdt_dev *data,
unsigned long id, bool enable)
{ … }
static int toprgu_reset_update(struct reset_controller_dev *rcdev,
unsigned long id, bool assert)
{ … }
static int toprgu_reset_assert(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static int toprgu_reset_deassert(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static int toprgu_reset(struct reset_controller_dev *rcdev,
unsigned long id)
{ … }
static const struct reset_control_ops toprgu_reset_ops = …;
static int toprgu_register_reset_controller(struct platform_device *pdev,
int rst_num)
{ … }
static int mtk_wdt_restart(struct watchdog_device *wdt_dev,
unsigned long action, void *data)
{ … }
static int mtk_wdt_ping(struct watchdog_device *wdt_dev)
{ … }
static int mtk_wdt_set_timeout(struct watchdog_device *wdt_dev,
unsigned int timeout)
{ … }
static void mtk_wdt_init(struct watchdog_device *wdt_dev)
{ … }
static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
{ … }
static int mtk_wdt_start(struct watchdog_device *wdt_dev)
{ … }
static int mtk_wdt_set_pretimeout(struct watchdog_device *wdd,
unsigned int timeout)
{ … }
static irqreturn_t mtk_wdt_isr(int irq, void *arg)
{ … }
static const struct watchdog_info mtk_wdt_info = …;
static const struct watchdog_info mtk_wdt_pt_info = …;
static const struct watchdog_ops mtk_wdt_ops = …;
static int mtk_wdt_probe(struct platform_device *pdev)
{ … }
static int mtk_wdt_suspend(struct device *dev)
{ … }
static int mtk_wdt_resume(struct device *dev)
{ … }
static const struct of_device_id mtk_wdt_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
static DEFINE_SIMPLE_DEV_PM_OPS(mtk_wdt_pm_ops,
mtk_wdt_suspend, mtk_wdt_resume);
static struct platform_driver mtk_wdt_driver = …;
module_platform_driver(…) …;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(…) …;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);