Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
adm1029.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon-sysfs.h>
#include <linux/hwmon.h>
#include <linux/err.h>
#include <linux/mutex.h>

Go to the source code of this file.

Data Structures

struct  adm1029_data
 

Macros

#define ADM1029_REG_MAN_ID   0x0D
 
#define ADM1029_REG_CHIP_ID   0x0E
 
#define ADM1029_REG_CONFIG   0x01
 
#define ADM1029_REG_NB_FAN_SUPPORT   0x02
 
#define ADM1029_REG_TEMP_DEVICES_INSTALLED   0x06
 
#define ADM1029_REG_LOCAL_TEMP   0xA0
 
#define ADM1029_REG_REMOTE1_TEMP   0xA1
 
#define ADM1029_REG_REMOTE2_TEMP   0xA2
 
#define ADM1029_REG_LOCAL_TEMP_HIGH   0x90
 
#define ADM1029_REG_REMOTE1_TEMP_HIGH   0x91
 
#define ADM1029_REG_REMOTE2_TEMP_HIGH   0x92
 
#define ADM1029_REG_LOCAL_TEMP_LOW   0x98
 
#define ADM1029_REG_REMOTE1_TEMP_LOW   0x99
 
#define ADM1029_REG_REMOTE2_TEMP_LOW   0x9A
 
#define ADM1029_REG_FAN1   0x70
 
#define ADM1029_REG_FAN2   0x71
 
#define ADM1029_REG_FAN1_MIN   0x78
 
#define ADM1029_REG_FAN2_MIN   0x79
 
#define ADM1029_REG_FAN1_CONFIG   0x68
 
#define ADM1029_REG_FAN2_CONFIG   0x69
 
#define TEMP_FROM_REG(val)   ((val) * 1000)
 
#define DIV_FROM_REG(val)   (1 << (((val) >> 6) - 1))
 

Functions

 MODULE_DEVICE_TABLE (i2c, adm1029_id)
 
 module_i2c_driver (adm1029_driver)
 
 MODULE_AUTHOR ("Corentin LABBE <[email protected]>")
 
 MODULE_DESCRIPTION ("adm1029 driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define ADM1029_REG_CHIP_ID   0x0E

Definition at line 52 of file adm1029.c.

#define ADM1029_REG_CONFIG   0x01

Definition at line 53 of file adm1029.c.

#define ADM1029_REG_FAN1   0x70

Definition at line 70 of file adm1029.c.

#define ADM1029_REG_FAN1_CONFIG   0x68

Definition at line 76 of file adm1029.c.

#define ADM1029_REG_FAN1_MIN   0x78

Definition at line 73 of file adm1029.c.

#define ADM1029_REG_FAN2   0x71

Definition at line 71 of file adm1029.c.

#define ADM1029_REG_FAN2_CONFIG   0x69

Definition at line 77 of file adm1029.c.

#define ADM1029_REG_FAN2_MIN   0x79

Definition at line 74 of file adm1029.c.

#define ADM1029_REG_LOCAL_TEMP   0xA0

Definition at line 58 of file adm1029.c.

#define ADM1029_REG_LOCAL_TEMP_HIGH   0x90

Definition at line 62 of file adm1029.c.

#define ADM1029_REG_LOCAL_TEMP_LOW   0x98

Definition at line 66 of file adm1029.c.

#define ADM1029_REG_MAN_ID   0x0D

Definition at line 51 of file adm1029.c.

#define ADM1029_REG_NB_FAN_SUPPORT   0x02

Definition at line 54 of file adm1029.c.

#define ADM1029_REG_REMOTE1_TEMP   0xA1

Definition at line 59 of file adm1029.c.

#define ADM1029_REG_REMOTE1_TEMP_HIGH   0x91

Definition at line 63 of file adm1029.c.

#define ADM1029_REG_REMOTE1_TEMP_LOW   0x99

Definition at line 67 of file adm1029.c.

#define ADM1029_REG_REMOTE2_TEMP   0xA2

Definition at line 60 of file adm1029.c.

#define ADM1029_REG_REMOTE2_TEMP_HIGH   0x92

Definition at line 64 of file adm1029.c.

#define ADM1029_REG_REMOTE2_TEMP_LOW   0x9A

Definition at line 68 of file adm1029.c.

#define ADM1029_REG_TEMP_DEVICES_INSTALLED   0x06

Definition at line 56 of file adm1029.c.

#define DIV_FROM_REG (   val)    (1 << (((val) >> 6) - 1))

Definition at line 81 of file adm1029.c.

#define TEMP_FROM_REG (   val)    ((val) * 1000)

Definition at line 79 of file adm1029.c.

Function Documentation

MODULE_AUTHOR ( "Corentin LABBE <[email protected]>"  )
MODULE_DESCRIPTION ( "adm1029 driver )
MODULE_DEVICE_TABLE ( i2c  ,
adm1029_id   
)
module_i2c_driver ( adm1029_driver  )
MODULE_LICENSE ( "GPL v2 )