Lines Matching refs:error

80 	int error;  in ttsp_read_block_data()  local
84 error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command, in ttsp_read_block_data()
86 if (!error) in ttsp_read_block_data()
98 int error; in ttsp_write_block_data() local
102 error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command, in ttsp_write_block_data()
104 if (!error) in ttsp_write_block_data()
138 int error; in cyttsp_exit_bl_mode() local
146 error = ttsp_write_block_data(ts, CY_REG_BASE, in cyttsp_exit_bl_mode()
148 if (error) in cyttsp_exit_bl_mode()
149 return error; in cyttsp_exit_bl_mode()
154 error = cyttsp_load_bl_regs(ts); in cyttsp_exit_bl_mode()
155 if (error) in cyttsp_exit_bl_mode()
156 return error; in cyttsp_exit_bl_mode()
166 int error; in cyttsp_set_operational_mode() local
168 error = ttsp_send_command(ts, CY_OPERATE_MODE); in cyttsp_set_operational_mode()
169 if (error) in cyttsp_set_operational_mode()
170 return error; in cyttsp_set_operational_mode()
173 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_set_operational_mode()
175 if (error) in cyttsp_set_operational_mode()
176 return error; in cyttsp_set_operational_mode()
178 error = cyttsp_handshake(ts); in cyttsp_set_operational_mode()
179 if (error) in cyttsp_set_operational_mode()
180 return error; in cyttsp_set_operational_mode()
187 int error; in cyttsp_set_sysinfo_mode() local
192 error = ttsp_send_command(ts, CY_SYSINFO_MODE); in cyttsp_set_sysinfo_mode()
193 if (error) in cyttsp_set_sysinfo_mode()
194 return error; in cyttsp_set_sysinfo_mode()
198 error = ttsp_read_block_data(ts, CY_REG_BASE, sizeof(ts->sysinfo_data), in cyttsp_set_sysinfo_mode()
200 if (error) in cyttsp_set_sysinfo_mode()
201 return error; in cyttsp_set_sysinfo_mode()
203 error = cyttsp_handshake(ts); in cyttsp_set_sysinfo_mode()
204 if (error) in cyttsp_set_sysinfo_mode()
205 return error; in cyttsp_set_sysinfo_mode()
368 int error; in cyttsp_irq() local
376 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_irq()
378 if (error) in cyttsp_irq()
382 error = cyttsp_handshake(ts); in cyttsp_irq()
383 if (error) in cyttsp_irq()
394 error = cyttsp_exit_bl_mode(ts); in cyttsp_irq()
395 if (error) { in cyttsp_irq()
398 error); in cyttsp_irq()
411 int error; in cyttsp_power_on() local
413 error = cyttsp_soft_reset(ts); in cyttsp_power_on()
414 if (error) in cyttsp_power_on()
415 return error; in cyttsp_power_on()
417 error = cyttsp_load_bl_regs(ts); in cyttsp_power_on()
418 if (error) in cyttsp_power_on()
419 return error; in cyttsp_power_on()
423 error = cyttsp_exit_bl_mode(ts); in cyttsp_power_on()
424 if (error) { in cyttsp_power_on()
426 return error; in cyttsp_power_on()
435 error = cyttsp_set_sysinfo_mode(ts); in cyttsp_power_on()
436 if (error) in cyttsp_power_on()
437 return error; in cyttsp_power_on()
439 error = cyttsp_set_sysinfo_regs(ts); in cyttsp_power_on()
440 if (error) in cyttsp_power_on()
441 return error; in cyttsp_power_on()
443 error = cyttsp_set_operational_mode(ts); in cyttsp_power_on()
444 if (error) in cyttsp_power_on()
445 return error; in cyttsp_power_on()
448 error = cyttsp_act_dist_setup(ts); in cyttsp_power_on()
449 if (error) in cyttsp_power_on()
450 return error; in cyttsp_power_on()
459 int error; in cyttsp_enable() local
467 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_enable()
469 if (error) in cyttsp_enable()
470 return error; in cyttsp_enable()
482 int error; in cyttsp_disable() local
484 error = ttsp_send_command(ts, CY_LOW_POWER_MODE); in cyttsp_disable()
485 if (error) in cyttsp_disable()
486 return error; in cyttsp_disable()
627 int error; in cyttsp_probe() local
642 error = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(supplies), in cyttsp_probe()
644 if (error) { in cyttsp_probe()
645 dev_err(dev, "Failed to enable regulators: %d\n", error); in cyttsp_probe()
646 return ERR_PTR(error); in cyttsp_probe()
651 error = PTR_ERR(ts->reset_gpio); in cyttsp_probe()
652 dev_err(dev, "Failed to request reset gpio, error %d\n", error); in cyttsp_probe()
653 return ERR_PTR(error); in cyttsp_probe()
656 error = cyttsp_parse_properties(ts); in cyttsp_probe()
657 if (error) in cyttsp_probe()
658 return ERR_PTR(error); in cyttsp_probe()
678 error = input_mt_init_slots(input_dev, CY_MAX_ID, INPUT_MT_DIRECT); in cyttsp_probe()
679 if (error) { in cyttsp_probe()
681 return ERR_PTR(error); in cyttsp_probe()
684 error = devm_request_threaded_irq(dev, ts->irq, NULL, cyttsp_irq, in cyttsp_probe()
687 if (error) { in cyttsp_probe()
689 ts->irq, error); in cyttsp_probe()
690 return ERR_PTR(error); in cyttsp_probe()
695 error = cyttsp_power_on(ts); in cyttsp_probe()
696 if (error) in cyttsp_probe()
697 return ERR_PTR(error); in cyttsp_probe()
699 error = input_register_device(input_dev); in cyttsp_probe()
700 if (error) { in cyttsp_probe()
702 error); in cyttsp_probe()
703 return ERR_PTR(error); in cyttsp_probe()