Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
adt7310.c File Reference
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/list.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>

Go to the source code of this file.

Data Structures

struct  adt7310_chip_info
 

Macros

#define ADT7310_STATUS   0
 
#define ADT7310_CONFIG   1
 
#define ADT7310_TEMPERATURE   2
 
#define ADT7310_ID   3
 
#define ADT7310_T_CRIT   4
 
#define ADT7310_T_HYST   5
 
#define ADT7310_T_ALARM_HIGH   6
 
#define ADT7310_T_ALARM_LOW   7
 
#define ADT7310_STAT_T_LOW   0x10
 
#define ADT7310_STAT_T_HIGH   0x20
 
#define ADT7310_STAT_T_CRIT   0x40
 
#define ADT7310_STAT_NOT_RDY   0x80
 
#define ADT7310_FAULT_QUEUE_MASK   0x3
 
#define ADT7310_CT_POLARITY   0x4
 
#define ADT7310_INT_POLARITY   0x8
 
#define ADT7310_EVENT_MODE   0x10
 
#define ADT7310_MODE_MASK   0x60
 
#define ADT7310_ONESHOT   0x20
 
#define ADT7310_SPS   0x40
 
#define ADT7310_PD   0x60
 
#define ADT7310_RESOLUTION   0x80
 
#define ADT7310_T16_VALUE_SIGN   0x8000
 
#define ADT7310_T16_VALUE_FLOAT_OFFSET   7
 
#define ADT7310_T16_VALUE_FLOAT_MASK   0x7F
 
#define ADT7310_T13_VALUE_SIGN   0x1000
 
#define ADT7310_T13_VALUE_OFFSET   3
 
#define ADT7310_T13_VALUE_FLOAT_OFFSET   4
 
#define ADT7310_T13_VALUE_FLOAT_MASK   0xF
 
#define ADT7310_T_HYST_MASK   0xF
 
#define ADT7310_DEVICE_ID_MASK   0x7
 
#define ADT7310_MANUFACTORY_ID_MASK   0xF8
 
#define ADT7310_MANUFACTORY_ID_OFFSET   3
 
#define ADT7310_CMD_REG_MASK   0x28
 
#define ADT7310_CMD_REG_OFFSET   3
 
#define ADT7310_CMD_READ   0x40
 
#define ADT7310_CMD_CON_READ   0x4
 
#define ADT7310_IRQS   2
 

Functions

 MODULE_DEVICE_TABLE (spi, adt7310_id)
 
 module_spi_driver (adt7310_driver)
 
 MODULE_AUTHOR ("Sonic Zhang <[email protected]>")
 
 MODULE_DESCRIPTION ("Analog Devices ADT7310 digital"" temperature sensor driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define ADT7310_CMD_CON_READ   0x4

Definition at line 74 of file adt7310.c.

#define ADT7310_CMD_READ   0x40

Definition at line 73 of file adt7310.c.

#define ADT7310_CMD_REG_MASK   0x28

Definition at line 71 of file adt7310.c.

#define ADT7310_CMD_REG_OFFSET   3

Definition at line 72 of file adt7310.c.

#define ADT7310_CONFIG   1

Definition at line 26 of file adt7310.c.

#define ADT7310_CT_POLARITY   0x4

Definition at line 46 of file adt7310.c.

#define ADT7310_DEVICE_ID_MASK   0x7

Definition at line 66 of file adt7310.c.

#define ADT7310_EVENT_MODE   0x10

Definition at line 48 of file adt7310.c.

#define ADT7310_FAULT_QUEUE_MASK   0x3

Definition at line 45 of file adt7310.c.

#define ADT7310_ID   3

Definition at line 28 of file adt7310.c.

#define ADT7310_INT_POLARITY   0x8

Definition at line 47 of file adt7310.c.

#define ADT7310_IRQS   2

Definition at line 76 of file adt7310.c.

#define ADT7310_MANUFACTORY_ID_MASK   0xF8

Definition at line 67 of file adt7310.c.

#define ADT7310_MANUFACTORY_ID_OFFSET   3

Definition at line 68 of file adt7310.c.

#define ADT7310_MODE_MASK   0x60

Definition at line 49 of file adt7310.c.

#define ADT7310_ONESHOT   0x20

Definition at line 50 of file adt7310.c.

#define ADT7310_PD   0x60

Definition at line 52 of file adt7310.c.

#define ADT7310_RESOLUTION   0x80

Definition at line 53 of file adt7310.c.

#define ADT7310_SPS   0x40

Definition at line 51 of file adt7310.c.

#define ADT7310_STAT_NOT_RDY   0x80

Definition at line 40 of file adt7310.c.

#define ADT7310_STAT_T_CRIT   0x40

Definition at line 39 of file adt7310.c.

#define ADT7310_STAT_T_HIGH   0x20

Definition at line 38 of file adt7310.c.

#define ADT7310_STAT_T_LOW   0x10

Definition at line 37 of file adt7310.c.

#define ADT7310_STATUS   0

Definition at line 25 of file adt7310.c.

#define ADT7310_T13_VALUE_FLOAT_MASK   0xF

Definition at line 64 of file adt7310.c.

#define ADT7310_T13_VALUE_FLOAT_OFFSET   4

Definition at line 63 of file adt7310.c.

#define ADT7310_T13_VALUE_OFFSET   3

Definition at line 62 of file adt7310.c.

#define ADT7310_T13_VALUE_SIGN   0x1000

Definition at line 61 of file adt7310.c.

#define ADT7310_T16_VALUE_FLOAT_MASK   0x7F

Definition at line 60 of file adt7310.c.

#define ADT7310_T16_VALUE_FLOAT_OFFSET   7

Definition at line 59 of file adt7310.c.

#define ADT7310_T16_VALUE_SIGN   0x8000

Definition at line 58 of file adt7310.c.

#define ADT7310_T_ALARM_HIGH   6

Definition at line 31 of file adt7310.c.

#define ADT7310_T_ALARM_LOW   7

Definition at line 32 of file adt7310.c.

#define ADT7310_T_CRIT   4

Definition at line 29 of file adt7310.c.

#define ADT7310_T_HYST   5

Definition at line 30 of file adt7310.c.

#define ADT7310_T_HYST_MASK   0xF

Definition at line 65 of file adt7310.c.

#define ADT7310_TEMPERATURE   2

Definition at line 27 of file adt7310.c.

Function Documentation

MODULE_AUTHOR ( "Sonic Zhang <[email protected]>"  )
MODULE_DESCRIPTION ( "Analog Devices ADT7310 digital"" temperature sensor driver )
MODULE_DEVICE_TABLE ( spi  ,
adt7310_id   
)
MODULE_LICENSE ( "GPL v2 )
module_spi_driver ( adt7310_driver  )