linux/drivers/watchdog/wafer5823wdt.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *	ICP Wafer 5823 Single Board Computer WDT driver
 *	http://www.icpamerica.com/wafer_5823.php
 *	May also work on other similar models
 *
 *	(c) Copyright 2002 Justin Cormack <[email protected]>
 *
 *	Release 0.02
 *
 *	Based on advantechwdt.c which is based on wdt.c.
 *	Original copyright messages:
 *
 *	(c) Copyright 1996-1997 Alan Cox <[email protected]>,
 *						All Rights Reserved.
 *
 *	Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
 *	warranty for any of this software. This material is provided
 *	"AS-IS" and at no charge.
 *
 *	(c) Copyright 1995    Alan Cox <[email protected]>
 *
 */

#define pr_fmt(fmt)

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

#define WATCHDOG_NAME
#define PFX
#define WD_TIMO

static unsigned long wafwdt_is_open;
static char expect_close;
static DEFINE_SPINLOCK(wafwdt_lock);

/*
 *	You must set these - there is no sane way to probe for this board.
 *
 *	To enable, write the timeout value in seconds (1 to 255) to I/O
 *	port WDT_START, then read the port to start the watchdog. To pat
 *	the dog, read port WDT_STOP to stop the timer, then read WDT_START
 *	to restart it again.
 */

static int wdt_stop =;
static int wdt_start =;

static int timeout =;  /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC();

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

static void wafwdt_ping(void)
{}

static void wafwdt_start(void)
{}

static void wafwdt_stop(void)
{}

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

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

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

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

/*
 *	Notifier for system down
 */

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

/*
 *	Kernel Interfaces
 */

static const struct file_operations wafwdt_fops =;

static struct miscdevice wafwdt_miscdev =;

/*
 *	The WDT needs to learn about soft shutdowns in order to
 *	turn the timebomb registers off.
 */

static struct notifier_block wafwdt_notifier =;

static int __init wafwdt_init(void)
{}

static void __exit wafwdt_exit(void)
{}

module_init();
module_exit(wafwdt_exit);

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

/* end of wafer5823wdt.c */