Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lm95245.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.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>

Go to the source code of this file.

Data Structures

struct  lm95245_data
 

Macros

#define DEVNAME   "lm95245"
 
#define LM95245_REG_RW_CONFIG1   0x03
 
#define LM95245_REG_RW_CONVERS_RATE   0x04
 
#define LM95245_REG_W_ONE_SHOT   0x0F
 
#define LM95245_REG_RW_CONFIG2   0xBF
 
#define LM95245_REG_RW_REMOTE_OFFH   0x11
 
#define LM95245_REG_RW_REMOTE_OFFL   0x12
 
#define LM95245_REG_R_STATUS1   0x02
 
#define LM95245_REG_R_STATUS2   0x33
 
#define LM95245_REG_RW_REMOTE_OS_LIMIT   0x07
 
#define LM95245_REG_RW_LOCAL_OS_TCRIT_LIMIT   0x20
 
#define LM95245_REG_RW_REMOTE_TCRIT_LIMIT   0x19
 
#define LM95245_REG_RW_COMMON_HYSTERESIS   0x21
 
#define LM95245_REG_R_LOCAL_TEMPH_S   0x00
 
#define LM95245_REG_R_LOCAL_TEMPL_S   0x30
 
#define LM95245_REG_R_REMOTE_TEMPH_S   0x01
 
#define LM95245_REG_R_REMOTE_TEMPL_S   0x10
 
#define LM95245_REG_R_REMOTE_TEMPH_U   0x31
 
#define LM95245_REG_R_REMOTE_TEMPL_U   0x32
 
#define LM95245_REG_R_MAN_ID   0xFE
 
#define LM95245_REG_R_CHIP_ID   0xFF
 
#define CFG_STOP   0x40
 
#define CFG_REMOTE_TCRIT_MASK   0x10
 
#define CFG_REMOTE_OS_MASK   0x08
 
#define CFG_LOCAL_TCRIT_MASK   0x04
 
#define CFG_LOCAL_OS_MASK   0x02
 
#define CFG2_OS_A0   0x40
 
#define CFG2_DIODE_FAULT_OS   0x20
 
#define CFG2_DIODE_FAULT_TCRIT   0x10
 
#define CFG2_REMOTE_TT   0x08
 
#define CFG2_REMOTE_FILTER_DIS   0x00
 
#define CFG2_REMOTE_FILTER_EN   0x06
 
#define RATE_CR0063   0x00
 
#define RATE_CR0364   0x01
 
#define RATE_CR1000   0x02
 
#define RATE_CR2500   0x03
 
#define STATUS1_DIODE_FAULT   0x04
 
#define STATUS1_RTCRIT   0x02
 
#define STATUS1_LOC   0x01
 
#define MANUFACTURER_ID   0x01
 
#define DEFAULT_REVISION   0xB3
 

