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

Go to the source code of this file.

Data Structures

struct  tmp102
 

Macros

#define DRIVER_NAME   "tmp102"
 
#define TMP102_TEMP_REG   0x00
 
#define TMP102_CONF_REG   0x01
 
#define TMP102_CONF_SD   0x0100
 
#define TMP102_CONF_TM   0x0200
 
#define TMP102_CONF_POL   0x0400
 
#define TMP102_CONF_F0   0x0800
 
#define TMP102_CONF_F1   0x1000
 
#define TMP102_CONF_R0   0x2000
 
#define TMP102_CONF_R1   0x4000
 
#define TMP102_CONF_OS   0x8000
 
#define TMP102_CONF_EM   0x0010
 
#define TMP102_CONF_AL   0x0020
 
#define TMP102_CONF_CR0   0x0040
 
#define TMP102_CONF_CR1   0x0080
 
#define TMP102_TLOW_REG   0x02
 
#define TMP102_THIGH_REG   0x03
 
#define TMP102_CONFIG   (TMP102_CONF_TM | TMP102_CONF_EM | TMP102_CONF_CR1)
 
#define TMP102_CONFIG_RD_ONLY   (TMP102_CONF_R0 | TMP102_CONF_R1 | TMP102_CONF_AL)
 
#define TMP102_DEV_PM_OPS   NULL
 

Functions

 MODULE_DEVICE_TABLE (i2c, tmp102_id)
 
 module_i2c_driver (tmp102_driver)
 
 MODULE_AUTHOR ("Steven King <[email protected]>")
 
 MODULE_DESCRIPTION ("Texas Instruments TMP102 temperature sensor driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DRIVER_NAME   "tmp102"

Definition at line 31 of file tmp102.c.

#define TMP102_CONF_AL   0x0020

Definition at line 45 of file tmp102.c.

#define TMP102_CONF_CR0   0x0040

Definition at line 46 of file tmp102.c.

#define TMP102_CONF_CR1   0x0080

Definition at line 47 of file tmp102.c.

#define TMP102_CONF_EM   0x0010

Definition at line 44 of file tmp102.c.

#define TMP102_CONF_F0   0x0800

Definition at line 39 of file tmp102.c.

#define TMP102_CONF_F1   0x1000

Definition at line 40 of file tmp102.c.

#define TMP102_CONF_OS   0x8000

Definition at line 43 of file tmp102.c.

#define TMP102_CONF_POL   0x0400

Definition at line 38 of file tmp102.c.

#define TMP102_CONF_R0   0x2000

Definition at line 41 of file tmp102.c.

#define TMP102_CONF_R1   0x4000

Definition at line 42 of file tmp102.c.

#define TMP102_CONF_REG   0x01

Definition at line 34 of file tmp102.c.

#define TMP102_CONF_SD   0x0100

Definition at line 36 of file tmp102.c.

#define TMP102_CONF_TM   0x0200

Definition at line 37 of file tmp102.c.

#define TMP102_CONFIG   (TMP102_CONF_TM | TMP102_CONF_EM | TMP102_CONF_CR1)

Definition at line 147 of file tmp102.c.

#define TMP102_CONFIG_RD_ONLY   (TMP102_CONF_R0 | TMP102_CONF_R1 | TMP102_CONF_AL)

Definition at line 148 of file tmp102.c.

#define TMP102_DEV_PM_OPS   NULL

Definition at line 273 of file tmp102.c.

#define TMP102_TEMP_REG   0x00

Definition at line 33 of file tmp102.c.

#define TMP102_THIGH_REG   0x03

Definition at line 49 of file tmp102.c.

#define TMP102_TLOW_REG   0x02

Definition at line 48 of file tmp102.c.

Function Documentation

MODULE_AUTHOR ( "Steven King <[email protected]>"  )
MODULE_DESCRIPTION ( "Texas Instruments TMP102 temperature sensor driver )
MODULE_DEVICE_TABLE ( i2c  ,
tmp102_id   
)
module_i2c_driver ( tmp102_driver  )
MODULE_LICENSE ( "GPL"  )