Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lm95241.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  lm95241_data
 

Macros

#define DEVNAME   "lm95241"
 
#define LM95241_REG_R_MAN_ID   0xFE
 
#define LM95241_REG_R_CHIP_ID   0xFF
 
#define LM95241_REG_R_STATUS   0x02
 
#define LM95241_REG_RW_CONFIG   0x03
 
#define LM95241_REG_RW_REM_FILTER   0x06
 
#define LM95241_REG_RW_TRUTHERM   0x07
 
#define LM95241_REG_W_ONE_SHOT   0x0F
 
#define LM95241_REG_R_LOCAL_TEMPH   0x10
 
#define LM95241_REG_R_REMOTE1_TEMPH   0x11
 
#define LM95241_REG_R_REMOTE2_TEMPH   0x12
 
#define LM95241_REG_R_LOCAL_TEMPL   0x20
 
#define LM95241_REG_R_REMOTE1_TEMPL   0x21
 
#define LM95241_REG_R_REMOTE2_TEMPL   0x22
 
#define LM95241_REG_RW_REMOTE_MODEL   0x30
 
#define CFG_STOP   0x40
 
#define CFG_CR0076   0x00
 
#define CFG_CR0182   0x10
 
#define CFG_CR1000   0x20
 
#define CFG_CR2700   0x30
 
#define R1MS_SHIFT   0
 
#define R2MS_SHIFT   2
 
#define R1MS_MASK   (0x01 << (R1MS_SHIFT))
 
#define R2MS_MASK   (0x01 << (R2MS_SHIFT))
 
#define R1DF_SHIFT   1
 
#define R2DF_SHIFT   2
 
#define R1DF_MASK   (0x01 << (R1DF_SHIFT))
 
#define R2DF_MASK   (0x01 << (R2DF_SHIFT))
 
#define R1FE_MASK   0x01
 
#define R2FE_MASK   0x05
 
#define TT1_SHIFT   0
 
#define TT2_SHIFT   4
 
#define TT_OFF   0
 
#define TT_ON   1
 
#define TT_MASK   7
 
#define NATSEMI_MAN_ID   0x01
 
#define LM95231_CHIP_ID   0xA1
 
#define LM95241_CHIP_ID   0xA4
 

Functions

 MODULE_DEVICE_TABLE (i2c, lm95241_id)
 
 module_i2c_driver (lm95241_driver)
 
 MODULE_AUTHOR ("Davide Rizzo <[email protected]>")
 
 MODULE_DESCRIPTION ("LM95241 sensor driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CFG_CR0076   0x00

Definition at line 58 of file lm95241.c.

#define CFG_CR0182   0x10

Definition at line 59 of file lm95241.c.

#define CFG_CR1000   0x20

Definition at line 60 of file lm95241.c.

#define CFG_CR2700   0x30

Definition at line 61 of file lm95241.c.

#define CFG_STOP   0x40

Definition at line 57 of file lm95241.c.

#define DEVNAME   "lm95241"

Definition at line 35 of file lm95241.c.

#define LM95231_CHIP_ID   0xA1

Definition at line 78 of file lm95241.c.

#define LM95241_CHIP_ID   0xA4

Definition at line 79 of file lm95241.c.

#define LM95241_REG_R_CHIP_ID   0xFF

Definition at line 42 of file lm95241.c.

#define LM95241_REG_R_LOCAL_TEMPH   0x10

Definition at line 48 of file lm95241.c.

#define LM95241_REG_R_LOCAL_TEMPL   0x20

Definition at line 51 of file lm95241.c.

#define LM95241_REG_R_MAN_ID   0xFE

Definition at line 41 of file lm95241.c.

#define LM95241_REG_R_REMOTE1_TEMPH   0x11

Definition at line 49 of file lm95241.c.

#define LM95241_REG_R_REMOTE1_TEMPL   0x21

Definition at line 52 of file lm95241.c.

#define LM95241_REG_R_REMOTE2_TEMPH   0x12

Definition at line 50 of file lm95241.c.

#define LM95241_REG_R_REMOTE2_TEMPL   0x22

Definition at line 53 of file lm95241.c.

#define LM95241_REG_R_STATUS   0x02

Definition at line 43 of file lm95241.c.

#define LM95241_REG_RW_CONFIG   0x03

Definition at line 44 of file lm95241.c.

#define LM95241_REG_RW_REM_FILTER   0x06

Definition at line 45 of file lm95241.c.

#define LM95241_REG_RW_REMOTE_MODEL   0x30

Definition at line 54 of file lm95241.c.

#define LM95241_REG_RW_TRUTHERM   0x07

Definition at line 46 of file lm95241.c.

#define LM95241_REG_W_ONE_SHOT   0x0F

Definition at line 47 of file lm95241.c.

#define NATSEMI_MAN_ID   0x01

Definition at line 77 of file lm95241.c.

#define R1DF_MASK   (0x01 << (R1DF_SHIFT))

Definition at line 68 of file lm95241.c.

#define R1DF_SHIFT   1

Definition at line 66 of file lm95241.c.

#define R1FE_MASK   0x01

Definition at line 70 of file lm95241.c.

#define R1MS_MASK   (0x01 << (R1MS_SHIFT))

Definition at line 64 of file lm95241.c.

#define R1MS_SHIFT   0

Definition at line 62 of file lm95241.c.

#define R2DF_MASK   (0x01 << (R2DF_SHIFT))

Definition at line 69 of file lm95241.c.

#define R2DF_SHIFT   2

Definition at line 67 of file lm95241.c.

#define R2FE_MASK   0x05

Definition at line 71 of file lm95241.c.

#define R2MS_MASK   (0x01 << (R2MS_SHIFT))

Definition at line 65 of file lm95241.c.

#define R2MS_SHIFT   2

Definition at line 63 of file lm95241.c.

#define TT1_SHIFT   0

Definition at line 72 of file lm95241.c.

#define TT2_SHIFT   4

Definition at line 73 of file lm95241.c.

#define TT_MASK   7

Definition at line 76 of file lm95241.c.

#define TT_OFF   0

Definition at line 74 of file lm95241.c.

#define TT_ON   1

Definition at line 75 of file lm95241.c.

Function Documentation

MODULE_AUTHOR ( "Davide Rizzo <[email protected]>"  )
MODULE_DESCRIPTION ( "LM95241 sensor driver )
MODULE_DEVICE_TABLE ( i2c  ,
lm95241_id   
)
module_i2c_driver ( lm95241_driver  )
MODULE_LICENSE ( "GPL"  )