linux/drivers/watchdog/ts4800_wdt.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Watchdog driver for TS-4800 based boards
 *
 * Copyright (c) 2015 - Savoir-faire Linux
 *
 */

#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/watchdog.h>

static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC();

/* possible feed values */
#define TS4800_WDT_FEED_2S
#define TS4800_WDT_FEED_10S
#define TS4800_WDT_DISABLE

struct ts4800_wdt {};

/*
 * TS-4800 supports the following timeout values:
 *
 *   value desc
 *   ---------------------
 *     0    feed for 338ms
 *     1    feed for 2.706s
 *     2    feed for 10.824s
 *     3    disable watchdog
 *
 * Keep the regmap/timeout map ordered by timeout
 */
static const struct {} ts4800_wdt_map[] =;

#define MAX_TIMEOUT_INDEX

static void ts4800_write_feed(struct ts4800_wdt *wdt, u32 val)
{}

static int ts4800_wdt_start(struct watchdog_device *wdd)
{}

static int ts4800_wdt_stop(struct watchdog_device *wdd)
{}

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

static const struct watchdog_ops ts4800_wdt_ops =;

static const struct watchdog_info ts4800_wdt_info =;

static int ts4800_wdt_probe(struct platform_device *pdev)
{}

static const struct of_device_id ts4800_wdt_of_match[] =;
MODULE_DEVICE_TABLE(of, ts4800_wdt_of_match);

static struct platform_driver ts4800_wdt_driver =;

module_platform_driver();

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