Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/ioport.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include "lm75.h"
Go to the source code of this file.
Data Structures | |
struct | w83627hf_sio_data |
struct | w83627hf_data |
Macros | |
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
#define | DRVNAME "w83627hf" |
#define | DEV 0x07 /* Register: Logical device select */ |
#define | W83627HF_LD_FDC 0x00 |
#define | W83627HF_LD_PRT 0x01 |
#define | W83627HF_LD_UART1 0x02 |
#define | W83627HF_LD_UART2 0x03 |
#define | W83627HF_LD_KBC 0x05 |
#define | W83627HF_LD_CIR 0x06 /* w83627hf only */ |
#define | W83627HF_LD_GAME 0x07 |
#define | W83627HF_LD_MIDI 0x07 |
#define | W83627HF_LD_GPIO1 0x07 |
#define | W83627HF_LD_GPIO5 0x07 /* w83627thf only */ |
#define | W83627HF_LD_GPIO2 0x08 |
#define | W83627HF_LD_GPIO3 0x09 |
#define | W83627HF_LD_GPIO4 0x09 /* w83627thf only */ |
#define | W83627HF_LD_ACPI 0x0a |
#define | W83627HF_LD_HWM 0x0b |
#define | DEVID 0x20 /* Register: Device ID */ |
#define | W83627THF_GPIO5_EN 0x30 /* w83627thf only */ |
#define | W83627THF_GPIO5_IOSR 0xf3 /* w83627thf only */ |
#define | W83627THF_GPIO5_DR 0xf4 /* w83627thf only */ |
#define | W83687THF_VID_EN 0x29 /* w83687thf only */ |
#define | W83687THF_VID_CFG 0xF0 /* w83687thf only */ |
#define | W83687THF_VID_DATA 0xF1 /* w83687thf only */ |
#define | W627_DEVID 0x52 |
#define | W627THF_DEVID 0x82 |
#define | W697_DEVID 0x60 |
#define | W637_DEVID 0x70 |
#define | W687THF_DEVID 0x85 |
#define | WINB_ACT_REG 0x30 |
#define | WINB_BASE_REG 0x60 |
#define | WINB_ALIGNMENT ~7 |
#define | WINB_REGION_OFFSET 5 |
#define | WINB_REGION_SIZE 2 |
#define | W83781D_ADDR_REG_OFFSET 0 |
#define | W83781D_DATA_REG_OFFSET 1 |
#define | W83781D_REG_IN_MAX(nr) |
#define | W83781D_REG_IN_MIN(nr) |
#define | W83781D_REG_IN(nr) |
#define | W83627HF_REG_FAN_MIN(nr) (0x3b + (nr)) |
#define | W83627HF_REG_FAN(nr) (0x28 + (nr)) |
#define | W83627HF_REG_TEMP2_CONFIG 0x152 |
#define | W83627HF_REG_TEMP3_CONFIG 0x252 |
#define | W83781D_REG_BANK 0x4E |
#define | W83781D_REG_CONFIG 0x40 |
#define | W83781D_REG_ALARM1 0x459 |
#define | W83781D_REG_ALARM2 0x45A |
#define | W83781D_REG_ALARM3 0x45B |
#define | W83781D_REG_BEEP_CONFIG 0x4D |
#define | W83781D_REG_BEEP_INTS1 0x56 |
#define | W83781D_REG_BEEP_INTS2 0x57 |
#define | W83781D_REG_BEEP_INTS3 0x453 |
#define | W83781D_REG_VID_FANDIV 0x47 |
#define | W83781D_REG_CHIPID 0x49 |
#define | W83781D_REG_WCHIPID 0x58 |
#define | W83781D_REG_CHIPMAN 0x4F |
#define | W83781D_REG_PIN 0x4B |
#define | W83781D_REG_VBAT 0x5D |
#define | W83627HF_REG_PWM1 0x5A |
#define | W83627HF_REG_PWM2 0x5B |
#define | W83627THF_REG_PWM1 0x01 /* 697HF/637HF/687THF too */ |
#define | W83627THF_REG_PWM2 0x03 /* 697HF/637HF/687THF too */ |
#define | W83627THF_REG_PWM3 0x11 /* 637HF/687THF too */ |
#define | W83627THF_REG_VRM_OVT_CFG 0x18 /* 637HF/687THF too */ |
#define | W836X7HF_REG_PWM(type, nr) |
#define | W83627HF_REG_PWM_FREQ 0x5C /* Only for the 627HF */ |
#define | W83637HF_REG_PWM_FREQ1 0x00 /* 697HF/687THF too */ |
#define | W83637HF_REG_PWM_FREQ2 0x02 /* 697HF/687THF too */ |
#define | W83637HF_REG_PWM_FREQ3 0x10 /* 687THF too */ |
#define | W83627HF_BASE_PWM_FREQ 46870 |
#define | W83781D_REG_I2C_ADDR 0x48 |
#define | W83781D_REG_I2C_SUBADDR 0x4A |
#define | W83781D_REG_SCFG1 0x5D |
#define | W83781D_REG_SCFG2 0x59 |
#define | W83781D_DEFAULT_BETA 3435 |
#define | IN_TO_REG(val) (SENSORS_LIMIT((((val) + 8)/16),0,255)) |
#define | IN_FROM_REG(val) ((val) * 16) |
#define | TEMP_MIN (-128000) |
#define | TEMP_MAX ( 127000) |
#define | FAN_FROM_REG(val, div) ((val)==0?-1:(val)==255?0:1350000/((val)*(div))) |
#define | PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255)) |
#define | BEEP_MASK_FROM_REG(val) ((val) & 0xff7fff) |
#define | BEEP_MASK_TO_REG(val) ((val) & 0xff7fff) |
#define | DIV_FROM_REG(val) (1 << (val)) |
#define | sysfs_vin_decl(offset) |
#define | sysfs_fan_decl(offset) |
#define | sysfs_temp_decl(offset) |
#define | sysfs_temp_type(offset) |
#define | VIN_UNIT_ATTRS(_X_) |
#define | FAN_UNIT_ATTRS(_X_) |
#define | TEMP_UNIT_ATTRS(_X_) |
Functions | |
module_param (force_i2c, byte, 0) | |
MODULE_PARM_DESC (force_i2c,"Initialize the i2c address of the sensors") | |
module_param (init, bool, 0) | |
MODULE_PARM_DESC (init,"Set to zero to bypass chip initialization") | |
module_param (force_id, ushort, 0) | |
MODULE_PARM_DESC (force_id,"Override the detected device ID") | |
sysfs_vin_decl (1) | |
sysfs_vin_decl (2) | |
sysfs_vin_decl (3) | |
sysfs_vin_decl (4) | |
sysfs_vin_decl (5) | |
sysfs_vin_decl (6) | |
sysfs_vin_decl (7) | |
sysfs_vin_decl (8) | |
sysfs_fan_decl (1) | |
sysfs_fan_decl (2) | |
sysfs_fan_decl (3) | |
sysfs_temp_decl (1) | |
sysfs_temp_decl (2) | |
sysfs_temp_decl (3) | |
sysfs_temp_type (1) | |
sysfs_temp_type (2) | |
sysfs_temp_type (3) | |
MODULE_AUTHOR ("Frodo Looijaard <[email protected]>, ""Philip Edelbrock <[email protected]>, ""and Mark Studebaker <[email protected]>") | |
MODULE_DESCRIPTION ("W83627HF driver") | |
MODULE_LICENSE ("GPL") | |
module_init (sensors_w83627hf_init) | |
module_exit (sensors_w83627hf_exit) | |
Definition at line 337 of file w83627hf.c.
Definition at line 338 of file w83627hf.c.
#define DEV 0x07 /* Register: Logical device select */ |
Definition at line 83 of file w83627hf.c.
#define DEVID 0x20 /* Register: Device ID */ |
Definition at line 102 of file w83627hf.c.
Definition at line 340 of file w83627hf.c.
#define DRVNAME "w83627hf" |
Definition at line 61 of file w83627hf.c.
Definition at line 288 of file w83627hf.c.
#define FAN_UNIT_ATTRS | ( | _X_ | ) |
Definition at line 1274 of file w83627hf.c.
Definition at line 258 of file w83627hf.c.
Definition at line 257 of file w83627hf.c.
Definition at line 42 of file w83627hf.c.
Definition at line 290 of file w83627hf.c.
#define sysfs_fan_decl | ( | offset | ) |
Definition at line 628 of file w83627hf.c.
#define sysfs_temp_decl | ( | offset | ) |
Definition at line 717 of file w83627hf.c.
#define sysfs_temp_type | ( | offset | ) |
Definition at line 1186 of file w83627hf.c.
#define sysfs_vin_decl | ( | offset | ) |
Definition at line 472 of file w83627hf.c.
#define TEMP_MAX ( 127000) |
Definition at line 270 of file w83627hf.c.
#define TEMP_MIN (-128000) |
Definition at line 269 of file w83627hf.c.
#define TEMP_UNIT_ATTRS | ( | _X_ | ) |
Definition at line 1281 of file w83627hf.c.
#define VIN_UNIT_ATTRS | ( | _X_ | ) |
Definition at line 1267 of file w83627hf.c.
#define W627_DEVID 0x52 |
Definition at line 146 of file w83627hf.c.
#define W627THF_DEVID 0x82 |
Definition at line 147 of file w83627hf.c.
#define W637_DEVID 0x70 |
Definition at line 149 of file w83627hf.c.
#define W687THF_DEVID 0x85 |
Definition at line 150 of file w83627hf.c.
#define W697_DEVID 0x60 |
Definition at line 148 of file w83627hf.c.
#define W83627HF_BASE_PWM_FREQ 46870 |
Definition at line 239 of file w83627hf.c.
#define W83627HF_LD_ACPI 0x0a |
Definition at line 99 of file w83627hf.c.
#define W83627HF_LD_CIR 0x06 /* w83627hf only */ |
Definition at line 91 of file w83627hf.c.
#define W83627HF_LD_FDC 0x00 |
Definition at line 86 of file w83627hf.c.
#define W83627HF_LD_GAME 0x07 |
Definition at line 92 of file w83627hf.c.
#define W83627HF_LD_GPIO1 0x07 |
Definition at line 94 of file w83627hf.c.
#define W83627HF_LD_GPIO2 0x08 |
Definition at line 96 of file w83627hf.c.
#define W83627HF_LD_GPIO3 0x09 |
Definition at line 97 of file w83627hf.c.
#define W83627HF_LD_GPIO4 0x09 /* w83627thf only */ |
Definition at line 98 of file w83627hf.c.
#define W83627HF_LD_GPIO5 0x07 /* w83627thf only */ |
Definition at line 95 of file w83627hf.c.
#define W83627HF_LD_HWM 0x0b |
Definition at line 100 of file w83627hf.c.
#define W83627HF_LD_KBC 0x05 |
Definition at line 90 of file w83627hf.c.
#define W83627HF_LD_MIDI 0x07 |
Definition at line 93 of file w83627hf.c.
#define W83627HF_LD_PRT 0x01 |
Definition at line 87 of file w83627hf.c.
#define W83627HF_LD_UART1 0x02 |
Definition at line 88 of file w83627hf.c.
#define W83627HF_LD_UART2 0x03 |
Definition at line 89 of file w83627hf.c.
#define W83627HF_REG_FAN | ( | nr | ) | (0x28 + (nr)) |
Definition at line 177 of file w83627hf.c.
#define W83627HF_REG_FAN_MIN | ( | nr | ) | (0x3b + (nr)) |
Definition at line 176 of file w83627hf.c.
#define W83627HF_REG_PWM1 0x5A |
Definition at line 207 of file w83627hf.c.
#define W83627HF_REG_PWM2 0x5B |
Definition at line 208 of file w83627hf.c.
#define W83627HF_REG_PWM_FREQ 0x5C /* Only for the 627HF */ |
Definition at line 229 of file w83627hf.c.
#define W83627HF_REG_TEMP2_CONFIG 0x152 |
Definition at line 179 of file w83627hf.c.
#define W83627HF_REG_TEMP3_CONFIG 0x252 |
Definition at line 180 of file w83627hf.c.
#define W83627THF_GPIO5_DR 0xf4 /* w83627thf only */ |
Definition at line 106 of file w83627hf.c.
#define W83627THF_GPIO5_EN 0x30 /* w83627thf only */ |
Definition at line 104 of file w83627hf.c.
#define W83627THF_GPIO5_IOSR 0xf3 /* w83627thf only */ |
Definition at line 105 of file w83627hf.c.
#define W83627THF_REG_PWM1 0x01 /* 697HF/637HF/687THF too */ |
Definition at line 217 of file w83627hf.c.
#define W83627THF_REG_PWM2 0x03 /* 697HF/637HF/687THF too */ |
Definition at line 218 of file w83627hf.c.
#define W83627THF_REG_PWM3 0x11 /* 637HF/687THF too */ |
Definition at line 219 of file w83627hf.c.
#define W83627THF_REG_VRM_OVT_CFG 0x18 /* 637HF/687THF too */ |
Definition at line 221 of file w83627hf.c.
#define W83637HF_REG_PWM_FREQ1 0x00 /* 697HF/687THF too */ |
Definition at line 231 of file w83627hf.c.
#define W83637HF_REG_PWM_FREQ2 0x02 /* 697HF/687THF too */ |
Definition at line 232 of file w83627hf.c.
#define W83637HF_REG_PWM_FREQ3 0x10 /* 687THF too */ |
Definition at line 233 of file w83627hf.c.
#define W83687THF_VID_CFG 0xF0 /* w83687thf only */ |
Definition at line 109 of file w83627hf.c.
#define W83687THF_VID_DATA 0xF1 /* w83687thf only */ |
Definition at line 110 of file w83627hf.c.
#define W83687THF_VID_EN 0x29 /* w83687thf only */ |
Definition at line 108 of file w83627hf.c.
#define W83781D_ADDR_REG_OFFSET 0 |
Definition at line 163 of file w83627hf.c.
#define W83781D_DATA_REG_OFFSET 1 |
Definition at line 164 of file w83627hf.c.
#define W83781D_DEFAULT_BETA 3435 |
Definition at line 249 of file w83627hf.c.
#define W83781D_REG_ALARM1 0x459 |
Definition at line 189 of file w83627hf.c.
#define W83781D_REG_ALARM2 0x45A |
Definition at line 190 of file w83627hf.c.
#define W83781D_REG_ALARM3 0x45B |
Definition at line 191 of file w83627hf.c.
#define W83781D_REG_BANK 0x4E |
Definition at line 186 of file w83627hf.c.
#define W83781D_REG_BEEP_CONFIG 0x4D |
Definition at line 193 of file w83627hf.c.
#define W83781D_REG_BEEP_INTS1 0x56 |
Definition at line 194 of file w83627hf.c.
#define W83781D_REG_BEEP_INTS2 0x57 |
Definition at line 195 of file w83627hf.c.
#define W83781D_REG_BEEP_INTS3 0x453 |
Definition at line 196 of file w83627hf.c.
#define W83781D_REG_CHIPID 0x49 |
Definition at line 200 of file w83627hf.c.
#define W83781D_REG_CHIPMAN 0x4F |
Definition at line 202 of file w83627hf.c.
#define W83781D_REG_CONFIG 0x40 |
Definition at line 188 of file w83627hf.c.
#define W83781D_REG_I2C_ADDR 0x48 |
Definition at line 241 of file w83627hf.c.
#define W83781D_REG_I2C_SUBADDR 0x4A |
Definition at line 242 of file w83627hf.c.
#define W83781D_REG_IN | ( | nr | ) |
Definition at line 172 of file w83627hf.c.
#define W83781D_REG_IN_MAX | ( | nr | ) |
Definition at line 168 of file w83627hf.c.
#define W83781D_REG_IN_MIN | ( | nr | ) |
Definition at line 170 of file w83627hf.c.
#define W83781D_REG_PIN 0x4B |
Definition at line 203 of file w83627hf.c.
#define W83781D_REG_SCFG1 0x5D |
Definition at line 245 of file w83627hf.c.
#define W83781D_REG_SCFG2 0x59 |
Definition at line 247 of file w83627hf.c.
#define W83781D_REG_VBAT 0x5D |
Definition at line 205 of file w83627hf.c.
#define W83781D_REG_VID_FANDIV 0x47 |
Definition at line 198 of file w83627hf.c.
#define W83781D_REG_WCHIPID 0x58 |
Definition at line 201 of file w83627hf.c.
#define WINB_ACT_REG 0x30 |
Definition at line 151 of file w83627hf.c.
#define WINB_ALIGNMENT ~7 |
Definition at line 156 of file w83627hf.c.
#define WINB_BASE_REG 0x60 |
Definition at line 152 of file w83627hf.c.
#define WINB_REGION_OFFSET 5 |
Definition at line 159 of file w83627hf.c.
#define WINB_REGION_SIZE 2 |
Definition at line 160 of file w83627hf.c.
enum chips |
Definition at line 62 of file w83627hf.c.
MODULE_AUTHOR | ( | "Frodo Looijaard <[email protected]> | , |
""Philip Edelbrock< phil @netroedge.com > | , | ||
""and Mark Studebaker< mdsxyz123 @yahoo.com >" | |||
) |
MODULE_DESCRIPTION | ( | "W83627HF driver" | ) |
module_exit | ( | sensors_w83627hf_exit | ) |
module_init | ( | sensors_w83627hf_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | force_i2c | , |
byte | , | ||
0 | |||
) |
module_param | ( | force_id | , |
ushort | , | ||
0 | |||
) |
sysfs_fan_decl | ( | 1 | ) |
sysfs_fan_decl | ( | 2 | ) |
sysfs_fan_decl | ( | 3 | ) |
sysfs_temp_decl | ( | 1 | ) |
sysfs_temp_decl | ( | 2 | ) |
sysfs_temp_decl | ( | 3 | ) |
sysfs_temp_type | ( | 1 | ) |
sysfs_temp_type | ( | 2 | ) |
sysfs_temp_type | ( | 3 | ) |
sysfs_vin_decl | ( | 1 | ) |
sysfs_vin_decl | ( | 2 | ) |
sysfs_vin_decl | ( | 3 | ) |
sysfs_vin_decl | ( | 4 | ) |
sysfs_vin_decl | ( | 5 | ) |
sysfs_vin_decl | ( | 6 | ) |
sysfs_vin_decl | ( | 7 | ) |
sysfs_vin_decl | ( | 8 | ) |