9 #include <linux/input.h>
10 #include <linux/i2c.h>
11 #include <linux/module.h>
12 #include <linux/types.h>
17 static int ad714x_i2c_suspend(
struct device *
dev)
22 static int ad714x_i2c_resume(
struct device *dev)
31 unsigned short reg,
unsigned short data)
40 2 *
sizeof(*chip->xfer_buf));
42 dev_err(&client->
dev,
"I2C write error: %d\n", error);
49 static int ad714x_i2c_read(
struct ad714x_chip *chip,
50 unsigned short reg,
unsigned short *data,
size_t len)
59 sizeof(*chip->xfer_buf));
62 len *
sizeof(*chip->xfer_buf));
65 dev_err(&client->
dev,
"I2C read error: %d\n", error);
69 for (i = 0; i < len; i++)
81 ad714x_i2c_read, ad714x_i2c_write);
85 i2c_set_clientdata(client, chip);
92 struct ad714x_chip *chip = i2c_get_clientdata(client);
100 {
"ad7142_captouch", 0 },
101 {
"ad7143_captouch", 0 },
102 {
"ad7147_captouch", 0 },
103 {
"ad7147a_captouch", 0 },
104 {
"ad7148_captouch", 0 },
109 static struct i2c_driver ad714x_i2c_driver = {
111 .name =
"ad714x_captouch",
112 .pm = &ad714x_i2c_pm,
114 .probe = ad714x_i2c_probe,
116 .id_table = ad714x_id,