#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 <linux/platform_data/ad7791.h>
Go to the source code of this file.
#define AD7791_CH_AIN1N_AIN1N 0x02 |
#define AD7791_CH_AIN1P_AIN1N 0x00 |
#define AD7791_CH_AIN2 0x01 |
#define AD7791_CH_AVDD_MONITOR 0x03 |
#define AD7791_FILTER_CLK_DIV_1 (0x0 << 4) |
#define AD7791_FILTER_CLK_DIV_2 (0x1 << 4) |
#define AD7791_FILTER_CLK_DIV_4 (0x2 << 4) |
#define AD7791_FILTER_CLK_DIV_8 (0x3 << 4) |
#define AD7791_FILTER_CLK_MASK (0x3 << 4) |
#define AD7791_FILTER_RATE_100 0x1 |
#define AD7791_FILTER_RATE_120 0x0 |
#define AD7791_FILTER_RATE_13_3 0x6 |
#define AD7791_FILTER_RATE_16_6 0x4 |
#define AD7791_FILTER_RATE_16_7 0x5 |
#define AD7791_FILTER_RATE_20 0x3 |
#define AD7791_FILTER_RATE_33_3 0x2 |
#define AD7791_FILTER_RATE_9_5 0x7 |
#define AD7791_FILTER_RATE_MASK 0x7 |
#define AD7791_MODE_BUFFER BIT(1) |
#define AD7791_MODE_BURNOUT BIT(3) |
#define AD7791_MODE_CONTINUOUS 0x00 |
#define AD7791_MODE_POWERDOWN 0x03 |
#define AD7791_MODE_SEL |
( |
|
x | ) |
((x) << 6) |
#define AD7791_MODE_SEL_MASK (0x3 << 6) |
#define AD7791_MODE_SINGLE 0x02 |
#define AD7791_MODE_UNIPOLAR BIT(2) |
#define AD7791_REG_COMM 0x0 /* For writes */ |
#define AD7791_REG_DATA 0x3 |
#define AD7791_REG_FILTER 0x2 |
#define AD7791_REG_MODE 0x1 |
#define AD7791_REG_STATUS 0x0 /* For reads */ |
#define DECLARE_AD7787_CHANNELS |
( |
|
name, |
|
|
|
bits, |
|
|
|
storagebits |
|
) |
| |
Value:
IIO_CHAN_SOFT_TIMESTAMP(4), \
}
Definition at line 68 of file ad7791.c.
#define DECLARE_AD7791_CHANNELS |
( |
|
name, |
|
|
|
bits, |
|
|
|
storagebits |
|
) |
| |
Value:
IIO_CHAN_SOFT_TIMESTAMP(3), \
}
Definition at line 80 of file ad7791.c.
- Enumerator:
AD7787 |
|
AD7788 |
|
AD7789 |
|
AD7790 |
|
AD7791 |
|
Definition at line 95 of file ad7791.c.
- Enumerator:
AD7791_FLAG_HAS_FILTER |
|
AD7791_FLAG_HAS_BUFFER |
|
AD7791_FLAG_HAS_UNIPOLAR |
|
AD7791_FLAG_HAS_BURNOUT |
|
Definition at line 103 of file ad7791.c.
MODULE_DEVICE_TABLE |
( |
spi |
, |
|
|
ad7791_spi_ids |
|
|
) |
| |
MODULE_LICENSE |
( |
"GPL v2" |
| ) |
|
module_spi_driver |
( |
ad7791_driver |
| ) |
|