1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * AD714X CapTouch Programmable Controller driver (bus interfaces)
5 * Copyright 2009-2011 Analog Devices Inc.
11 #include <linux/types.h>
16 struct ad714x_platform_data
;
17 struct ad714x_driver_data
;
20 typedef int (*ad714x_read_t
)(struct ad714x_chip
*, unsigned short, unsigned short *, size_t);
21 typedef int (*ad714x_write_t
)(struct ad714x_chip
*, unsigned short, unsigned short);
24 unsigned short l_state
;
25 unsigned short h_state
;
26 unsigned short c_state
;
27 unsigned short adc_reg
[STAGE_NUM
];
28 unsigned short amb_reg
[STAGE_NUM
];
29 unsigned short sensor_val
[STAGE_NUM
];
31 struct ad714x_platform_data
*hw
;
32 struct ad714x_driver_data
*sw
;
44 __be16 xfer_buf
[16] ____cacheline_aligned
;
48 int ad714x_disable(struct ad714x_chip
*ad714x
);
49 int ad714x_enable(struct ad714x_chip
*ad714x
);
50 struct ad714x_chip
*ad714x_probe(struct device
*dev
, u16 bus_type
, int irq
,
51 ad714x_read_t read
, ad714x_write_t write
);