Lines Matching full:error
98 int error; in ilitek_i2c_write_and_read() local
116 error = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in ilitek_i2c_write_and_read()
117 if (error < 0) in ilitek_i2c_write_and_read()
118 return error; in ilitek_i2c_write_and_read()
121 error = i2c_transfer(client->adapter, msgs, 1); in ilitek_i2c_write_and_read()
122 if (error < 0) in ilitek_i2c_write_and_read()
123 return error; in ilitek_i2c_write_and_read()
129 error = i2c_transfer(client->adapter, msgs + 1, 1); in ilitek_i2c_write_and_read()
130 if (error < 0) in ilitek_i2c_write_and_read()
131 return error; in ilitek_i2c_write_and_read()
152 int error = 0; in ilitek_process_and_report_v6() local
162 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, buf, 64); in ilitek_process_and_report_v6()
163 if (error) { in ilitek_process_and_report_v6()
164 dev_err(dev, "get touch info failed, err:%d\n", error); in ilitek_process_and_report_v6()
165 return error; in ilitek_process_and_report_v6()
182 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, in ilitek_process_and_report_v6()
184 if (error) { in ilitek_process_and_report_v6()
186 count, error); in ilitek_process_and_report_v6()
187 return error; in ilitek_process_and_report_v6()
223 int error; in api_protocol_set_cmd() local
229 error = ts->ptl_cb_func[idx].func(ts, cmd, inbuf, outbuf); in api_protocol_set_cmd()
230 if (error) in api_protocol_set_cmd()
231 return error; in api_protocol_set_cmd()
239 int error; in api_protocol_get_ptl_ver() local
243 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 3); in api_protocol_get_ptl_ver()
244 if (error) in api_protocol_get_ptl_ver()
245 return error; in api_protocol_get_ptl_ver()
256 int error; in api_protocol_get_mcu_ver() local
260 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 32); in api_protocol_get_mcu_ver()
261 if (error) in api_protocol_get_mcu_ver()
262 return error; in api_protocol_get_mcu_ver()
274 int error; in api_protocol_get_fw_ver() local
278 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_fw_ver()
279 if (error) in api_protocol_get_fw_ver()
280 return error; in api_protocol_get_fw_ver()
290 int error; in api_protocol_get_scrn_res() local
294 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_scrn_res()
295 if (error) in api_protocol_get_scrn_res()
296 return error; in api_protocol_get_scrn_res()
309 int error; in api_protocol_get_tp_res() local
313 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 15); in api_protocol_get_tp_res()
314 if (error) in api_protocol_get_tp_res()
315 return error; in api_protocol_get_tp_res()
330 int error; in api_protocol_get_ic_mode() local
334 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 2); in api_protocol_get_ic_mode()
335 if (error) in api_protocol_get_ic_mode()
336 return error; in api_protocol_get_ic_mode()
409 int error; in ilitek_protocol_init() local
415 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_protocol_init()
416 if (error) in ilitek_protocol_init()
417 return error; in ilitek_protocol_init()
431 int error; in ilitek_read_tp_info() local
433 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_read_tp_info()
434 if (error) in ilitek_read_tp_info()
435 return error; in ilitek_read_tp_info()
437 error = api_protocol_set_cmd(ts, GET_MCU_VER, NULL, outbuf); in ilitek_read_tp_info()
438 if (error) in ilitek_read_tp_info()
439 return error; in ilitek_read_tp_info()
441 error = api_protocol_set_cmd(ts, GET_FW_VER, NULL, outbuf); in ilitek_read_tp_info()
442 if (error) in ilitek_read_tp_info()
443 return error; in ilitek_read_tp_info()
446 error = api_protocol_set_cmd(ts, GET_SCRN_RES, NULL, in ilitek_read_tp_info()
448 if (error) in ilitek_read_tp_info()
449 return error; in ilitek_read_tp_info()
452 error = api_protocol_set_cmd(ts, GET_TP_RES, NULL, outbuf); in ilitek_read_tp_info()
453 if (error) in ilitek_read_tp_info()
454 return error; in ilitek_read_tp_info()
456 error = api_protocol_set_cmd(ts, GET_IC_MODE, NULL, outbuf); in ilitek_read_tp_info()
457 if (error) in ilitek_read_tp_info()
458 return error; in ilitek_read_tp_info()
465 int error; in ilitek_input_dev_init() local
485 error = input_mt_init_slots(input, ts->max_tp, in ilitek_input_dev_init()
487 if (error) { in ilitek_input_dev_init()
488 dev_err(dev, "initialize MT slots failed, err:%d\n", error); in ilitek_input_dev_init()
489 return error; in ilitek_input_dev_init()
492 error = input_register_device(input); in ilitek_input_dev_init()
493 if (error) { in ilitek_input_dev_init()
494 dev_err(dev, "register input device failed, err:%d\n", error); in ilitek_input_dev_init()
495 return error; in ilitek_input_dev_init()
504 int error; in ilitek_i2c_isr() local
506 error = ilitek_process_and_report_v6(ts); in ilitek_i2c_isr()
507 if (error < 0) { in ilitek_i2c_isr()
508 dev_err(&ts->client->dev, "[%s] err:%d\n", __func__, error); in ilitek_i2c_isr()
555 int error; in ilitek_ts_i2c_probe() local
571 error = PTR_ERR(ts->reset_gpio); in ilitek_ts_i2c_probe()
572 dev_err(dev, "request gpiod failed: %d", error); in ilitek_ts_i2c_probe()
573 return error; in ilitek_ts_i2c_probe()
578 error = ilitek_protocol_init(ts); in ilitek_ts_i2c_probe()
579 if (error) { in ilitek_ts_i2c_probe()
580 dev_err(dev, "protocol init failed: %d", error); in ilitek_ts_i2c_probe()
581 return error; in ilitek_ts_i2c_probe()
584 error = ilitek_read_tp_info(ts, true); in ilitek_ts_i2c_probe()
585 if (error) { in ilitek_ts_i2c_probe()
586 dev_err(dev, "read tp info failed: %d", error); in ilitek_ts_i2c_probe()
587 return error; in ilitek_ts_i2c_probe()
590 error = ilitek_input_dev_init(dev, ts); in ilitek_ts_i2c_probe()
591 if (error) { in ilitek_ts_i2c_probe()
592 dev_err(dev, "input dev init failed: %d", error); in ilitek_ts_i2c_probe()
593 return error; in ilitek_ts_i2c_probe()
596 error = devm_request_threaded_irq(dev, ts->client->irq, in ilitek_ts_i2c_probe()
599 if (error) { in ilitek_ts_i2c_probe()
600 dev_err(dev, "request threaded irq failed: %d\n", error); in ilitek_ts_i2c_probe()
601 return error; in ilitek_ts_i2c_probe()
604 error = devm_device_add_group(dev, &ilitek_attrs_group); in ilitek_ts_i2c_probe()
605 if (error) { in ilitek_ts_i2c_probe()
606 dev_err(dev, "sysfs create group failed: %d\n", error); in ilitek_ts_i2c_probe()
607 return error; in ilitek_ts_i2c_probe()
617 int error; in ilitek_suspend() local
622 error = api_protocol_set_cmd(ts, SET_IC_SLEEP, NULL, NULL); in ilitek_suspend()
623 if (error) in ilitek_suspend()
624 return error; in ilitek_suspend()
634 int error; in ilitek_resume() local
637 error = api_protocol_set_cmd(ts, SET_IC_WAKE, NULL, NULL); in ilitek_resume()
638 if (error) in ilitek_resume()
639 return error; in ilitek_resume()