Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
f71805f.c File Reference
#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/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/ioport.h>
#include <linux/acpi.h>
#include <linux/io.h>

Go to the source code of this file.

Data Structures

struct  f71805f_auto_point
 
struct  f71805f_data
 
struct  f71805f_sio_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRVNAME   "f71805f"
 
#define F71805F_LD_HWM   0x04
 
#define SIO_REG_LDSEL   0x07 /* Logical device select */
 
#define SIO_REG_DEVID   0x20 /* Device ID (2 bytes) */
 
#define SIO_REG_DEVREV   0x22 /* Device revision */
 
#define SIO_REG_MANID   0x23 /* Fintek ID (2 bytes) */
 
#define SIO_REG_FNSEL1   0x29 /* Multi Function Select 1 (F71872F) */
 
#define SIO_REG_ENABLE   0x30 /* Logical device enable */
 
#define SIO_REG_ADDR   0x60 /* Logical device address (2 bytes) */
 
#define SIO_FINTEK_ID   0x1934
 
#define SIO_F71805F_ID   0x0406
 
#define SIO_F71872F_ID   0x0341
 
#define REGION_LENGTH   8
 
#define ADDR_REG_OFFSET   5
 
#define DATA_REG_OFFSET   6
 
#define F71805F_REG_IN(nr)   (0x10 + (nr))
 
#define F71805F_REG_IN_HIGH(nr)   ((nr) < 10 ? 0x40 + 2 * (nr) : 0x2E)
 
#define F71805F_REG_IN_LOW(nr)   ((nr) < 10 ? 0x41 + 2 * (nr) : 0x2F)
 
#define F71805F_REG_FAN(nr)   (0x20 + 2 * (nr))
 
#define F71805F_REG_FAN_LOW(nr)   (0x28 + 2 * (nr))
 
#define F71805F_REG_FAN_TARGET(nr)   (0x69 + 16 * (nr))
 
#define F71805F_REG_FAN_CTRL(nr)   (0x60 + 16 * (nr))
 
#define F71805F_REG_PWM_FREQ(nr)   (0x63 + 16 * (nr))
 
#define F71805F_REG_PWM_DUTY(nr)   (0x6B + 16 * (nr))
 
#define F71805F_REG_TEMP(nr)   (0x1B + (nr))
 
#define F71805F_REG_TEMP_HIGH(nr)   (0x54 + 2 * (nr))
 
#define F71805F_REG_TEMP_HYST(nr)   (0x55 + 2 * (nr))
 
#define F71805F_REG_TEMP_MODE   0x01
 
#define F71805F_REG_PWM_AUTO_POINT_TEMP(pwmnr, apnr)   (0xA0 + 0x10 * (pwmnr) + (2 - (apnr)))
 
#define F71805F_REG_PWM_AUTO_POINT_FAN(pwmnr, apnr)
 
#define F71805F_REG_START   0x00
 
#define F71805F_REG_STATUS(nr)   (0x36 + (nr))
 
#define FAN_CTRL_DC_MODE   0x10
 
#define FAN_CTRL_LATCH_FULL   0x08
 
#define FAN_CTRL_MODE_MASK   0x03
 
#define FAN_CTRL_MODE_SPEED   0x00
 
#define FAN_CTRL_MODE_TEMPERATURE   0x01
 
#define FAN_CTRL_MODE_MANUAL   0x02
 

Enumerations

enum  kinds {
  f71805f, f71872f, w83627ehf, w83627dhg,
  w83627dhg_p, w83627uhg, w83667hg, w83667hg_b,
  nct6775, nct6776
}
 

Functions

 module_param (force_id, ushort, 0)
 
 MODULE_PARM_DESC (force_id,"Override the detected device ID")
 
 MODULE_AUTHOR ("Jean Delvare <khali@linux-fr>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("F71805F/F71872F hardware monitoring driver")
 
 module_init (f71805f_init)
 
 module_exit (f71805f_exit)
 

Macro Definition Documentation

#define ADDR_REG_OFFSET   5

Definition at line 117 of file f71805f.c.

#define DATA_REG_OFFSET   6

Definition at line 118 of file f71805f.c.

#define DRVNAME   "f71805f"

Definition at line 53 of file f71805f.c.

#define F71805F_LD_HWM   0x04

Definition at line 60 of file f71805f.c.

#define F71805F_REG_FAN (   nr)    (0x20 + 2 * (nr))

Definition at line 129 of file f71805f.c.

#define F71805F_REG_FAN_CTRL (   nr)    (0x60 + 16 * (nr))

Definition at line 132 of file f71805f.c.

#define F71805F_REG_FAN_LOW (   nr)    (0x28 + 2 * (nr))

Definition at line 130 of file f71805f.c.

#define F71805F_REG_FAN_TARGET (   nr)    (0x69 + 16 * (nr))

Definition at line 131 of file f71805f.c.

#define F71805F_REG_IN (   nr)    (0x10 + (nr))

Definition at line 125 of file f71805f.c.

#define F71805F_REG_IN_HIGH (   nr)    ((nr) < 10 ? 0x40 + 2 * (nr) : 0x2E)

Definition at line 126 of file f71805f.c.

#define F71805F_REG_IN_LOW (   nr)    ((nr) < 10 ? 0x41 + 2 * (nr) : 0x2F)

Definition at line 127 of file f71805f.c.

#define F71805F_REG_PWM_AUTO_POINT_FAN (   pwmnr,
  apnr 
)
Value:
(0xA4 + 0x10 * (pwmnr) + \
2 * (2 - (apnr)))

