linux/drivers/watchdog/w83977f_wdt.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	W83977F Watchdog Timer Driver for Winbond W83977F I/O Chip
 *
 *	(c) Copyright 2005  Jose Goncalves <[email protected]>
 *
 *      Based on w83877f_wdt.c by Scott Jennings,
 *           and wdt977.c by Woody Suwalski
 *
 *			-----------------------
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/uaccess.h>
#include <linux/io.h>


#define WATCHDOG_VERSION
#define WATCHDOG_NAME

#define IO_INDEX_PORT
#define IO_DATA_PORT

#define UNLOCK_DATA
#define LOCK_DATA
#define DEVICE_REGISTER

#define DEFAULT_TIMEOUT

static	int timeout =;
static	int timeoutW;			/* timeout in watchdog counter units */
static	unsigned long timer_alive;
static	int testmode;
static	char expect_close;
static	DEFINE_SPINLOCK(spinlock);

module_param(timeout, int, 0);
MODULE_PARM_DESC();
module_param(testmode, int, 0);
MODULE_PARM_DESC();

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

/*
 * Start the watchdog
 */

static int wdt_start(void)
{}

/*
 * Stop the watchdog
 */

static int wdt_stop(void)
{}

/*
 * Send a keepalive ping to the watchdog
 * This is done by simply re-writing the timeout to reg. 0xF2
 */

static int wdt_keepalive(void)
{}

/*
 * Set the watchdog timeout value
 */

static int wdt_set_timeout(int t)
{}

/*
 * Get the watchdog status
 */

static int wdt_get_status(int *status)
{}


/*
 *	/dev/watchdog handling
 */

static int wdt_open(struct inode *inode, struct file *file)
{}

static int wdt_release(struct inode *inode, struct file *file)
{}

/*
 *      wdt_write:
 *      @file: file handle to the watchdog
 *      @buf: buffer to write (unused as data does not matter here
 *      @count: count of bytes
 *      @ppos: pointer to the position to write. No seeks allowed
 *
 *      A write to a watchdog device is defined as a keepalive signal. Any
 *      write of data will do, as we don't define content meaning.
 */

static ssize_t wdt_write(struct file *file, const char __user *buf,
			    size_t count, loff_t *ppos)
{}

/*
 *      wdt_ioctl:
 *      @inode: inode of the device
 *      @file: file handle to the device
 *      @cmd: watchdog command
 *      @arg: argument pointer
 *
 *      The watchdog API defines a common set of functions for all watchdogs
 *      according to their available features.
 */

static const struct watchdog_info ident =;

static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{}

static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
	void *unused)
{}

static const struct file_operations wdt_fops =;

static struct miscdevice wdt_miscdev =;

static struct notifier_block wdt_notifier =;

static int __init w83977f_wdt_init(void)
{}

static void __exit w83977f_wdt_exit(void)
{}

module_init();
module_exit(w83977f_wdt_exit);

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