Lines Matching refs:error
96 int error; in ilitek_i2c_write_and_read() local
114 error = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in ilitek_i2c_write_and_read()
115 if (error < 0) in ilitek_i2c_write_and_read()
116 return error; in ilitek_i2c_write_and_read()
119 error = i2c_transfer(client->adapter, msgs, 1); in ilitek_i2c_write_and_read()
120 if (error < 0) in ilitek_i2c_write_and_read()
121 return error; in ilitek_i2c_write_and_read()
127 error = i2c_transfer(client->adapter, msgs + 1, 1); in ilitek_i2c_write_and_read()
128 if (error < 0) in ilitek_i2c_write_and_read()
129 return error; in ilitek_i2c_write_and_read()
150 int error = 0; in ilitek_process_and_report_v6() local
160 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, buf, 64); in ilitek_process_and_report_v6()
161 if (error) { in ilitek_process_and_report_v6()
162 dev_err(dev, "get touch info failed, err:%d\n", error); in ilitek_process_and_report_v6()
170 error = -EINVAL; in ilitek_process_and_report_v6()
176 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, in ilitek_process_and_report_v6()
178 if (error) { in ilitek_process_and_report_v6()
180 count, error); in ilitek_process_and_report_v6()
209 return error; in ilitek_process_and_report_v6()
217 int error; in api_protocol_set_cmd() local
223 error = ts->ptl_cb_func[idx].func(ts, cmd, inbuf, outbuf); in api_protocol_set_cmd()
224 if (error) in api_protocol_set_cmd()
225 return error; in api_protocol_set_cmd()
233 int error; in api_protocol_get_ptl_ver() local
237 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 3); in api_protocol_get_ptl_ver()
238 if (error) in api_protocol_get_ptl_ver()
239 return error; in api_protocol_get_ptl_ver()
250 int error; in api_protocol_get_mcu_ver() local
254 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 32); in api_protocol_get_mcu_ver()
255 if (error) in api_protocol_get_mcu_ver()
256 return error; in api_protocol_get_mcu_ver()
268 int error; in api_protocol_get_fw_ver() local
272 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_fw_ver()
273 if (error) in api_protocol_get_fw_ver()
274 return error; in api_protocol_get_fw_ver()
284 int error; in api_protocol_get_scrn_res() local
288 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_scrn_res()
289 if (error) in api_protocol_get_scrn_res()
290 return error; in api_protocol_get_scrn_res()
303 int error; in api_protocol_get_tp_res() local
307 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 15); in api_protocol_get_tp_res()
308 if (error) in api_protocol_get_tp_res()
309 return error; in api_protocol_get_tp_res()
324 int error; in api_protocol_get_ic_mode() local
328 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 2); in api_protocol_get_ic_mode()
329 if (error) in api_protocol_get_ic_mode()
330 return error; in api_protocol_get_ic_mode()
403 int error; in ilitek_protocol_init() local
409 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_protocol_init()
410 if (error) in ilitek_protocol_init()
411 return error; in ilitek_protocol_init()
425 int error; in ilitek_read_tp_info() local
427 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_read_tp_info()
428 if (error) in ilitek_read_tp_info()
429 return error; in ilitek_read_tp_info()
431 error = api_protocol_set_cmd(ts, GET_MCU_VER, NULL, outbuf); in ilitek_read_tp_info()
432 if (error) in ilitek_read_tp_info()
433 return error; in ilitek_read_tp_info()
435 error = api_protocol_set_cmd(ts, GET_FW_VER, NULL, outbuf); in ilitek_read_tp_info()
436 if (error) in ilitek_read_tp_info()
437 return error; in ilitek_read_tp_info()
440 error = api_protocol_set_cmd(ts, GET_SCRN_RES, NULL, 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_TP_RES, NULL, outbuf); in ilitek_read_tp_info()
447 if (error) in ilitek_read_tp_info()
448 return error; in ilitek_read_tp_info()
450 error = api_protocol_set_cmd(ts, GET_IC_MODE, NULL, outbuf); in ilitek_read_tp_info()
451 if (error) in ilitek_read_tp_info()
452 return error; in ilitek_read_tp_info()
459 int error; in ilitek_input_dev_init() local
479 error = input_mt_init_slots(input, ts->max_tp, in ilitek_input_dev_init()
481 if (error) { in ilitek_input_dev_init()
482 dev_err(dev, "initialize MT slots failed, err:%d\n", error); in ilitek_input_dev_init()
483 return error; in ilitek_input_dev_init()
486 error = input_register_device(input); in ilitek_input_dev_init()
487 if (error) { in ilitek_input_dev_init()
488 dev_err(dev, "register input device failed, err:%d\n", error); in ilitek_input_dev_init()
489 return error; in ilitek_input_dev_init()
498 int error; in ilitek_i2c_isr() local
500 error = ilitek_process_and_report_v6(ts); in ilitek_i2c_isr()
501 if (error < 0) { in ilitek_i2c_isr()
502 dev_err(&ts->client->dev, "[%s] err:%d\n", __func__, error); in ilitek_i2c_isr()
549 int error; in ilitek_ts_i2c_probe() local
565 error = PTR_ERR(ts->reset_gpio); in ilitek_ts_i2c_probe()
566 dev_err(dev, "request gpiod failed: %d", error); in ilitek_ts_i2c_probe()
567 return error; in ilitek_ts_i2c_probe()
572 error = ilitek_protocol_init(ts); in ilitek_ts_i2c_probe()
573 if (error) { in ilitek_ts_i2c_probe()
574 dev_err(dev, "protocol init failed: %d", error); in ilitek_ts_i2c_probe()
575 return error; in ilitek_ts_i2c_probe()
578 error = ilitek_read_tp_info(ts, true); in ilitek_ts_i2c_probe()
579 if (error) { in ilitek_ts_i2c_probe()
580 dev_err(dev, "read tp info failed: %d", error); in ilitek_ts_i2c_probe()
581 return error; in ilitek_ts_i2c_probe()
584 error = ilitek_input_dev_init(dev, ts); in ilitek_ts_i2c_probe()
585 if (error) { in ilitek_ts_i2c_probe()
586 dev_err(dev, "input dev init failed: %d", error); in ilitek_ts_i2c_probe()
587 return error; in ilitek_ts_i2c_probe()
590 error = devm_request_threaded_irq(dev, ts->client->irq, in ilitek_ts_i2c_probe()
593 if (error) { in ilitek_ts_i2c_probe()
594 dev_err(dev, "request threaded irq failed: %d\n", error); in ilitek_ts_i2c_probe()
595 return error; in ilitek_ts_i2c_probe()
598 error = devm_device_add_group(dev, &ilitek_attrs_group); in ilitek_ts_i2c_probe()
599 if (error) { in ilitek_ts_i2c_probe()
600 dev_err(dev, "sysfs create group failed: %d\n", error); in ilitek_ts_i2c_probe()
601 return error; in ilitek_ts_i2c_probe()
611 int error; in ilitek_suspend() local
616 error = api_protocol_set_cmd(ts, SET_IC_SLEEP, NULL, NULL); in ilitek_suspend()
617 if (error) in ilitek_suspend()
618 return error; in ilitek_suspend()
628 int error; in ilitek_resume() local
631 error = api_protocol_set_cmd(ts, SET_IC_WAKE, NULL, NULL); in ilitek_resume()
632 if (error) in ilitek_resume()
633 return error; in ilitek_resume()