diff options
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/ad7879.h | 35 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 6 |
2 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/spi/ad7879.h b/include/linux/spi/ad7879.h new file mode 100644 index 000000000000..4231104c9afa --- /dev/null +++ b/include/linux/spi/ad7879.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* linux/spi/ad7879.h */ | ||
2 | |||
3 | /* Touchscreen characteristics vary between boards and models. The | ||
4 | * platform_data for the device's "struct device" holds this information. | ||
5 | * | ||
6 | * It's OK if the min/max values are zero. | ||
7 | */ | ||
8 | struct ad7879_platform_data { | ||
9 | u16 model; /* 7879 */ | ||
10 | u16 x_plate_ohms; | ||
11 | u16 x_min, x_max; | ||
12 | u16 y_min, y_max; | ||
13 | u16 pressure_min, pressure_max; | ||
14 | |||
15 | /* [0..255] 0=OFF Starts at 1=550us and goes | ||
16 | * all the way to 9.440ms in steps of 35us. | ||
17 | */ | ||
18 | u8 pen_down_acc_interval; | ||
19 | /* [0..15] Starts at 0=128us and goes all the | ||
20 | * way to 4.096ms in steps of 128us. | ||
21 | */ | ||
22 | u8 first_conversion_delay; | ||
23 | /* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */ | ||
24 | u8 acquisition_time; | ||
25 | /* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */ | ||
26 | u8 averaging; | ||
27 | /* [0..3] Perform X measurements 0 = OFF, | ||
28 | * 1 = 4, 2 = 8, 3 = 16 (median > averaging) | ||
29 | */ | ||
30 | u8 median; | ||
31 | /* 1 = AUX/VBAT/GPIO set to GPIO Output */ | ||
32 | u8 gpio_output; | ||
33 | /* Initial GPIO pin state (valid if gpio_output = 1) */ | ||
34 | u8 gpio_default; | ||
35 | }; | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 68bb1c501d0d..2cc43fa380cb 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -204,6 +204,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
204 | * SPI slaves, and are numbered from zero to num_chipselects. | 204 | * SPI slaves, and are numbered from zero to num_chipselects. |
205 | * each slave has a chipselect signal, but it's common that not | 205 | * each slave has a chipselect signal, but it's common that not |
206 | * every chipselect is connected to a slave. | 206 | * every chipselect is connected to a slave. |
207 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | ||
207 | * @setup: updates the device mode and clocking records used by a | 208 | * @setup: updates the device mode and clocking records used by a |
208 | * device's SPI controller; protocol code may call this. This | 209 | * device's SPI controller; protocol code may call this. This |
209 | * must fail if an unrecognized or unsupported mode is requested. | 210 | * must fail if an unrecognized or unsupported mode is requested. |
@@ -239,6 +240,11 @@ struct spi_master { | |||
239 | */ | 240 | */ |
240 | u16 num_chipselect; | 241 | u16 num_chipselect; |
241 | 242 | ||
243 | /* some SPI controllers pose alignment requirements on DMAable | ||
244 | * buffers; let protocol drivers know about these requirements. | ||
245 | */ | ||
246 | u16 dma_alignment; | ||
247 | |||
242 | /* setup mode and clock, etc (spi driver may call many times) */ | 248 | /* setup mode and clock, etc (spi driver may call many times) */ |
243 | int (*setup)(struct spi_device *spi); | 249 | int (*setup)(struct spi_device *spi); |
244 | 250 | ||