Definition at line 144 of file f71805f.c.

#define F71805F_REG_PWM_AUTO_POINT_TEMP (   pwmnr,
  apnr 
)    (0xA0 + 0x10 * (pwmnr) + (2 - (apnr)))

Definition at line 142 of file f71805f.c.

#define F71805F_REG_PWM_DUTY (   nr)    (0x6B + 16 * (nr))

Definition at line 134 of file f71805f.c.

#define F71805F_REG_PWM_FREQ (   nr)    (0x63 + 16 * (nr))

Definition at line 133 of file f71805f.c.

#define F71805F_REG_START   0x00

Definition at line 148 of file f71805f.c.

#define F71805F_REG_STATUS (   nr)    (0x36 + (nr))

Definition at line 150 of file f71805f.c.

#define F71805F_REG_TEMP (   nr)    (0x1B + (nr))

Definition at line 136 of file f71805f.c.

#define F71805F_REG_TEMP_HIGH (   nr)    (0x54 + 2 * (nr))

Definition at line 137 of file f71805f.c.

#define F71805F_REG_TEMP_HYST (   nr)    (0x55 + 2 * (nr))

Definition at line 138 of file f71805f.c.

#define F71805F_REG_TEMP_MODE   0x01

Definition at line 139 of file f71805f.c.

#define FAN_CTRL_DC_MODE   0x10

Definition at line 153 of file f71805f.c.

#define FAN_CTRL_LATCH_FULL   0x08

Definition at line 154 of file f71805f.c.

#define FAN_CTRL_MODE_MANUAL   0x02

Definition at line 158 of file f71805f.c.

#define FAN_CTRL_MODE_MASK   0x03

Definition at line 155 of file f71805f.c.

#define FAN_CTRL_MODE_SPEED   0x00

Definition at line 156 of file f71805f.c.

#define FAN_CTRL_MODE_TEMPERATURE   0x01

Definition at line 157 of file f71805f.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 31 of file f71805f.c.

#define REGION_LENGTH   8

Definition at line 116 of file f71805f.c.

#define SIO_F71805F_ID   0x0406

Definition at line 71 of file f71805f.c.

#define SIO_F71872F_ID   0x0341

Definition at line 72 of file f71805f.c.

#define SIO_FINTEK_ID   0x1934

Definition at line 70 of file f71805f.c.

#define SIO_REG_ADDR   0x60 /* Logical device address (2 bytes) */

Definition at line 68 of file f71805f.c.

#define SIO_REG_DEVID   0x20 /* Device ID (2 bytes) */

Definition at line 63 of file f71805f.c.

#define SIO_REG_DEVREV   0x22 /* Device revision */

Definition at line 64 of file f71805f.c.

#define SIO_REG_ENABLE   0x30 /* Logical device enable */

Definition at line 67 of file f71805f.c.

#define SIO_REG_FNSEL1   0x29 /* Multi Function Select 1 (F71872F) */

Definition at line 66 of file f71805f.c.

#define SIO_REG_LDSEL   0x07 /* Logical device select */

Definition at line 62 of file f71805f.c.

#define SIO_REG_MANID   0x23 /* Fintek ID (2 bytes) */

Definition at line 65 of file f71805f.c.

Enumeration Type Documentation

enum kinds
Enumerator:
f71805f 
f71872f 
w83627ehf 
w83627dhg 
w83627dhg_p 
w83627uhg 
w83667hg 
w83667hg_b 
nct6775 
nct6776 

Definition at line 54 of file f71805f.c.

Function Documentation

MODULE_AUTHOR ( "Jean Delvare <khali@linux-fr>"  )
MODULE_DESCRIPTION ( "F71805F/F71872F hardware monitoring driver )
module_exit ( f71805f_exit  )
module_init ( f71805f_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( force_id  ,
ushort  ,
 
)
MODULE_PARM_DESC ( force_id  ,
"Override the detected device ID  
)