Lines Matching +full:touchscreen +full:- +full:x +full:- +full:mm
1 // SPDX-License-Identifier: GPL-2.0-only
8 * This code is partly based on hid-multitouch.c:
10 * Copyright (c) 2010-2012 Stephane Chatty <chatty@enac.fr>
11 * Copyright (c) 2010-2012 Benjamin Tissoires <benjamin.tissoires@gmail.com>
12 * Copyright (c) 2010-2012 Ecole Nationale de l'Aviation Civile, France
14 * This code is partly based on i2c-hid.c:
36 #include <linux/input/touchscreen.h>
49 #define ELAN_TS_RESOLUTION(n, m) (((n) - 1) * (m))
89 /* Header (4 bytes) plus 3 full 10-finger packets */
94 /* FW read command, 0x53 0x?? 0x0, 0x01 */
106 /* FW write command, 0x54 0x?? 0x0, 0x01 */
150 /* struct elants_data - represents state of Elan touchscreen device */
166 unsigned int x_res; /* resolution in units/mm */
200 ret = -EIO; in elants_i2c_send()
202 dev_err(&client->dev, "%s failed (%*ph): %d\n", in elants_i2c_send()
217 ret = -EIO; in elants_i2c_read()
219 dev_err(&client->dev, "%s failed: %d\n", __func__, ret); in elants_i2c_read()
247 dev_err(&client->dev, "(%s): invalid command: %*ph\n", in elants_i2c_execute_command()
249 return -EINVAL; in elants_i2c_execute_command()
253 msgs[0].addr = client->addr; in elants_i2c_execute_command()
254 msgs[0].flags = client->flags & I2C_M_TEN; in elants_i2c_execute_command()
258 msgs[1].addr = client->addr; in elants_i2c_execute_command()
259 msgs[1].flags = (client->flags & I2C_M_TEN) | I2C_M_RD; in elants_i2c_execute_command()
264 ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in elants_i2c_execute_command()
266 if (--retries > 0) { in elants_i2c_execute_command()
267 dev_dbg(&client->dev, in elants_i2c_execute_command()
273 dev_err(&client->dev, in elants_i2c_execute_command()
281 if (--retries > 0) { in elants_i2c_execute_command()
282 dev_dbg(&client->dev, in elants_i2c_execute_command()
288 dev_err(&client->dev, in elants_i2c_execute_command()
291 return -EIO; in elants_i2c_execute_command()
300 struct i2c_client *client = ts->client; in elants_i2c_calibrate()
306 disable_irq(client->irq); in elants_i2c_calibrate()
308 ts->state = ELAN_WAIT_RECALIBRATION; in elants_i2c_calibrate()
309 reinit_completion(&ts->cmd_done); in elants_i2c_calibrate()
314 enable_irq(client->irq); in elants_i2c_calibrate()
316 ret = wait_for_completion_interruptible_timeout(&ts->cmd_done, in elants_i2c_calibrate()
319 ts->state = ELAN_STATE_NORMAL; in elants_i2c_calibrate()
322 error = ret < 0 ? ret : -ETIMEDOUT; in elants_i2c_calibrate()
323 dev_err(&client->dev, in elants_i2c_calibrate()
329 if (memcmp(rek_resp, ts->cmd_resp, sizeof(rek_resp))) { in elants_i2c_calibrate()
330 dev_err(&client->dev, in elants_i2c_calibrate()
332 (int)sizeof(ts->cmd_resp), ts->cmd_resp); in elants_i2c_calibrate()
333 return -EINVAL; in elants_i2c_calibrate()
347 dev_err(&client->dev, "software reset failed: %d\n", error); in elants_i2c_sw_reset()
367 struct i2c_client *client = ts->client; in elants_i2c_query_hw_version()
373 while (retry_cnt--) { in elants_i2c_query_hw_version()
380 ts->hw_version = elants_i2c_parse_version(resp); in elants_i2c_query_hw_version()
381 if (ts->hw_version != 0xffff) in elants_i2c_query_hw_version()
385 dev_err(&client->dev, "Invalid fw id: %#04x\n", ts->hw_version); in elants_i2c_query_hw_version()
387 return -EINVAL; in elants_i2c_query_hw_version()
392 struct i2c_client *client = ts->client; in elants_i2c_query_fw_version()
398 while (retry_cnt--) { in elants_i2c_query_fw_version()
405 ts->fw_version = elants_i2c_parse_version(resp); in elants_i2c_query_fw_version()
406 if (ts->fw_version != 0x0000 && ts->fw_version != 0xffff) in elants_i2c_query_fw_version()
409 dev_dbg(&client->dev, "(read fw version) resp %*phC\n", in elants_i2c_query_fw_version()
413 dev_err(&client->dev, "Invalid fw ver: %#04x\n", ts->fw_version); in elants_i2c_query_fw_version()
415 return -EINVAL; in elants_i2c_query_fw_version()
420 struct i2c_client *client = ts->client; in elants_i2c_query_test_version()
430 dev_err(&client->dev, "Failed to read test version\n"); in elants_i2c_query_test_version()
435 ts->test_version = version >> 8; in elants_i2c_query_test_version()
436 ts->solution_version = version & 0xff; in elants_i2c_query_test_version()
443 struct i2c_client *client = ts->client; in elants_i2c_query_bc_version()
456 ts->bc_version = version >> 8; in elants_i2c_query_bc_version()
457 ts->iap_version = version & 0xff; in elants_i2c_query_bc_version()
464 struct i2c_client *client = ts->client; in elants_i2c_query_ts_info_ektf()
475 /* Get X/Y size in mm */ in elants_i2c_query_ts_info_ektf()
479 "get X size"); in elants_i2c_query_ts_info_ektf()
494 dev_dbg(&client->dev, "phy_x=%d, phy_y=%d\n", phy_x, phy_y); in elants_i2c_query_ts_info_ektf()
496 ts->phy_x = phy_x; in elants_i2c_query_ts_info_ektf()
497 ts->phy_y = phy_y; in elants_i2c_query_ts_info_ektf()
500 ts->x_max = 2240 - 1; in elants_i2c_query_ts_info_ektf()
501 ts->y_max = 1408 - 1; in elants_i2c_query_ts_info_ektf()
508 struct i2c_client *client = ts->client; in elants_i2c_query_ts_info_ekth()
538 ts->major_res = resp[16]; in elants_i2c_query_ts_info_ekth()
569 dev_dbg(&client->dev, "phy_x=%d, phy_y=%d\n", phy_x, phy_y); in elants_i2c_query_ts_info_ekth()
572 dev_warn(&client->dev, in elants_i2c_query_ts_info_ekth()
577 ts->x_max = ELAN_TS_RESOLUTION(rows, osr); in elants_i2c_query_ts_info_ekth()
578 ts->x_res = DIV_ROUND_CLOSEST(ts->x_max, phy_x); in elants_i2c_query_ts_info_ekth()
579 ts->y_max = ELAN_TS_RESOLUTION(cols, osr); in elants_i2c_query_ts_info_ekth()
580 ts->y_res = DIV_ROUND_CLOSEST(ts->y_max, phy_y); in elants_i2c_query_ts_info_ekth()
581 ts->phy_x = phy_x; in elants_i2c_query_ts_info_ekth()
582 ts->phy_y = phy_y; in elants_i2c_query_ts_info_ekth()
595 dev_err(&client->dev, "boot failed: %d\n", error); in elants_i2c_fastboot()
599 dev_dbg(&client->dev, "boot success -- 0x%x\n", client->addr); in elants_i2c_fastboot()
605 struct i2c_client *client = ts->client; in elants_i2c_initialize()
615 if (retry_cnt < MAX_RETRIES - 1) in elants_i2c_initialize()
622 if (retry_cnt < MAX_RETRIES - 1) in elants_i2c_initialize()
631 dev_err(&client->dev, in elants_i2c_initialize()
634 ts->iap_mode = ELAN_IAP_OPERATIONAL; in elants_i2c_initialize()
641 error = -EIO; in elants_i2c_initialize()
644 error = -EINVAL; in elants_i2c_initialize()
645 dev_err(&client->dev, in elants_i2c_initialize()
663 switch (ts->chip_id) { in elants_i2c_initialize()
677 ts->iap_mode = ELAN_IAP_RECOVERY; in elants_i2c_initialize()
697 dev_err(&client->dev, in elants_i2c_fw_write_page()
704 dev_err(&client->dev, in elants_i2c_fw_write_page()
712 error = -EIO; in elants_i2c_fw_write_page()
713 dev_err(&client->dev, in elants_i2c_fw_write_page()
714 "IAP Get Ack Error [%02x:%02x]\n", in elants_i2c_fw_write_page()
724 struct i2c_client *client = ts->client; in elants_i2c_validate_remark_id()
740 fw_remark_id = get_unaligned_le16(&fw->data[fw->size - 4]); in elants_i2c_validate_remark_id()
743 dev_err(&client->dev, in elants_i2c_validate_remark_id()
744 "Remark ID Mismatched: ts_remark_id=0x%04x, fw_remark_id=0x%04x.\n", in elants_i2c_validate_remark_id()
746 return -EINVAL; in elants_i2c_validate_remark_id()
754 struct i2c_client *client = ts->client; in elants_i2c_should_check_remark_id()
755 const u8 bootcode_version = ts->iap_version; in elants_i2c_should_check_remark_id()
770 dev_dbg(&client->dev, in elants_i2c_should_check_remark_id()
771 "eKTH3900/eKTH5312(0x%02x) are not support remark id\n", in elants_i2c_should_check_remark_id()
800 dev_dbg(&client->dev, "Recovery mode procedure\n"); in elants_i2c_do_update_firmware()
810 dev_err(&client->dev, "failed to enter IAP mode: %d\n", in elants_i2c_do_update_firmware()
816 dev_dbg(&client->dev, "Normal IAP procedure\n"); in elants_i2c_do_update_firmware()
821 dev_err(&client->dev, "Failed close idle: %d\n", error); in elants_i2c_do_update_firmware()
835 dev_err(&client->dev, "failed to enter IAP mode: %d\n", in elants_i2c_do_update_firmware()
846 dev_err(&client->dev, in elants_i2c_do_update_firmware()
853 dev_err(&client->dev, in elants_i2c_do_update_firmware()
856 return -EIO; in elants_i2c_do_update_firmware()
859 dev_info(&client->dev, "successfully entered IAP mode"); in elants_i2c_do_update_firmware()
861 send_id = client->addr; in elants_i2c_do_update_firmware()
864 dev_err(&client->dev, "sending dummy byte failed: %d\n", in elants_i2c_do_update_firmware()
870 error = elants_i2c_send(client, fw->data, ELAN_FW_PAGESIZE); in elants_i2c_do_update_firmware()
872 dev_err(&client->dev, "clearing of the last page failed: %d\n", in elants_i2c_do_update_firmware()
879 dev_err(&client->dev, in elants_i2c_do_update_firmware()
885 n_fw_pages = fw->size / ELAN_FW_PAGESIZE; in elants_i2c_do_update_firmware()
886 dev_dbg(&client->dev, "IAP Pages = %d\n", n_fw_pages); in elants_i2c_do_update_firmware()
890 fw->data + page * ELAN_FW_PAGESIZE); in elants_i2c_do_update_firmware()
892 dev_err(&client->dev, in elants_i2c_do_update_firmware()
902 dev_info(&client->dev, "firmware update completed\n"); in elants_i2c_do_update_firmware()
908 struct i2c_client *client = ts->client; in elants_i2c_fw_update()
913 fw_name = kasprintf(GFP_KERNEL, "elants_i2c_%04x.bin", ts->hw_version); in elants_i2c_fw_update()
915 return -ENOMEM; in elants_i2c_fw_update()
917 dev_info(&client->dev, "requesting fw name = %s\n", fw_name); in elants_i2c_fw_update()
918 error = request_firmware(&fw, fw_name, &client->dev); in elants_i2c_fw_update()
921 dev_err(&client->dev, "failed to request firmware: %d\n", in elants_i2c_fw_update()
926 if (fw->size % ELAN_FW_PAGESIZE) { in elants_i2c_fw_update()
927 dev_err(&client->dev, "invalid firmware length: %zu\n", in elants_i2c_fw_update()
928 fw->size); in elants_i2c_fw_update()
929 error = -EINVAL; in elants_i2c_fw_update()
933 disable_irq(client->irq); in elants_i2c_fw_update()
936 ts->iap_mode == ELAN_IAP_RECOVERY); in elants_i2c_fw_update()
938 dev_err(&client->dev, "firmware update failed: %d\n", error); in elants_i2c_fw_update()
939 ts->iap_mode = ELAN_IAP_RECOVERY; in elants_i2c_fw_update()
945 dev_err(&client->dev, in elants_i2c_fw_update()
948 ts->iap_mode = ELAN_IAP_RECOVERY; in elants_i2c_fw_update()
952 ts->iap_mode = ELAN_IAP_OPERATIONAL; in elants_i2c_fw_update()
955 ts->state = ELAN_STATE_NORMAL; in elants_i2c_fw_update()
956 enable_irq(client->irq); in elants_i2c_fw_update()
973 struct input_dev *input = ts->input; in elants_i2c_mt_event()
983 dev_dbg(&ts->client->dev, in elants_i2c_mt_event()
984 "n_fingers: %u, state: %04x\n", n_fingers, finger_state); in elants_i2c_mt_event()
992 unsigned int x, y, p, w; in elants_i2c_mt_event() local
996 x = (((u16)pos[0] & 0xf0) << 4) | pos[1]; in elants_i2c_mt_event()
1000 * eKTF3624 may have use "old" touch-report format, in elants_i2c_mt_event()
1006 ts->chip_id == EKTF3624) { in elants_i2c_mt_event()
1017 dev_dbg(&ts->client->dev, "i=%d x=%d y=%d p=%d w=%d\n", in elants_i2c_mt_event()
1018 i, x, y, p, w); in elants_i2c_mt_event()
1022 touchscreen_report_pos(input, &ts->prop, x, y, true); in elants_i2c_mt_event()
1026 n_fingers--; in elants_i2c_mt_event()
1053 dev_warn(&ts->client->dev, in elants_i2c_event()
1054 "%s: invalid checksum for packet %02x: %02x vs. %02x\n", in elants_i2c_event()
1058 dev_warn(&ts->client->dev, in elants_i2c_event()
1059 "%s: unknown packet type: %02x\n", in elants_i2c_event()
1069 struct i2c_client *client = ts->client; in elants_i2c_irq()
1074 len = i2c_master_recv_dmasafe(client, ts->buf, sizeof(ts->buf)); in elants_i2c_irq()
1076 dev_err(&client->dev, "%s: failed to read data: %d\n", in elants_i2c_irq()
1081 dev_dbg(&client->dev, "%s: packet %*ph\n", in elants_i2c_irq()
1082 __func__, HEADER_SIZE, ts->buf); in elants_i2c_irq()
1084 switch (ts->state) { in elants_i2c_irq()
1086 if (ts->buf[FW_HDR_TYPE] == CMD_HEADER_REK) { in elants_i2c_irq()
1087 memcpy(ts->cmd_resp, ts->buf, sizeof(ts->cmd_resp)); in elants_i2c_irq()
1088 complete(&ts->cmd_done); in elants_i2c_irq()
1089 ts->state = ELAN_STATE_NORMAL; in elants_i2c_irq()
1094 if (ts->buf[FW_HDR_TYPE] != QUEUE_HEADER_NORMAL) in elants_i2c_irq()
1097 ts->state = ELAN_STATE_NORMAL; in elants_i2c_irq()
1102 switch (ts->buf[FW_HDR_TYPE]) { in elants_i2c_irq()
1108 if (memcmp(ts->buf, wait_packet, sizeof(wait_packet))) { in elants_i2c_irq()
1109 dev_err(&client->dev, in elants_i2c_irq()
1111 HEADER_SIZE, ts->buf); in elants_i2c_irq()
1113 ts->state = ELAN_WAIT_QUEUE_HEADER; in elants_i2c_irq()
1119 elants_i2c_event(ts, &ts->buf[HEADER_SIZE], in elants_i2c_irq()
1120 ts->buf[FW_HDR_LENGTH]); in elants_i2c_irq()
1132 if (ts->chip_id != EKTF3624) in elants_i2c_irq()
1138 report_count = ts->buf[FW_HDR_COUNT]; in elants_i2c_irq()
1140 dev_err(&client->dev, in elants_i2c_irq()
1142 HEADER_SIZE, ts->buf); in elants_i2c_irq()
1146 report_len = ts->buf[FW_HDR_LENGTH] / report_count; in elants_i2c_irq()
1149 ts->chip_id == EKTF3624) { in elants_i2c_irq()
1150 dev_dbg_once(&client->dev, in elants_i2c_irq()
1153 dev_err(&client->dev, in elants_i2c_irq()
1155 HEADER_SIZE, ts->buf); in elants_i2c_irq()
1160 u8 *buf = ts->buf + HEADER_SIZE + in elants_i2c_irq()
1167 dev_err(&client->dev, "unknown packet %*ph\n", in elants_i2c_irq()
1168 HEADER_SIZE, ts->buf); in elants_i2c_irq()
1189 error = mutex_lock_interruptible(&ts->sysfs_mutex); in calibrate_store()
1195 mutex_unlock(&ts->sysfs_mutex); in calibrate_store()
1207 error = mutex_lock_interruptible(&ts->sysfs_mutex); in write_update_fw()
1214 mutex_unlock(&ts->sysfs_mutex); in write_update_fw()
1225 ts->iap_mode == ELAN_IAP_OPERATIONAL ? in show_iap_mode()
1245 return sprintf(buf, "0x%04x\n", rek_count); in show_calibration_count()
1260 sizeof(((struct elants_data *)NULL)->_field)
1280 u8 *field = (u8 *)((char *)ts + attr->field_offset); in elants_version_attribute_show()
1284 if (attr->field_size == 1) { in elants_version_attribute_show()
1292 return sprintf(buf, "%0*x\n", fmt_size, val); in elants_version_attribute_show()
1326 if (IS_ERR_OR_NULL(ts->reset_gpio)) in elants_i2c_power_on()
1329 error = regulator_enable(ts->vcc33); in elants_i2c_power_on()
1331 dev_err(&ts->client->dev, in elants_i2c_power_on()
1337 error = regulator_enable(ts->vccio); in elants_i2c_power_on()
1339 dev_err(&ts->client->dev, in elants_i2c_power_on()
1342 regulator_disable(ts->vcc33); in elants_i2c_power_on()
1352 gpiod_set_value_cansleep(ts->reset_gpio, 0); in elants_i2c_power_on()
1363 if (!IS_ERR_OR_NULL(ts->reset_gpio)) { in elants_i2c_power_off()
1368 gpiod_set_value_cansleep(ts->reset_gpio, 1); in elants_i2c_power_off()
1369 regulator_disable(ts->vccio); in elants_i2c_power_off()
1370 regulator_disable(ts->vcc33); in elants_i2c_power_off()
1415 /* Don't bind to i2c-hid compatible devices, these are handled by the i2c-hid drv. */ in elants_i2c_probe()
1416 if (elants_acpi_is_hid_device(&client->dev)) { in elants_i2c_probe()
1417 dev_warn(&client->dev, "This device appears to be an I2C-HID device, not binding\n"); in elants_i2c_probe()
1418 return -ENODEV; in elants_i2c_probe()
1421 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in elants_i2c_probe()
1422 dev_err(&client->dev, "I2C check functionality error\n"); in elants_i2c_probe()
1423 return -ENXIO; in elants_i2c_probe()
1426 ts = devm_kzalloc(&client->dev, sizeof(struct elants_data), GFP_KERNEL); in elants_i2c_probe()
1428 return -ENOMEM; in elants_i2c_probe()
1430 mutex_init(&ts->sysfs_mutex); in elants_i2c_probe()
1431 init_completion(&ts->cmd_done); in elants_i2c_probe()
1433 ts->client = client; in elants_i2c_probe()
1434 ts->chip_id = (enum elants_chip_id)(uintptr_t)device_get_match_data(&client->dev); in elants_i2c_probe()
1437 ts->vcc33 = devm_regulator_get(&client->dev, "vcc33"); in elants_i2c_probe()
1438 if (IS_ERR(ts->vcc33)) in elants_i2c_probe()
1439 return dev_err_probe(&client->dev, PTR_ERR(ts->vcc33), in elants_i2c_probe()
1442 ts->vccio = devm_regulator_get(&client->dev, "vccio"); in elants_i2c_probe()
1443 if (IS_ERR(ts->vccio)) in elants_i2c_probe()
1444 return dev_err_probe(&client->dev, PTR_ERR(ts->vccio), in elants_i2c_probe()
1447 ts->reset_gpio = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH); in elants_i2c_probe()
1448 if (IS_ERR(ts->reset_gpio)) { in elants_i2c_probe()
1449 error = PTR_ERR(ts->reset_gpio); in elants_i2c_probe()
1451 if (error == -EPROBE_DEFER) in elants_i2c_probe()
1454 if (error != -ENOENT && error != -ENOSYS) { in elants_i2c_probe()
1455 dev_err(&client->dev, in elants_i2c_probe()
1461 ts->keep_power_in_suspend = true; in elants_i2c_probe()
1468 error = devm_add_action_or_reset(&client->dev, in elants_i2c_probe()
1471 dev_err(&client->dev, in elants_i2c_probe()
1477 if (i2c_smbus_xfer(client->adapter, client->addr, 0, in elants_i2c_probe()
1479 dev_err(&client->dev, "nothing at this address\n"); in elants_i2c_probe()
1480 return -ENXIO; in elants_i2c_probe()
1485 dev_err(&client->dev, "failed to initialize: %d\n", error); in elants_i2c_probe()
1489 ts->input = devm_input_allocate_device(&client->dev); in elants_i2c_probe()
1490 if (!ts->input) { in elants_i2c_probe()
1491 dev_err(&client->dev, "Failed to allocate input device\n"); in elants_i2c_probe()
1492 return -ENOMEM; in elants_i2c_probe()
1495 ts->input->name = "Elan Touchscreen"; in elants_i2c_probe()
1496 ts->input->id.bustype = BUS_I2C; in elants_i2c_probe()
1500 input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, ts->x_max, 0, 0); in elants_i2c_probe()
1501 input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, ts->y_max, 0, 0); in elants_i2c_probe()
1502 input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); in elants_i2c_probe()
1503 input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0); in elants_i2c_probe()
1504 input_set_abs_params(ts->input, ABS_MT_TOOL_TYPE, in elants_i2c_probe()
1507 touchscreen_parse_properties(ts->input, true, &ts->prop); in elants_i2c_probe()
1509 if (ts->chip_id == EKTF3624 && ts->phy_x && ts->phy_y) { in elants_i2c_probe()
1511 ts->x_res = DIV_ROUND_CLOSEST(ts->prop.max_x, ts->phy_x); in elants_i2c_probe()
1512 ts->y_res = DIV_ROUND_CLOSEST(ts->prop.max_y, ts->phy_y); in elants_i2c_probe()
1515 input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res); in elants_i2c_probe()
1516 input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res); in elants_i2c_probe()
1517 input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res); in elants_i2c_probe()
1519 error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM, in elants_i2c_probe()
1522 dev_err(&client->dev, in elants_i2c_probe()
1527 error = input_register_device(ts->input); in elants_i2c_probe()
1529 dev_err(&client->dev, in elants_i2c_probe()
1539 irqflags = irq_get_trigger_type(client->irq); in elants_i2c_probe()
1543 error = devm_request_threaded_irq(&client->dev, client->irq, in elants_i2c_probe()
1546 client->name, ts); in elants_i2c_probe()
1548 dev_err(&client->dev, "Failed to register interrupt\n"); in elants_i2c_probe()
1566 if (ts->iap_mode != ELAN_IAP_OPERATIONAL) in elants_i2c_suspend()
1567 return -EBUSY; in elants_i2c_suspend()
1569 disable_irq(client->irq); in elants_i2c_suspend()
1577 } else if (ts->keep_power_in_suspend) { in elants_i2c_suspend()
1584 dev_err(&client->dev, in elants_i2c_suspend()
1606 } else if (ts->keep_power_in_suspend) { in elants_i2c_resume()
1613 dev_err(&client->dev, in elants_i2c_resume()
1621 ts->state = ELAN_STATE_NORMAL; in elants_i2c_resume()
1622 enable_irq(client->irq); in elants_i2c_resume()
1670 MODULE_DESCRIPTION("Elan I2c Touchscreen driver");