Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ad7793.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/spi/spi.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/adc/ad_sigma_delta.h>
#include "ad7793.h"

Go to the source code of this file.

Data Structures

struct  ad7793_chip_info
 
struct  ad7793_state
 

Macros

#define DECLARE_AD7793_CHANNELS(_name, _b, _sb, _s)
 
#define DECLARE_AD7795_CHANNELS(_name, _b, _sb)
 

Enumerations

enum  ad7793_supported_device_ids {
  ID_AD7785, ID_AD7792, ID_AD7793, ID_AD7794,
  ID_AD7795
}
 

Functions

 MODULE_DEVICE_TABLE (spi, ad7793_id)
 
 module_spi_driver (ad7793_driver)
 
 MODULE_AUTHOR ("Michael Hennerich <[email protected]>")
 
 MODULE_DESCRIPTION ("Analog Devices AD7793 and simialr ADCs")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define DECLARE_AD7793_CHANNELS (   _name,
  _b,
  _sb,
  _s 
)
Value:
const struct iio_chan_spec _name##_channels[] = { \
AD_SD_DIFF_CHANNEL(0, 0, 0, AD7793_CH_AIN1P_AIN1M, (_b), (_sb), (_s)), \
AD_SD_DIFF_CHANNEL(1, 1, 1, AD7793_CH_AIN2P_AIN2M, (_b), (_sb), (_s)), \
AD_SD_DIFF_CHANNEL(2, 2, 2, AD7793_CH_AIN3P_AIN3M, (_b), (_sb), (_s)), \
AD_SD_SHORTED_CHANNEL(3, 0, AD7793_CH_AIN1M_AIN1M, (_b), (_sb), (_s)), \
AD_SD_TEMP_CHANNEL(4, AD7793_CH_TEMP, (_b), (_sb), (_s)), \
AD_SD_SUPPLY_CHANNEL(5, 3, AD7793_CH_AVDD_MONITOR, (_b), (_sb), (_s)), \
IIO_CHAN_SOFT_TIMESTAMP(6), \
}

Definition at line 390 of file ad7793.c.

#define DECLARE_AD7795_CHANNELS (   _name,
  _b,
  _sb 
)
Value:
const struct iio_chan_spec _name##_channels[] = { \
AD_SD_DIFF_CHANNEL(0, 0, 0, AD7793_CH_AIN1P_AIN1M, (_b), (_sb), 0), \
AD_SD_DIFF_CHANNEL(1, 1, 1, AD7793_CH_AIN2P_AIN2M, (_b), (_sb), 0), \
AD_SD_DIFF_CHANNEL(2, 2, 2, AD7793_CH_AIN3P_AIN3M, (_b), (_sb), 0), \
AD_SD_DIFF_CHANNEL(3, 3, 3, AD7795_CH_AIN4P_AIN4M, (_b), (_sb), 0), \
AD_SD_DIFF_CHANNEL(4, 4, 4, AD7795_CH_AIN5P_AIN5M, (_b), (_sb), 0), \
AD_SD_DIFF_CHANNEL(5, 5, 5, AD7795_CH_AIN6P_AIN6M, (_b), (_sb), 0), \
AD_SD_SHORTED_CHANNEL(6, 0, AD7795_CH_AIN1M_AIN1M, (_b), (_sb), 0), \
AD_SD_TEMP_CHANNEL(7, AD7793_CH_TEMP, (_b), (_sb), 0), \
AD_SD_SUPPLY_CHANNEL(8, 3, AD7793_CH_AVDD_MONITOR, (_b), (_sb), 0), \
IIO_CHAN_SOFT_TIMESTAMP(9), \
}

Definition at line 401 of file ad7793.c.

Enumeration Type Documentation

Enumerator:
ID_AD7785 
ID_AD7792 
ID_AD7793 
ID_AD7794 
ID_AD7795 

Definition at line 56 of file ad7793.c.

Function Documentation

MODULE_AUTHOR ( "Michael Hennerich <[email protected]>"  )
MODULE_DESCRIPTION ( "Analog Devices AD7793 and simialr ADCs"  )
MODULE_DEVICE_TABLE ( spi  ,
ad7793_id   
)
MODULE_LICENSE ( "GPL v2 )
module_spi_driver ( ad7793_driver  )