#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/stat.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include "ad7746.h"
Go to the source code of this file.
#define AD7746_CAPDAC_DACEN (1 << 7) |
#define AD7746_CAPDAC_DACP |
( |
|
x | ) |
((x) & 0x7F) |
#define AD7746_CAPSETUP_CACHOP (1 << 0) |
#define AD7746_CAPSETUP_CAPDIFF (1 << 5) |
#define AD7746_CAPSETUP_CAPEN (1 << 7) |
#define AD7746_CAPSETUP_CIN2 (1 << 6) /* AD7746 only */ |
#define AD7746_CONF_CAPFS |
( |
|
x | ) |
((x) << 3) |
#define AD7746_CONF_MODE_CONT_CONV (1 << 0) |
#define AD7746_CONF_MODE_GAIN_CAL (6 << 0) |
#define AD7746_CONF_MODE_IDLE (0 << 0) |
#define AD7746_CONF_MODE_OFFS_CAL (5 << 0) |
#define AD7746_CONF_MODE_PWRDN (3 << 0) |
#define AD7746_CONF_MODE_SINGLE_CONV (2 << 0) |
#define AD7746_CONF_VTFS |
( |
|
x | ) |
((x) << 6) |
#define AD7746_EXCSETUP_CLKCTRL (1 << 7) |
#define AD7746_EXCSETUP_EXCA (1 << 3) |
#define AD7746_EXCSETUP_EXCB (1 << 5) |
#define AD7746_EXCSETUP_EXCLVL |
( |
|
x | ) |
(((x) & 0x3) << 0) |
#define AD7746_EXCSETUP_EXCON (1 << 6) |
#define AD7746_EXCSETUP_NEXCA (1 << 2) |
#define AD7746_EXCSETUP_NEXCB (1 << 4) |
#define AD7746_REG_CAP_DATA_HIGH 1 |
#define AD7746_REG_CAP_DATA_LOW 3 |
#define AD7746_REG_CAP_DATA_MID 2 |
#define AD7746_REG_CAP_GAINH 15 |
#define AD7746_REG_CAP_GAINL 16 |
#define AD7746_REG_CAP_OFFH 13 |
#define AD7746_REG_CAP_OFFL 14 |
#define AD7746_REG_CAP_SETUP 7 |
#define AD7746_REG_CAPDACA 11 |
#define AD7746_REG_CAPDACB 12 |
#define AD7746_REG_CFG 10 |
#define AD7746_REG_EXC_SETUP 9 |
#define AD7746_REG_STATUS 0 |
#define AD7746_REG_VOLT_GAINH 17 |
#define AD7746_REG_VOLT_GAINL 18 |
#define AD7746_REG_VT_DATA_HIGH 4 |
#define AD7746_REG_VT_DATA_LOW 6 |
#define AD7746_REG_VT_DATA_MID 5 |
#define AD7746_REG_VT_SETUP 8 |
#define AD7746_STATUS_EXCERR (1 << 3) |
#define AD7746_STATUS_RDY (1 << 2) |
#define AD7746_STATUS_RDYCAP (1 << 0) |
#define AD7746_STATUS_RDYVT (1 << 1) |
#define AD7746_VTSETUP_EXTREF (1 << 4) |
#define AD7746_VTSETUP_VTCHOP (1 << 0) |
#define AD7746_VTSETUP_VTEN (1 << 7) |
#define AD7746_VTSETUP_VTMD_EXT_TEMP (1 << 5) |
#define AD7746_VTSETUP_VTMD_EXT_VIN (3 << 5) |
#define AD7746_VTSETUP_VTMD_INT_TEMP (0 << 5) |
#define AD7746_VTSETUP_VTMD_VDD_MON (2 << 5) |
#define AD7746_VTSETUP_VTSHORT (1 << 1) |
- Enumerator:
VIN |
|
VIN_VDD |
|
TEMP_INT |
|
TEMP_EXT |
|
CIN1 |
|
CIN1_DIFF |
|
CIN2 |
|
CIN2_DIFF |
|
Definition at line 110 of file ad7746.c.
MODULE_DESCRIPTION |
( |
"Analog Devices AD7746/5/7 capacitive sensor driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
ad7746_id |
|
|
) |
| |
module_i2c_driver |
( |
ad7746_driver |
| ) |
|
MODULE_LICENSE |
( |
"GPL v2" |
| ) |
|