Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
it8712f_wdt.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/fs.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/ioport.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DEBUG
 
#define NAME   "it8712f_wdt"
 
#define REG   0x2e /* The register to read/write */
 
#define VAL   0x2f /* The value to read/write */
 
#define LDN   0x07 /* Register: Logical device select */
 
#define DEVID   0x20 /* Register: Device ID */
 
#define DEVREV   0x22 /* Register: Device Revision */
 
#define ACT_REG   0x30 /* LDN Register: Activation */
 
#define BASE_REG   0x60 /* LDN Register: Base address */
 
#define IT8712F_DEVID   0x8712
 
#define LDN_GPIO   0x07 /* GPIO and Watch Dog Timer */
 
#define LDN_GAME   0x09 /* Game Port */
 
#define WDT_CONTROL   0x71 /* WDT Register: Control */
 
#define WDT_CONFIG   0x72 /* WDT Register: Configuration */
 
#define WDT_TIMEOUT   0x73 /* WDT Register: Timeout Value */
 
#define WDT_RESET_GAME   0x10 /* Reset timer on read or write to game port */
 
#define WDT_RESET_KBD   0x20 /* Reset timer on keyboard interrupt */
 
#define WDT_RESET_MOUSE   0x40 /* Reset timer on mouse interrupt */
 
#define WDT_RESET_CIR   0x80 /* Reset timer on consumer IR interrupt */
 
#define WDT_UNIT_SEC   0x80 /* If 0 in MINUTES */
 
#define WDT_OUT_PWROK   0x10 /* Pulse PWROK on timeout */
 
#define WDT_OUT_KRST   0x40 /* Pulse reset on timeout */
 

Functions

 MODULE_AUTHOR ("Jorge Boncompte - DTI2 <[email protected]>")
 
 MODULE_DESCRIPTION ("IT8712F Watchdog Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 
 module_param (margin, int, 0)
 
 MODULE_PARM_DESC (margin,"Watchdog margin in seconds")
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Disable watchdog shutdown on close")
 
 module_param (wdt_control_reg, int, 0)
 
 MODULE_PARM_DESC (wdt_control_reg,"Value to write to watchdog control ""register. The default WDT_RESET_GAME resets the timer on ""game port reads that this driver generates. You can also ""use KBD, MOUSE or CIR if you have some external way to ""generate those interrupts.")
 
 module_init (it8712f_wdt_init)
 
 module_exit (it8712f_wdt_exit)
 

Macro Definition Documentation

#define ACT_REG   0x30 /* LDN Register: Activation */

Definition at line 68 of file it8712f_wdt.c.

#define BASE_REG   0x60 /* LDN Register: Base address */

Definition at line 69 of file it8712f_wdt.c.

#define DEBUG

Definition at line 38 of file it8712f_wdt.c.

#define DEVID   0x20 /* Register: Device ID */

Definition at line 66 of file it8712f_wdt.c.

#define DEVREV   0x22 /* Register: Device Revision */

Definition at line 67 of file it8712f_wdt.c.

#define IT8712F_DEVID   0x8712

Definition at line 71 of file it8712f_wdt.c.

#define LDN   0x07 /* Register: Logical device select */

Definition at line 65 of file it8712f_wdt.c.

#define LDN_GAME   0x09 /* Game Port */

Definition at line 74 of file it8712f_wdt.c.

#define LDN_GPIO   0x07 /* GPIO and Watch Dog Timer */

Definition at line 73 of file it8712f_wdt.c.

#define NAME   "it8712f_wdt"

Definition at line 39 of file it8712f_wdt.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 23 of file it8712f_wdt.c.

#define REG   0x2e /* The register to read/write */

Definition at line 62 of file it8712f_wdt.c.

#define VAL   0x2f /* The value to read/write */

Definition at line 63 of file it8712f_wdt.c.

#define WDT_CONFIG   0x72 /* WDT Register: Configuration */

Definition at line 77 of file it8712f_wdt.c.

#define WDT_CONTROL   0x71 /* WDT Register: Control */

Definition at line 76 of file it8712f_wdt.c.

#define WDT_OUT_KRST   0x40 /* Pulse reset on timeout */

Definition at line 88 of file it8712f_wdt.c.

#define WDT_OUT_PWROK   0x10 /* Pulse PWROK on timeout */

Definition at line 87 of file it8712f_wdt.c.

#define WDT_RESET_CIR   0x80 /* Reset timer on consumer IR interrupt */

Definition at line 83 of file it8712f_wdt.c.

#define WDT_RESET_GAME   0x10 /* Reset timer on read or write to game port */

Definition at line 80 of file it8712f_wdt.c.

#define WDT_RESET_KBD   0x20 /* Reset timer on keyboard interrupt */

Definition at line 81 of file it8712f_wdt.c.

#define WDT_RESET_MOUSE   0x40 /* Reset timer on mouse interrupt */

Definition at line 82 of file it8712f_wdt.c.

#define WDT_TIMEOUT   0x73 /* WDT Register: Timeout Value */

Definition at line 78 of file it8712f_wdt.c.

#define WDT_UNIT_SEC   0x80 /* If 0 in MINUTES */

Definition at line 85 of file it8712f_wdt.c.

Function Documentation

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Jorge Boncompte - DTI2 <[email protected]>"  )
MODULE_DESCRIPTION ( "IT8712F Watchdog Driver"  )
module_exit ( it8712f_wdt_exit  )
module_init ( it8712f_wdt_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( margin  ,
int  ,
 
)
module_param ( nowayout  ,
bool  ,
 
)
module_param ( wdt_control_reg  ,
int  ,
 
)
MODULE_PARM_DESC ( margin  ,
"Watchdog margin in seconds  
)
MODULE_PARM_DESC ( nowayout  ,
"Disable watchdog shutdown on close"   
)
MODULE_PARM_DESC ( wdt_control_reg  ,
"Value to write to watchdog control ""register. The default WDT_RESET_GAME resets the timer on ""game port reads that this driver generates. You can also ""use  KBD,
MOUSE or CIR if you have some external way to""generate those interrupts."   
)