Functions

 MODULE_DEVICE_TABLE (i2c, lm95245_id)
 
 module_i2c_driver (lm95245_driver)
 
 MODULE_AUTHOR ("Alexander Stein <[email protected]>")
 
 MODULE_DESCRIPTION ("LM95245 sensor driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CFG2_DIODE_FAULT_OS   0x20

Definition at line 84 of file lm95245.c.

#define CFG2_DIODE_FAULT_TCRIT   0x10

Definition at line 85 of file lm95245.c.

#define CFG2_OS_A0   0x40

Definition at line 83 of file lm95245.c.

#define CFG2_REMOTE_FILTER_DIS   0x00

Definition at line 87 of file lm95245.c.

#define CFG2_REMOTE_FILTER_EN   0x06

Definition at line 88 of file lm95245.c.

#define CFG2_REMOTE_TT   0x08

Definition at line 86 of file lm95245.c.

#define CFG_LOCAL_OS_MASK   0x02

Definition at line 81 of file lm95245.c.

#define CFG_LOCAL_TCRIT_MASK   0x04

Definition at line 80 of file lm95245.c.

#define CFG_REMOTE_OS_MASK   0x08

Definition at line 79 of file lm95245.c.

#define CFG_REMOTE_TCRIT_MASK   0x10

Definition at line 78 of file lm95245.c.

#define CFG_STOP   0x40

Definition at line 77 of file lm95245.c.

#define DEFAULT_REVISION   0xB3

Definition at line 101 of file lm95245.c.

#define DEVNAME   "lm95245"

Definition at line 37 of file lm95245.c.

#define LM95245_REG_R_CHIP_ID   0xFF

Definition at line 74 of file lm95245.c.

#define LM95245_REG_R_LOCAL_TEMPH_S   0x00

Definition at line 64 of file lm95245.c.

#define LM95245_REG_R_LOCAL_TEMPL_S   0x30

Definition at line 65 of file lm95245.c.

#define LM95245_REG_R_MAN_ID   0xFE

Definition at line 73 of file lm95245.c.

#define LM95245_REG_R_REMOTE_TEMPH_S   0x01

Definition at line 66 of file lm95245.c.

#define LM95245_REG_R_REMOTE_TEMPH_U   0x31

Definition at line 69 of file lm95245.c.

#define LM95245_REG_R_REMOTE_TEMPL_S   0x10

Definition at line 67 of file lm95245.c.

#define LM95245_REG_R_REMOTE_TEMPL_U   0x32

Definition at line 70 of file lm95245.c.

#define LM95245_REG_R_STATUS1   0x02

Definition at line 54 of file lm95245.c.

#define LM95245_REG_R_STATUS2   0x33

Definition at line 55 of file lm95245.c.

#define LM95245_REG_RW_COMMON_HYSTERESIS   0x21

Definition at line 61 of file lm95245.c.

#define LM95245_REG_RW_CONFIG1   0x03

Definition at line 44 of file lm95245.c.

#define LM95245_REG_RW_CONFIG2   0xBF

Definition at line 49 of file lm95245.c.

#define LM95245_REG_RW_CONVERS_RATE   0x04

Definition at line 45 of file lm95245.c.

#define LM95245_REG_RW_LOCAL_OS_TCRIT_LIMIT   0x20

Definition at line 59 of file lm95245.c.

#define LM95245_REG_RW_REMOTE_OFFH   0x11

Definition at line 50 of file lm95245.c.

#define LM95245_REG_RW_REMOTE_OFFL   0x12

Definition at line 51 of file lm95245.c.

#define LM95245_REG_RW_REMOTE_OS_LIMIT   0x07

Definition at line 58 of file lm95245.c.

#define LM95245_REG_RW_REMOTE_TCRIT_LIMIT   0x19

Definition at line 60 of file lm95245.c.

#define LM95245_REG_W_ONE_SHOT   0x0F

Definition at line 46 of file lm95245.c.

#define MANUFACTURER_ID   0x01

Definition at line 100 of file lm95245.c.

#define RATE_CR0063   0x00

Definition at line 91 of file lm95245.c.

#define RATE_CR0364   0x01

Definition at line 92 of file lm95245.c.

#define RATE_CR1000   0x02

Definition at line 93 of file lm95245.c.

#define RATE_CR2500   0x03

Definition at line 94 of file lm95245.c.

#define STATUS1_DIODE_FAULT   0x04

Definition at line 96 of file lm95245.c.

#define STATUS1_LOC   0x01

Definition at line 98 of file lm95245.c.

#define STATUS1_RTCRIT   0x02

Definition at line 97 of file lm95245.c.

Function Documentation

MODULE_AUTHOR ( "Alexander Stein <[email protected]>"  )
MODULE_DESCRIPTION ( "LM95245 sensor driver )
MODULE_DEVICE_TABLE ( i2c  ,
lm95245_id   
)
module_i2c_driver ( lm95245_driver  )
MODULE_LICENSE ( "GPL"  )