Symbol: elo
drivers/input/touchscreen/elo.c
101
(elo->data[8] << 8) | elo->data[7]);
drivers/input/touchscreen/elo.c
102
input_report_key(dev, BTN_TOUCH, elo->data[2] & ELO10_TOUCH);
drivers/input/touchscreen/elo.c
104
} else if (elo->data[1] == ELO10_ACK_PACKET) {
drivers/input/touchscreen/elo.c
105
if (elo->data[2] == '0')
drivers/input/touchscreen/elo.c
106
elo->expected_packet = ELO10_TOUCH_PACKET;
drivers/input/touchscreen/elo.c
107
complete(&elo->cmd_done);
drivers/input/touchscreen/elo.c
109
memcpy(elo->response, &elo->data[1], ELO10_PACKET_LEN);
drivers/input/touchscreen/elo.c
110
elo->expected_packet = ELO10_ACK_PACKET;
drivers/input/touchscreen/elo.c
114
elo->csum += data;
drivers/input/touchscreen/elo.c
117
static void elo_process_data_6(struct elo *elo, unsigned char data)
drivers/input/touchscreen/elo.c
119
struct input_dev *dev = elo->dev;
drivers/input/touchscreen/elo.c
121
elo->data[elo->idx] = data;
drivers/input/touchscreen/elo.c
123
switch (elo->idx++) {
drivers/input/touchscreen/elo.c
127
elo->idx = 0;
drivers/input/touchscreen/elo.c
132
elo->idx = 0;
drivers/input/touchscreen/elo.c
137
elo->idx = 0;
drivers/input/touchscreen/elo.c
142
elo->idx = 0;
drivers/input/touchscreen/elo.c
146
input_report_abs(dev, ABS_X, ((elo->data[0] & 0x3f) << 6) | (elo->data[1] & 0x3f));
drivers/input/touchscreen/elo.c
147
input_report_abs(dev, ABS_Y, ((elo->data[2] & 0x3f) << 6) | (elo->data[3] & 0x3f));
drivers/input/touchscreen/elo.c
149
if (elo->id == 2) {
drivers/input/touchscreen/elo.c
152
elo->idx = 0;
drivers/input/touchscreen/elo.c
160
elo->idx = 0;
drivers/input/touchscreen/elo.c
166
input_report_abs(dev, ABS_PRESSURE, elo->data[5]);
drivers/input/touchscreen/elo.c
167
input_report_key(dev, BTN_TOUCH, !!elo->data[5]);
drivers/input/touchscreen/elo.c
170
elo->idx = 0;
drivers/input/touchscreen/elo.c
175
static void elo_process_data_3(struct elo *elo, unsigned char data)
drivers/input/touchscreen/elo.c
177
struct input_dev *dev = elo->dev;
drivers/input/touchscreen/elo.c
179
elo->data[elo->idx] = data;
drivers/input/touchscreen/elo.c
181
switch (elo->idx++) {
drivers/input/touchscreen/elo.c
185
elo->idx = 0;
drivers/input/touchscreen/elo.c
188
input_report_key(dev, BTN_TOUCH, !(elo->data[1] & 0x80));
drivers/input/touchscreen/elo.c
189
input_report_abs(dev, ABS_X, elo->data[1]);
drivers/input/touchscreen/elo.c
190
input_report_abs(dev, ABS_Y, elo->data[2]);
drivers/input/touchscreen/elo.c
192
elo->idx = 0;
drivers/input/touchscreen/elo.c
200
struct elo *elo = serio_get_drvdata(serio);
drivers/input/touchscreen/elo.c
202
switch (elo->id) {
drivers/input/touchscreen/elo.c
204
elo_process_data_10(elo, data);
drivers/input/touchscreen/elo.c
209
elo_process_data_6(elo, data);
drivers/input/touchscreen/elo.c
213
elo_process_data_3(elo, data);
drivers/input/touchscreen/elo.c
220
static int elo_command_10(struct elo *elo, unsigned char *packet)
drivers/input/touchscreen/elo.c
226
mutex_lock(&elo->cmd_mutex);
drivers/input/touchscreen/elo.c
228
scoped_guard(serio_pause_rx, elo->serio) {
drivers/input/touchscreen/elo.c
229
elo->expected_packet = toupper(packet[0]);
drivers/input/touchscreen/elo.c
230
init_completion(&elo->cmd_done);
drivers/input/touchscreen/elo.c
233
if (serio_write(elo->serio, ELO10_LEAD_BYTE))
drivers/input/touchscreen/elo.c
238
if (serio_write(elo->serio, packet[i]))
drivers/input/touchscreen/elo.c
242
if (serio_write(elo->serio, csum))
drivers/input/touchscreen/elo.c
245
wait_for_completion_timeout(&elo->cmd_done, HZ);
drivers/input/touchscreen/elo.c
247
if (elo->expected_packet == ELO10_TOUCH_PACKET) {
drivers/input/touchscreen/elo.c
249
memcpy(packet, elo->response, ELO10_PACKET_LEN);
drivers/input/touchscreen/elo.c
254
mutex_unlock(&elo->cmd_mutex);
drivers/input/touchscreen/elo.c
258
static int elo_setup_10(struct elo *elo)
drivers/input/touchscreen/elo.c
261
struct input_dev *dev = elo->dev;
drivers/input/touchscreen/elo.c
264
if (elo_command_10(elo, packet))
drivers/input/touchscreen/elo.c
274
dev_info(&elo->serio->dev,
drivers/input/touchscreen/elo.c
288
struct elo *elo = serio_get_drvdata(serio);
drivers/input/touchscreen/elo.c
290
input_get_device(elo->dev);
drivers/input/touchscreen/elo.c
291
input_unregister_device(elo->dev);
drivers/input/touchscreen/elo.c
294
input_put_device(elo->dev);
drivers/input/touchscreen/elo.c
295
kfree(elo);
drivers/input/touchscreen/elo.c
306
struct elo *elo;
drivers/input/touchscreen/elo.c
310
elo = kzalloc_obj(*elo);
drivers/input/touchscreen/elo.c
312
if (!elo || !input_dev) {
drivers/input/touchscreen/elo.c
317
elo->serio = serio;
drivers/input/touchscreen/elo.c
318
elo->id = serio->id.id;
drivers/input/touchscreen/elo.c
319
elo->dev = input_dev;
drivers/input/touchscreen/elo.c
320
elo->expected_packet = ELO10_TOUCH_PACKET;
drivers/input/touchscreen/elo.c
321
mutex_init(&elo->cmd_mutex);
drivers/input/touchscreen/elo.c
322
init_completion(&elo->cmd_done);
drivers/input/touchscreen/elo.c
323
scnprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys);
drivers/input/touchscreen/elo.c
326
input_dev->phys = elo->phys;
drivers/input/touchscreen/elo.c
329
input_dev->id.product = elo->id;
drivers/input/touchscreen/elo.c
336
serio_set_drvdata(serio, elo);
drivers/input/touchscreen/elo.c
341
switch (elo->id) {
drivers/input/touchscreen/elo.c
344
if (elo_setup_10(elo)) {
drivers/input/touchscreen/elo.c
366
err = input_register_device(elo->dev);
drivers/input/touchscreen/elo.c
375
kfree(elo);
drivers/input/touchscreen/elo.c
65
static void elo_process_data_10(struct elo *elo, unsigned char data)
drivers/input/touchscreen/elo.c
67
struct input_dev *dev = elo->dev;
drivers/input/touchscreen/elo.c
69
elo->data[elo->idx] = data;
drivers/input/touchscreen/elo.c
71
switch (elo->idx++) {
drivers/input/touchscreen/elo.c
73
elo->csum = 0xaa;
drivers/input/touchscreen/elo.c
75
dev_dbg(&elo->serio->dev,
drivers/input/touchscreen/elo.c
77
elo->idx = 0;
drivers/input/touchscreen/elo.c
82
elo->idx = 0;
drivers/input/touchscreen/elo.c
83
if (data != elo->csum) {
drivers/input/touchscreen/elo.c
84
dev_dbg(&elo->serio->dev,
drivers/input/touchscreen/elo.c
86
data, elo->csum);
drivers/input/touchscreen/elo.c
89
if (elo->data[1] != elo->expected_packet) {
drivers/input/touchscreen/elo.c
90
if (elo->data[1] != ELO10_TOUCH_PACKET)
drivers/input/touchscreen/elo.c
91
dev_dbg(&elo->serio->dev,
drivers/input/touchscreen/elo.c
93
elo->data[1]);
drivers/input/touchscreen/elo.c
96
if (likely(elo->data[1] == ELO10_TOUCH_PACKET)) {
drivers/input/touchscreen/elo.c
97
input_report_abs(dev, ABS_X, (elo->data[4] << 8) | elo->data[3]);
drivers/input/touchscreen/elo.c
98
input_report_abs(dev, ABS_Y, (elo->data[6] << 8) | elo->data[5]);
drivers/input/touchscreen/elo.c
99
if (elo->data[2] & ELO10_PRESSURE)