#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-vid.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/fs.h>
#include <linux/watchdog.h>
#include <linux/miscdevice.h>
#include <linux/uaccess.h>
#include <linux/kref.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/jiffies.h>
Go to the source code of this file.
|
| module_param_array (force_subclients, short, NULL, 0) |
|
| MODULE_PARM_DESC (force_subclients,"List of subclient addresses: ""{bus, clientaddr, subclientaddr1, subclientaddr2}") |
|
| module_param (reset, bool, 0) |
|
| MODULE_PARM_DESC (reset,"Set to 1 to reset chip, not recommended") |
|
| module_param (timeout, int, 0) |
|
| MODULE_PARM_DESC (timeout,"Watchdog timeout in minutes. 2<= timeout <=255 (default="__MODULE_STRING(WATCHDOG_TIMEOUT)")") |
|
| module_param (nowayout, bool, 0) |
|
| MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")") |
|
| MODULE_DEVICE_TABLE (i2c, w83793_id) |
|
| module_i2c_driver (w83793_driver) |
|
| MODULE_AUTHOR ("Yuan Mu, Sven Anders") |
|
| MODULE_DESCRIPTION ("w83793 driver") |
|
| MODULE_LICENSE ("GPL") |
|
#define SENSOR_ATTR_FAN |
( |
|
index | ) |
|
#define SENSOR_ATTR_IN |
( |
|
index | ) |
|
#define SENSOR_ATTR_PWM |
( |
|
index | ) |
|
#define SENSOR_ATTR_TEMP |
( |
|
index | ) |
|
#define SETUP_PWM_DEFAULT 0 |
#define SETUP_PWM_DOWNTIME 2 /* Unit in 0.1s */ |
#define SETUP_PWM_UPTIME 1 /* Unit in 0.1s */ |
#define SETUP_TEMP_CRITICAL 3 |
#define TEMP_PWM_ENABLE 1 |
#define W83793_REG_ALARM |
( |
|
index | ) |
(0x4b + (index)) |
#define W83793_REG_BANKSEL 0x00 |
#define W83793_REG_BEEP |
( |
|
index | ) |
(0x53 + (index)) |
#define W83793_REG_CHIPID 0x0e |
#define W83793_REG_CLR_CHASSIS 0x4a /* SMI MASK4 */ |
#define W83793_REG_CONFIG 0x40 |
#define W83793_REG_DEVICEID 0x0f |
#define W83793_REG_FAN |
( |
|
index | ) |
(0x23 + 2 * (index)) /* High byte */ |
#define W83793_REG_FAN_MIN |
( |
|
index | ) |
(0x90 + 2 * (index)) /* High byte */ |
#define W83793_REG_FANIN_CTRL 0x5c |
#define W83793_REG_FANIN_SEL 0x5d |
#define W83793_REG_I2C_ADDR 0x0b |
#define W83793_REG_I2C_SUBADDR 0x0c |
#define W83793_REG_IRQ_CTRL 0x50 |
#define W83793_REG_MFC 0x58 |
#define W83793_REG_OVT_BEEP 0x52 |
#define W83793_REG_OVT_CTRL 0x51 |
#define W83793_REG_PWM |
( |
|
index, |
|
|
|
nr |
|
) |
| |
#define W83793_REG_PWM_DEFAULT 0xb2 |
#define W83793_REG_PWM_DOWNTIME 0xc4 /* Unit in 0.1 second */ |
#define W83793_REG_PWM_ENABLE 0x207 |
#define W83793_REG_PWM_STOP_TIME |
( |
|
index | ) |
(0x228 + (index)) |
#define W83793_REG_PWM_UPTIME 0xc3 /* Unit in 0.1 second */ |
#define W83793_REG_SF2_PWM |
( |
|
index, |
|
|
|
nr |
|
) |
| (0x238 + ((index) << 4) + (nr)) |
#define W83793_REG_SF2_TEMP |
( |
|
index, |
|
|
|
nr |
|
) |
| (0x230 + ((index) << 4) + (nr)) |
#define W83793_REG_TEMP_CRITICAL 0xc5 |
#define W83793_REG_TEMP_CRUISE |
( |
|
index | ) |
(0x210 + (index)) |
#define W83793_REG_TEMP_FAN_MAP |
( |
|
index | ) |
(0x201 + (index)) |
#define W83793_REG_TEMP_LOW_BITS 0x22 |
#define W83793_REG_TEMP_TOL |
( |
|
index | ) |
(0x208 + (index)) |
#define W83793_REG_VENDORID 0x0d |
#define W83793_REG_VID_CTRL 0x59 |
#define W83793_REG_VID_INA 0x05 |
#define W83793_REG_VID_INB 0x06 |
#define W83793_REG_VID_LATCHA 0x07 |
#define W83793_REG_VID_LATCHB 0x08 |
#define W83793_REG_WDT_ENABLE 0x02 |
#define W83793_REG_WDT_LOCK 0x01 |
#define W83793_REG_WDT_STATUS 0x03 |
#define W83793_REG_WDT_TIMEOUT 0x04 |
MODULE_AUTHOR |
( |
"Yuan |
Mu, |
|
|
Sven Anders" |
|
|
) |
| |
MODULE_DESCRIPTION |
( |
"w83793 driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
w83793_id |
|
|
) |
| |
module_i2c_driver |
( |
w83793_driver |
| ) |
|
module_param |
( |
nowayout |
, |
|
|
bool |
, |
|
|
0 |
|
|
) |
| |
module_param_array |
( |
force_subclients |
, |
|
|
short |
, |
|
|
NULL |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
force_subclients |
, |
|
|
"List of subclient addresses: ""{bus, clientaddr, subclientaddr1, subclientaddr2}" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
reset |
, |
|
|
"Set to 1 to reset |
chip, |
|
|
not recommended" |
|
|
) |
| |