linux/drivers/watchdog/da9063_wdt.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Watchdog driver for DA9063 PMICs.
 *
 * Copyright(c) 2012 Dialog Semiconductor Ltd.
 *
 * Author: Mariusz Wojtasik <[email protected]>
 *
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/mfd/da9063/registers.h>
#include <linux/mfd/da9063/core.h>
#include <linux/property.h>
#include <linux/regmap.h>

/*
 * Watchdog selector to timeout in seconds.
 *   0: WDT disabled;
 *   others: timeout = 2048 ms * 2^(TWDSCALE-1).
 */
static const unsigned int wdt_timeout[] =;
static bool use_sw_pm;

#define DA9063_TWDSCALE_DISABLE
#define DA9063_TWDSCALE_MIN
#define DA9063_TWDSCALE_MAX
#define DA9063_WDT_MIN_TIMEOUT
#define DA9063_WDT_MAX_TIMEOUT
#define DA9063_WDG_TIMEOUT
#define DA9063_RESET_PROTECTION_MS

static unsigned int da9063_wdt_timeout_to_sel(unsigned int secs)
{}

/*
 * Read the currently active timeout.
 * Zero means the watchdog is disabled.
 */
static unsigned int da9063_wdt_read_timeout(struct da9063 *da9063)
{}

static int da9063_wdt_disable_timer(struct da9063 *da9063)
{}

static int
da9063_wdt_update_timeout(struct da9063 *da9063, unsigned int timeout)
{}

static int da9063_wdt_start(struct watchdog_device *wdd)
{}

static int da9063_wdt_stop(struct watchdog_device *wdd)
{}

static int da9063_wdt_ping(struct watchdog_device *wdd)
{}

static int da9063_wdt_set_timeout(struct watchdog_device *wdd,
				  unsigned int timeout)
{}

static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long action,
			      void *data)
{}

static const struct watchdog_info da9063_watchdog_info =;

static const struct watchdog_ops da9063_watchdog_ops =;

static int da9063_wdt_probe(struct platform_device *pdev)
{}

static int __maybe_unused da9063_wdt_suspend(struct device *dev)
{}

static int __maybe_unused da9063_wdt_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(da9063_wdt_pm_ops,
			da9063_wdt_suspend, da9063_wdt_resume);

static struct platform_driver da9063_wdt_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();