Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ad7150.c File Reference
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/i2c.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  ad7150_chip_info
 

Macros

#define AD7150_STATUS   0
 
#define AD7150_STATUS_OUT1   (1 << 3)
 
#define AD7150_STATUS_OUT2   (1 << 5)
 
#define AD7150_CH1_DATA_HIGH   1
 
#define AD7150_CH2_DATA_HIGH   3
 
#define AD7150_CH1_AVG_HIGH   5
 
#define AD7150_CH2_AVG_HIGH   7
 
#define AD7150_CH1_SENSITIVITY   9
 
#define AD7150_CH1_THR_HOLD_H   9
 
#define AD7150_CH1_TIMEOUT   10
 
#define AD7150_CH1_SETUP   11
 
#define AD7150_CH2_SENSITIVITY   12
 
#define AD7150_CH2_THR_HOLD_H   12
 
#define AD7150_CH2_TIMEOUT   13
 
#define AD7150_CH2_SETUP   14
 
#define AD7150_CFG   15
 
#define AD7150_CFG_FIX   (1 << 7)
 
#define AD7150_PD_TIMER   16
 
#define AD7150_CH1_CAPDAC   17
 
#define AD7150_CH2_CAPDAC   18
 
#define AD7150_SN3   19
 
#define AD7150_SN2   20
 
#define AD7150_SN1   21
 
#define AD7150_SN0   22
 
#define AD7150_ID   23
 
#define AD7150_TIMEOUT(chan, type, dir, ev_type, ev_dir)
 

Functions

 MODULE_DEVICE_TABLE (i2c, ad7150_id)
 
 module_i2c_driver (ad7150_driver)
 
 MODULE_AUTHOR ("Barry Song <[email protected]>")
 
 MODULE_DESCRIPTION ("Analog Devices AD7150/1/6 capacitive sensor driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define AD7150_CFG   15

Definition at line 38 of file ad7150.c.

#define AD7150_CFG_FIX   (1 << 7)

Definition at line 39 of file ad7150.c.

#define AD7150_CH1_AVG_HIGH   5

Definition at line 28 of file ad7150.c.

#define AD7150_CH1_CAPDAC   17

Definition at line 41 of file ad7150.c.

#define AD7150_CH1_DATA_HIGH   1

Definition at line 26 of file ad7150.c.

#define AD7150_CH1_SENSITIVITY   9

Definition at line 30 of file ad7150.c.

#define AD7150_CH1_SETUP   11

Definition at line 33 of file ad7150.c.

#define AD7150_CH1_THR_HOLD_H   9

Definition at line 31 of file ad7150.c.

#define AD7150_CH1_TIMEOUT   10

Definition at line 32 of file ad7150.c.

#define AD7150_CH2_AVG_HIGH   7

Definition at line 29 of file ad7150.c.

#define AD7150_CH2_CAPDAC   18

Definition at line 42 of file ad7150.c.

#define AD7150_CH2_DATA_HIGH   3

Definition at line 27 of file ad7150.c.

#define AD7150_CH2_SENSITIVITY   12

Definition at line 34 of file ad7150.c.

#define AD7150_CH2_SETUP   14

Definition at line 37 of file ad7150.c.

#define AD7150_CH2_THR_HOLD_H   12

Definition at line 35 of file ad7150.c.

#define AD7150_CH2_TIMEOUT   13

Definition at line 36 of file ad7150.c.

#define AD7150_ID   23

Definition at line 47 of file ad7150.c.

#define AD7150_PD_TIMER   16

Definition at line 40 of file ad7150.c.

#define AD7150_SN0   22

Definition at line 46 of file ad7150.c.

#define AD7150_SN1   21

Definition at line 45 of file ad7150.c.

#define AD7150_SN2   20

Definition at line 44 of file ad7150.c.

#define AD7150_SN3   19

Definition at line 43 of file ad7150.c.

#define AD7150_STATUS   0

Definition at line 23 of file ad7150.c.

#define AD7150_STATUS_OUT1   (1 << 3)

Definition at line 24 of file ad7150.c.

#define AD7150_STATUS_OUT2   (1 << 5)

Definition at line 25 of file ad7150.c.

#define AD7150_TIMEOUT (   chan,
  type,
  dir,
  ev_type,
  ev_dir 
)
Value:
IIO_DEVICE_ATTR(in_capacitance##chan##_##type##_##dir##_timeout, \
&ad7150_show_timeout, \
&ad7150_store_timeout, \
chan, \
IIO_EV_TYPE_##ev_type, \
IIO_EV_DIR_##ev_dir))

Definition at line 409 of file ad7150.c.

Function Documentation

MODULE_AUTHOR ( "Barry Song <[email protected]>"  )
MODULE_DESCRIPTION ( "Analog Devices AD7150/1/6 capacitive sensor driver )
MODULE_DEVICE_TABLE ( i2c  ,
ad7150_id   
)
module_i2c_driver ( ad7150_driver  )
MODULE_LICENSE ( "GPL v2 )