#include <linux/device.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/spi/ad7877.h>
#include <linux/module.h>
#include <asm/irq.h>
Go to the source code of this file.
|
enum | {
AD7877_SEQ_YPOS = 0,
AD7877_SEQ_XPOS = 1,
AD7877_SEQ_Z2 = 2,
AD7877_SEQ_AUX1 = 3,
AD7877_SEQ_AUX2 = 4,
AD7877_SEQ_AUX3 = 5,
AD7877_SEQ_BAT1 = 6,
AD7877_SEQ_BAT2 = 7,
AD7877_SEQ_TEMP1 = 8,
AD7877_SEQ_TEMP2 = 9,
AD7877_SEQ_Z1 = 10,
AD7877_NR_SENSE = 11
} |
|
#define AD7877_ACQ |
( |
|
x | ) |
((x & 0x3) << 8) |
#define AD7877_AVG |
( |
|
x | ) |
((x & 0x3) << 10) |
#define AD7877_CHANADD |
( |
|
x | ) |
((x&0xF)<<7) |
#define AD7877_DAC_CONF 0x1 |
#define AD7877_DFR (0 << 11) /* differential */ |
#define AD7877_EXTW_GPIO_3_CONF 0x1C4 |
#define AD7877_EXTW_GPIO_DATA 0x200 |
#define AD7877_FCD |
( |
|
x | ) |
((x & 0x3) << 4) |
#define AD7877_MM_SEQUENCE |
#define AD7877_MODE_NOC (0) /* Do not convert */ |
#define AD7877_MODE_SCC (1) /* Single channel conversion */ |
#define AD7877_PM |
( |
|
x | ) |
((x & 0x3) << 6) |
#define AD7877_POL |
( |
|
x | ) |
((x & 0x1) << 3) |
#define AD7877_READ_CHAN |
( |
|
x | ) |
|
Value:
AD7877_READADD(AD7877_REG_ ##
x))
Definition at line 146 of file ad7877.c.
#define AD7877_READADD |
( |
|
x | ) |
((x)<<2) |
#define AD7877_REF |
( |
|
x | ) |
((x & 0x1) << 2) |
#define AD7877_REG_ALERT 3 |
#define AD7877_REG_aux1 19 |
#define AD7877_REG_AUX1HIGH 4 |
#define AD7877_REG_AUX1LOW 5 |
#define AD7877_REG_aux2 20 |
#define AD7877_REG_aux3 21 |
#define AD7877_REG_bat1 22 |
#define AD7877_REG_BAT1HIGH 6 |
#define AD7877_REG_BAT1LOW 7 |
#define AD7877_REG_bat2 23 |
#define AD7877_REG_BAT2HIGH 8 |
#define AD7877_REG_BAT2LOW 9 |
#define AD7877_REG_CTRL1 1 |
#define AD7877_REG_CTRL2 2 |
#define AD7877_REG_DAC 14 |
#define AD7877_REG_EXTWRITE 15 |
#define AD7877_REG_GPIOCTRL1 27 |
#define AD7877_REG_GPIOCTRL2 28 |
#define AD7877_REG_GPIODATA 29 |
#define AD7877_REG_NONE1 15 |
#define AD7877_REG_NONE2 30 |
#define AD7877_REG_NONE3 31 |
#define AD7877_REG_SEQ0 12 |
#define AD7877_REG_SEQ1 13 |
#define AD7877_REG_temp1 24 |
#define AD7877_REG_TEMP1HIGH 10 |
#define AD7877_REG_TEMP1LOW 11 |
#define AD7877_REG_temp2 25 |
#define AD7877_REG_XPLUS 16 |
#define AD7877_REG_YPLUS 17 |
#define AD7877_REG_ZEROS 0 |
#define AD7877_SEQ_AUX1_BIT (1<<8) |
#define AD7877_SEQ_AUX2_BIT (1<<7) |
#define AD7877_SEQ_AUX3_BIT (1<<6) |
#define AD7877_SEQ_BAT1_BIT (1<<5) |
#define AD7877_SEQ_BAT2_BIT (1<<4) |
#define AD7877_SEQ_TEMP1_BIT (1<<3) |
#define AD7877_SEQ_TEMP2_BIT (1<<2) |
#define AD7877_SEQ_XPLUS_BIT (1<<10) |
#define AD7877_SEQ_YPLUS_BIT (1<<11) |
#define AD7877_SEQ_Z1_BIT (1<<1) |
#define AD7877_SEQ_Z2_BIT (1<<9) |
#define AD7877_SER (1 << 11) /* non-differential */ |
#define AD7877_TMR |
( |
|
x | ) |
((x & 0x3) << 0) |
#define AD7877_WRITEADD |
( |
|
x | ) |
((x)<<12) |
#define MAX_12BIT ((1<<12)-1) |
#define MAX_SPI_FREQ_HZ 20000000 |
Value:static ssize_t \
if (v < 0) \
} \
Definition at line 458 of file ad7877.c.
- Enumerator:
AD7877_SEQ_YPOS |
|
AD7877_SEQ_XPOS |
|
AD7877_SEQ_Z2 |
|
AD7877_SEQ_AUX1 |
|
AD7877_SEQ_AUX2 |
|
AD7877_SEQ_AUX3 |
|
AD7877_SEQ_BAT1 |
|
AD7877_SEQ_BAT2 |
|
AD7877_SEQ_TEMP1 |
|
AD7877_SEQ_TEMP2 |
|
AD7877_SEQ_Z1 |
|
AD7877_NR_SENSE |
|
Definition at line 102 of file ad7877.c.
MODULE_ALIAS |
( |
"spi:ad7877" |
| ) |
|
MODULE_DESCRIPTION |
( |
"AD7877 touchscreen Driver" |
| ) |
|
module_param |
( |
gpio3 |
, |
|
|
bool |
, |
|
|
0 |
|
|
) |
| |
module_spi_driver |
( |
ad7877_driver |
| ) |
|