Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Touch Screen driver for EETI's I2C connected touch screen panels |
Daniel Mack | fd8135b | 2018-07-04 15:46:55 +0000 | [diff] [blame] | 3 | * Copyright (c) 2009,2018 Daniel Mack <daniel@zonque.org> |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 4 | * |
| 5 | * See EETI's software guide for the protocol specification: |
Daniel Mack | fd8135b | 2018-07-04 15:46:55 +0000 | [diff] [blame] | 6 | * http://home.eeti.com.tw/documentation.html |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 7 | * |
| 8 | * Based on migor_ts.c |
| 9 | * Copyright (c) 2008 Magnus Damm |
| 10 | * Copyright (c) 2007 Ujjwal Pande <ujjwal@kenati.com> |
| 11 | * |
| 12 | * This file is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public |
| 14 | * License as published by the Free Software Foundation; either |
| 15 | * version 2 of the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This file is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 20 | * General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 | */ |
| 26 | |
| 27 | #include <linux/module.h> |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 28 | #include <linux/kernel.h> |
| 29 | #include <linux/input.h> |
Daniel Mack | a114cbd | 2018-07-04 15:46:22 +0000 | [diff] [blame] | 30 | #include <linux/input/touchscreen.h> |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 31 | #include <linux/interrupt.h> |
| 32 | #include <linux/i2c.h> |
| 33 | #include <linux/timer.h> |
Dmitry Torokhov | d99caa4 | 2017-02-19 17:21:56 -0800 | [diff] [blame] | 34 | #include <linux/gpio/consumer.h> |
Daniel Mack | e32d7f1 | 2018-07-04 15:45:47 +0000 | [diff] [blame] | 35 | #include <linux/of.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 36 | #include <linux/slab.h> |
Dmitry Torokhov | e9f66cd | 2017-02-20 21:50:13 -0800 | [diff] [blame] | 37 | #include <asm/unaligned.h> |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 38 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 39 | struct eeti_ts { |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 40 | struct i2c_client *client; |
| 41 | struct input_dev *input; |
Dmitry Torokhov | d99caa4 | 2017-02-19 17:21:56 -0800 | [diff] [blame] | 42 | struct gpio_desc *attn_gpio; |
Daniel Mack | a114cbd | 2018-07-04 15:46:22 +0000 | [diff] [blame] | 43 | struct touchscreen_properties props; |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 44 | bool running; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | #define EETI_TS_BITDEPTH (11) |
| 48 | #define EETI_MAXVAL ((1 << (EETI_TS_BITDEPTH + 1)) - 1) |
| 49 | |
Dmitry Torokhov | 272c03b | 2017-02-20 21:42:43 -0800 | [diff] [blame] | 50 | #define REPORT_BIT_PRESSED BIT(0) |
| 51 | #define REPORT_BIT_AD0 BIT(1) |
| 52 | #define REPORT_BIT_AD1 BIT(2) |
| 53 | #define REPORT_BIT_HAS_PRESSURE BIT(6) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 54 | #define REPORT_RES_BITS(v) (((v) >> 1) + EETI_TS_BITDEPTH) |
| 55 | |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 56 | static void eeti_ts_report_event(struct eeti_ts *eeti, u8 *buf) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 57 | { |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 58 | unsigned int res; |
| 59 | u16 x, y; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 60 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 61 | res = REPORT_RES_BITS(buf[0] & (REPORT_BIT_AD0 | REPORT_BIT_AD1)); |
Dmitry Torokhov | e9f66cd | 2017-02-20 21:50:13 -0800 | [diff] [blame] | 62 | |
| 63 | x = get_unaligned_be16(&buf[1]); |
| 64 | y = get_unaligned_be16(&buf[3]); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 65 | |
| 66 | /* fix the range to 11 bits */ |
| 67 | x >>= res - EETI_TS_BITDEPTH; |
| 68 | y >>= res - EETI_TS_BITDEPTH; |
| 69 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 70 | if (buf[0] & REPORT_BIT_HAS_PRESSURE) |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 71 | input_report_abs(eeti->input, ABS_PRESSURE, buf[5]); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 72 | |
Daniel Mack | a114cbd | 2018-07-04 15:46:22 +0000 | [diff] [blame] | 73 | touchscreen_report_pos(eeti->input, &eeti->props, x, y, false); |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 74 | input_report_key(eeti->input, BTN_TOUCH, buf[0] & REPORT_BIT_PRESSED); |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 75 | input_sync(eeti->input); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | static irqreturn_t eeti_ts_isr(int irq, void *dev_id) |
| 79 | { |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 80 | struct eeti_ts *eeti = dev_id; |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 81 | int len; |
| 82 | int error; |
| 83 | char buf[6]; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 84 | |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 85 | do { |
| 86 | len = i2c_master_recv(eeti->client, buf, sizeof(buf)); |
| 87 | if (len != sizeof(buf)) { |
| 88 | error = len < 0 ? len : -EIO; |
| 89 | dev_err(&eeti->client->dev, |
| 90 | "failed to read touchscreen data: %d\n", |
| 91 | error); |
| 92 | break; |
| 93 | } |
| 94 | |
| 95 | if (buf[0] & 0x80) { |
| 96 | /* Motion packet */ |
| 97 | eeti_ts_report_event(eeti, buf); |
| 98 | } |
Dmitry Torokhov | d99caa4 | 2017-02-19 17:21:56 -0800 | [diff] [blame] | 99 | } while (eeti->running && |
| 100 | eeti->attn_gpio && gpiod_get_value_cansleep(eeti->attn_gpio)); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 101 | |
| 102 | return IRQ_HANDLED; |
| 103 | } |
| 104 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 105 | static void eeti_ts_start(struct eeti_ts *eeti) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 106 | { |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 107 | eeti->running = true; |
| 108 | wmb(); |
Dmitry Torokhov | 2d38849 | 2017-02-19 17:14:33 -0800 | [diff] [blame] | 109 | enable_irq(eeti->client->irq); |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 110 | } |
| 111 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 112 | static void eeti_ts_stop(struct eeti_ts *eeti) |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 113 | { |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 114 | eeti->running = false; |
| 115 | wmb(); |
Dmitry Torokhov | 2d38849 | 2017-02-19 17:14:33 -0800 | [diff] [blame] | 116 | disable_irq(eeti->client->irq); |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | static int eeti_ts_open(struct input_dev *dev) |
| 120 | { |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 121 | struct eeti_ts *eeti = input_get_drvdata(dev); |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 122 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 123 | eeti_ts_start(eeti); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 124 | |
| 125 | return 0; |
| 126 | } |
| 127 | |
| 128 | static void eeti_ts_close(struct input_dev *dev) |
| 129 | { |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 130 | struct eeti_ts *eeti = input_get_drvdata(dev); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 131 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 132 | eeti_ts_stop(eeti); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 133 | } |
| 134 | |
Bill Pemberton | 5298cc4 | 2012-11-23 21:38:25 -0800 | [diff] [blame] | 135 | static int eeti_ts_probe(struct i2c_client *client, |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 136 | const struct i2c_device_id *idp) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 137 | { |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 138 | struct device *dev = &client->dev; |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 139 | struct eeti_ts *eeti; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 140 | struct input_dev *input; |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 141 | int error; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 142 | |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 143 | /* |
| 144 | * In contrast to what's described in the datasheet, there seems |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 145 | * to be no way of probing the presence of that device using I2C |
| 146 | * commands. So we need to blindly believe it is there, and wait |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 147 | * for interrupts to occur. |
| 148 | */ |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 149 | |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 150 | eeti = devm_kzalloc(dev, sizeof(*eeti), GFP_KERNEL); |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 151 | if (!eeti) { |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 152 | dev_err(dev, "failed to allocate driver data\n"); |
Guenter Roeck | ad03ae4 | 2017-01-18 11:24:06 -0800 | [diff] [blame] | 153 | return -ENOMEM; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 154 | } |
| 155 | |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 156 | input = devm_input_allocate_device(dev); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 157 | if (!input) { |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 158 | dev_err(dev, "Failed to allocate input device.\n"); |
| 159 | return -ENOMEM; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 160 | } |
| 161 | |
Dmitry Torokhov | 42e02a6 | 2017-02-20 21:53:51 -0800 | [diff] [blame] | 162 | input_set_capability(input, EV_KEY, BTN_TOUCH); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 163 | |
| 164 | input_set_abs_params(input, ABS_X, 0, EETI_MAXVAL, 0, 0); |
| 165 | input_set_abs_params(input, ABS_Y, 0, EETI_MAXVAL, 0, 0); |
| 166 | input_set_abs_params(input, ABS_PRESSURE, 0, 0xff, 0, 0); |
| 167 | |
Daniel Mack | a114cbd | 2018-07-04 15:46:22 +0000 | [diff] [blame] | 168 | touchscreen_parse_properties(input, false, &eeti->props); |
| 169 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 170 | input->name = client->name; |
| 171 | input->id.bustype = BUS_I2C; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 172 | input->open = eeti_ts_open; |
| 173 | input->close = eeti_ts_close; |
| 174 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 175 | eeti->client = client; |
| 176 | eeti->input = input; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 177 | |
Dmitry Torokhov | d99caa4 | 2017-02-19 17:21:56 -0800 | [diff] [blame] | 178 | eeti->attn_gpio = devm_gpiod_get_optional(dev, "attn", GPIOD_IN); |
| 179 | if (IS_ERR(eeti->attn_gpio)) |
| 180 | return PTR_ERR(eeti->attn_gpio); |
Daniel Mack | 25a70e3 | 2009-08-12 00:50:09 -0700 | [diff] [blame] | 181 | |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 182 | i2c_set_clientdata(client, eeti); |
| 183 | input_set_drvdata(input, eeti); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 184 | |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 185 | error = devm_request_threaded_irq(dev, client->irq, |
| 186 | NULL, eeti_ts_isr, |
Dmitry Torokhov | d422be5 | 2017-02-19 16:22:13 -0800 | [diff] [blame] | 187 | IRQF_ONESHOT, |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 188 | client->name, eeti); |
Dmitry Torokhov | 6f9fab6 | 2017-02-17 15:54:22 -0800 | [diff] [blame] | 189 | if (error) { |
| 190 | dev_err(dev, "Unable to request touchscreen IRQ: %d\n", |
| 191 | error); |
| 192 | return error; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 193 | } |
| 194 | |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 195 | /* |
| 196 | * Disable the device for now. It will be enabled once the |
| 197 | * input device is opened. |
| 198 | */ |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 199 | eeti_ts_stop(eeti); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 200 | |
Dmitry Torokhov | 0378008 | 2017-02-19 17:23:47 -0800 | [diff] [blame] | 201 | error = input_register_device(input); |
| 202 | if (error) |
| 203 | return error; |
| 204 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 205 | return 0; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 206 | } |
| 207 | |
Jingoo Han | 02b6a58 | 2014-11-02 00:04:14 -0700 | [diff] [blame] | 208 | static int __maybe_unused eeti_ts_suspend(struct device *dev) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 209 | { |
Mark Brown | 85012ff | 2011-01-06 23:01:02 -0800 | [diff] [blame] | 210 | struct i2c_client *client = to_i2c_client(dev); |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 211 | struct eeti_ts *eeti = i2c_get_clientdata(client); |
| 212 | struct input_dev *input_dev = eeti->input; |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 213 | |
| 214 | mutex_lock(&input_dev->mutex); |
| 215 | |
| 216 | if (input_dev->users) |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 217 | eeti_ts_stop(eeti); |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 218 | |
| 219 | mutex_unlock(&input_dev->mutex); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 220 | |
| 221 | if (device_may_wakeup(&client->dev)) |
Dmitry Torokhov | 2d38849 | 2017-02-19 17:14:33 -0800 | [diff] [blame] | 222 | enable_irq_wake(client->irq); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 223 | |
| 224 | return 0; |
| 225 | } |
| 226 | |
Jingoo Han | 02b6a58 | 2014-11-02 00:04:14 -0700 | [diff] [blame] | 227 | static int __maybe_unused eeti_ts_resume(struct device *dev) |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 228 | { |
Mark Brown | 85012ff | 2011-01-06 23:01:02 -0800 | [diff] [blame] | 229 | struct i2c_client *client = to_i2c_client(dev); |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 230 | struct eeti_ts *eeti = i2c_get_clientdata(client); |
| 231 | struct input_dev *input_dev = eeti->input; |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 232 | |
| 233 | if (device_may_wakeup(&client->dev)) |
Dmitry Torokhov | 2d38849 | 2017-02-19 17:14:33 -0800 | [diff] [blame] | 234 | disable_irq_wake(client->irq); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 235 | |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 236 | mutex_lock(&input_dev->mutex); |
| 237 | |
| 238 | if (input_dev->users) |
Dmitry Torokhov | 720bebd | 2017-02-19 17:28:11 -0800 | [diff] [blame] | 239 | eeti_ts_start(eeti); |
Daniel Mack | 7fbef0d | 2010-04-19 00:42:16 -0700 | [diff] [blame] | 240 | |
| 241 | mutex_unlock(&input_dev->mutex); |
| 242 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 243 | return 0; |
| 244 | } |
Mark Brown | 85012ff | 2011-01-06 23:01:02 -0800 | [diff] [blame] | 245 | |
| 246 | static SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 247 | |
| 248 | static const struct i2c_device_id eeti_ts_id[] = { |
| 249 | { "eeti_ts", 0 }, |
| 250 | { } |
| 251 | }; |
| 252 | MODULE_DEVICE_TABLE(i2c, eeti_ts_id); |
| 253 | |
Daniel Mack | e32d7f1 | 2018-07-04 15:45:47 +0000 | [diff] [blame] | 254 | #ifdef CONFIG_OF |
| 255 | static const struct of_device_id of_eeti_ts_match[] = { |
| 256 | { .compatible = "eeti,exc3000-i2c", }, |
| 257 | { } |
| 258 | }; |
| 259 | #endif |
| 260 | |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 261 | static struct i2c_driver eeti_ts_driver = { |
| 262 | .driver = { |
| 263 | .name = "eeti_ts", |
Mark Brown | 85012ff | 2011-01-06 23:01:02 -0800 | [diff] [blame] | 264 | .pm = &eeti_ts_pm, |
Daniel Mack | e32d7f1 | 2018-07-04 15:45:47 +0000 | [diff] [blame] | 265 | .of_match_table = of_match_ptr(of_eeti_ts_match), |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 266 | }, |
| 267 | .probe = eeti_ts_probe, |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 268 | .id_table = eeti_ts_id, |
| 269 | }; |
| 270 | |
Axel Lin | 1b92c1c | 2012-03-16 23:05:41 -0700 | [diff] [blame] | 271 | module_i2c_driver(eeti_ts_driver); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 272 | |
| 273 | MODULE_DESCRIPTION("EETI Touchscreen driver"); |
Daniel Mack | fd8135b | 2018-07-04 15:46:55 +0000 | [diff] [blame] | 274 | MODULE_AUTHOR("Daniel Mack <daniel@zonque.org>"); |
Daniel Mack | 10494dc | 2009-05-18 16:10:39 -0700 | [diff] [blame] | 275 | MODULE_LICENSE("GPL"); |