Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / input / misc / ad714x.h
blobdafa12325f27c4bed531f8679f86e90220b1a909
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * AD714X CapTouch Programmable Controller driver (bus interfaces)
5 * Copyright 2009-2011 Analog Devices Inc.
6 */
8 #ifndef _AD714X_H_
9 #define _AD714X_H_
11 #include <linux/pm.h>
12 #include <linux/types.h>
14 #define STAGE_NUM 12
16 struct device;
17 struct ad714x_platform_data;
18 struct ad714x_driver_data;
19 struct ad714x_chip;
21 typedef int (*ad714x_read_t)(struct ad714x_chip *, unsigned short, unsigned short *, size_t);
22 typedef int (*ad714x_write_t)(struct ad714x_chip *, unsigned short, unsigned short);
24 struct ad714x_chip {
25 unsigned short l_state;
26 unsigned short h_state;
27 unsigned short c_state;
28 unsigned short adc_reg[STAGE_NUM];
29 unsigned short amb_reg[STAGE_NUM];
30 unsigned short sensor_val[STAGE_NUM];
32 struct ad714x_platform_data *hw;
33 struct ad714x_driver_data *sw;
35 int irq;
36 struct device *dev;
37 ad714x_read_t read;
38 ad714x_write_t write;
40 struct mutex mutex;
42 unsigned product;
43 unsigned version;
45 __be16 xfer_buf[16] ____cacheline_aligned;
49 extern const struct dev_pm_ops ad714x_pm;
50 struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
51 ad714x_read_t read, ad714x_write_t write);
53 #endif