Linux-libre 5.4-rc7-gnu
[librecmc/linux-libre.git] / drivers / staging / iio / cdc / ad7746.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * AD7746 capacitive sensor driver supporting AD7745, AD7746 and AD7747
4  *
5  * Copyright 2011 Analog Devices Inc.
6  */
7
8 #ifndef IIO_CDC_AD7746_H_
9 #define IIO_CDC_AD7746_H_
10
11 /*
12  * TODO: struct ad7746_platform_data needs to go into include/linux/iio
13  */
14
15 #define AD7466_EXCLVL_0         0 /* +-VDD/8 */
16 #define AD7466_EXCLVL_1         1 /* +-VDD/4 */
17 #define AD7466_EXCLVL_2         2 /* +-VDD * 3/8 */
18 #define AD7466_EXCLVL_3         3 /* +-VDD/2 */
19
20 struct ad7746_platform_data {
21         unsigned char exclvl;   /*Excitation Voltage Level */
22         bool exca_en;           /* enables EXCA pin as the excitation output */
23         bool exca_inv_en;       /* enables /EXCA pin as the excitation output */
24         bool excb_en;           /* enables EXCB pin as the excitation output */
25         bool excb_inv_en;       /* enables /EXCB pin as the excitation output */
26 };
27
28 #endif /* IIO_CDC_AD7746_H_ */