Lines Matching full:error
97 int error; in ilitek_i2c_write_and_read() local
115 error = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in ilitek_i2c_write_and_read()
116 if (error < 0) in ilitek_i2c_write_and_read()
117 return error; in ilitek_i2c_write_and_read()
120 error = i2c_transfer(client->adapter, msgs, 1); in ilitek_i2c_write_and_read()
121 if (error < 0) in ilitek_i2c_write_and_read()
122 return error; in ilitek_i2c_write_and_read()
128 error = i2c_transfer(client->adapter, msgs + 1, 1); in ilitek_i2c_write_and_read()
129 if (error < 0) in ilitek_i2c_write_and_read()
130 return error; in ilitek_i2c_write_and_read()
151 int error = 0; in ilitek_process_and_report_v6() local
161 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, buf, 64); in ilitek_process_and_report_v6()
162 if (error) { in ilitek_process_and_report_v6()
163 dev_err(dev, "get touch info failed, err:%d\n", error); in ilitek_process_and_report_v6()
164 return error; in ilitek_process_and_report_v6()
181 error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, in ilitek_process_and_report_v6()
183 if (error) { in ilitek_process_and_report_v6()
185 count, error); in ilitek_process_and_report_v6()
186 return error; in ilitek_process_and_report_v6()
222 int error; in api_protocol_set_cmd() local
228 error = ts->ptl_cb_func[idx].func(ts, cmd, inbuf, outbuf); in api_protocol_set_cmd()
229 if (error) in api_protocol_set_cmd()
230 return error; in api_protocol_set_cmd()
238 int error; in api_protocol_get_ptl_ver() local
242 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 3); in api_protocol_get_ptl_ver()
243 if (error) in api_protocol_get_ptl_ver()
244 return error; in api_protocol_get_ptl_ver()
255 int error; in api_protocol_get_mcu_ver() local
259 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 32); in api_protocol_get_mcu_ver()
260 if (error) in api_protocol_get_mcu_ver()
261 return error; in api_protocol_get_mcu_ver()
273 int error; in api_protocol_get_fw_ver() local
277 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_fw_ver()
278 if (error) in api_protocol_get_fw_ver()
279 return error; in api_protocol_get_fw_ver()
289 int error; in api_protocol_get_scrn_res() local
293 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8); in api_protocol_get_scrn_res()
294 if (error) in api_protocol_get_scrn_res()
295 return error; in api_protocol_get_scrn_res()
308 int error; in api_protocol_get_tp_res() local
312 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 15); in api_protocol_get_tp_res()
313 if (error) in api_protocol_get_tp_res()
314 return error; in api_protocol_get_tp_res()
329 int error; in api_protocol_get_ic_mode() local
333 error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 2); in api_protocol_get_ic_mode()
334 if (error) in api_protocol_get_ic_mode()
335 return error; in api_protocol_get_ic_mode()
408 int error; in ilitek_protocol_init() local
414 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_protocol_init()
415 if (error) in ilitek_protocol_init()
416 return error; in ilitek_protocol_init()
430 int error; in ilitek_read_tp_info() local
432 error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf); in ilitek_read_tp_info()
433 if (error) in ilitek_read_tp_info()
434 return error; in ilitek_read_tp_info()
436 error = api_protocol_set_cmd(ts, GET_MCU_VER, NULL, outbuf); in ilitek_read_tp_info()
437 if (error) in ilitek_read_tp_info()
438 return error; in ilitek_read_tp_info()
440 error = api_protocol_set_cmd(ts, GET_FW_VER, NULL, outbuf); in ilitek_read_tp_info()
441 if (error) in ilitek_read_tp_info()
442 return error; in ilitek_read_tp_info()
445 error = api_protocol_set_cmd(ts, GET_SCRN_RES, NULL, in ilitek_read_tp_info()
447 if (error) in ilitek_read_tp_info()
448 return error; in ilitek_read_tp_info()
451 error = api_protocol_set_cmd(ts, GET_TP_RES, NULL, outbuf); in ilitek_read_tp_info()
452 if (error) in ilitek_read_tp_info()
453 return error; in ilitek_read_tp_info()
455 error = api_protocol_set_cmd(ts, GET_IC_MODE, NULL, outbuf); in ilitek_read_tp_info()
456 if (error) in ilitek_read_tp_info()
457 return error; in ilitek_read_tp_info()
464 int error; in ilitek_input_dev_init() local
484 error = input_mt_init_slots(input, ts->max_tp, in ilitek_input_dev_init()
486 if (error) { in ilitek_input_dev_init()
487 dev_err(dev, "initialize MT slots failed, err:%d\n", error); in ilitek_input_dev_init()
488 return error; in ilitek_input_dev_init()
491 error = input_register_device(input); in ilitek_input_dev_init()
492 if (error) { in ilitek_input_dev_init()
493 dev_err(dev, "register input device failed, err:%d\n", error); in ilitek_input_dev_init()
494 return error; in ilitek_input_dev_init()
503 int error; in ilitek_i2c_isr() local
505 error = ilitek_process_and_report_v6(ts); in ilitek_i2c_isr()
506 if (error < 0) { in ilitek_i2c_isr()
507 dev_err(&ts->client->dev, "[%s] err:%d\n", __func__, error); in ilitek_i2c_isr()
551 int error; in ilitek_ts_i2c_probe() local
567 error = PTR_ERR(ts->reset_gpio); in ilitek_ts_i2c_probe()
568 dev_err(dev, "request gpiod failed: %d", error); in ilitek_ts_i2c_probe()
569 return error; in ilitek_ts_i2c_probe()
574 error = ilitek_protocol_init(ts); in ilitek_ts_i2c_probe()
575 if (error) { in ilitek_ts_i2c_probe()
576 dev_err(dev, "protocol init failed: %d", error); in ilitek_ts_i2c_probe()
577 return error; in ilitek_ts_i2c_probe()
580 error = ilitek_read_tp_info(ts, true); in ilitek_ts_i2c_probe()
581 if (error) { in ilitek_ts_i2c_probe()
582 dev_err(dev, "read tp info failed: %d", error); in ilitek_ts_i2c_probe()
583 return error; in ilitek_ts_i2c_probe()
586 error = ilitek_input_dev_init(dev, ts); in ilitek_ts_i2c_probe()
587 if (error) { in ilitek_ts_i2c_probe()
588 dev_err(dev, "input dev init failed: %d", error); in ilitek_ts_i2c_probe()
589 return error; in ilitek_ts_i2c_probe()
592 error = devm_request_threaded_irq(dev, ts->client->irq, in ilitek_ts_i2c_probe()
595 if (error) { in ilitek_ts_i2c_probe()
596 dev_err(dev, "request threaded irq failed: %d\n", error); in ilitek_ts_i2c_probe()
597 return error; in ilitek_ts_i2c_probe()
607 int error; in ilitek_suspend() local
612 error = api_protocol_set_cmd(ts, SET_IC_SLEEP, NULL, NULL); in ilitek_suspend()
613 if (error) in ilitek_suspend()
614 return error; in ilitek_suspend()
624 int error; in ilitek_resume() local
627 error = api_protocol_set_cmd(ts, SET_IC_WAKE, NULL, NULL); in ilitek_resume()
628 if (error) in ilitek_resume()
629 return error; in ilitek_resume()