Lines Matching refs:error

81 	int error;  in ttsp_read_block_data()  local
85 error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command, in ttsp_read_block_data()
87 if (!error) in ttsp_read_block_data()
99 int error; in ttsp_write_block_data() local
103 error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command, in ttsp_write_block_data()
105 if (!error) in ttsp_write_block_data()
139 int error; in cyttsp_exit_bl_mode() local
147 error = ttsp_write_block_data(ts, CY_REG_BASE, in cyttsp_exit_bl_mode()
149 if (error) in cyttsp_exit_bl_mode()
150 return error; in cyttsp_exit_bl_mode()
155 error = cyttsp_load_bl_regs(ts); in cyttsp_exit_bl_mode()
156 if (error) in cyttsp_exit_bl_mode()
157 return error; in cyttsp_exit_bl_mode()
167 int error; in cyttsp_set_operational_mode() local
169 error = ttsp_send_command(ts, CY_OPERATE_MODE); in cyttsp_set_operational_mode()
170 if (error) in cyttsp_set_operational_mode()
171 return error; in cyttsp_set_operational_mode()
174 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_set_operational_mode()
176 if (error) in cyttsp_set_operational_mode()
177 return error; in cyttsp_set_operational_mode()
179 error = cyttsp_handshake(ts); in cyttsp_set_operational_mode()
180 if (error) in cyttsp_set_operational_mode()
181 return error; in cyttsp_set_operational_mode()
188 int error; in cyttsp_set_sysinfo_mode() local
193 error = ttsp_send_command(ts, CY_SYSINFO_MODE); in cyttsp_set_sysinfo_mode()
194 if (error) in cyttsp_set_sysinfo_mode()
195 return error; in cyttsp_set_sysinfo_mode()
199 error = ttsp_read_block_data(ts, CY_REG_BASE, sizeof(ts->sysinfo_data), in cyttsp_set_sysinfo_mode()
201 if (error) in cyttsp_set_sysinfo_mode()
202 return error; in cyttsp_set_sysinfo_mode()
204 error = cyttsp_handshake(ts); in cyttsp_set_sysinfo_mode()
205 if (error) in cyttsp_set_sysinfo_mode()
206 return error; in cyttsp_set_sysinfo_mode()
369 int error; in cyttsp_irq() local
377 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_irq()
379 if (error) in cyttsp_irq()
383 error = cyttsp_handshake(ts); in cyttsp_irq()
384 if (error) in cyttsp_irq()
395 error = cyttsp_exit_bl_mode(ts); in cyttsp_irq()
396 if (error) { in cyttsp_irq()
399 error); in cyttsp_irq()
412 int error; in cyttsp_power_on() local
414 error = cyttsp_soft_reset(ts); in cyttsp_power_on()
415 if (error) in cyttsp_power_on()
416 return error; in cyttsp_power_on()
418 error = cyttsp_load_bl_regs(ts); in cyttsp_power_on()
419 if (error) in cyttsp_power_on()
420 return error; in cyttsp_power_on()
424 error = cyttsp_exit_bl_mode(ts); in cyttsp_power_on()
425 if (error) { in cyttsp_power_on()
427 return error; in cyttsp_power_on()
436 error = cyttsp_set_sysinfo_mode(ts); in cyttsp_power_on()
437 if (error) in cyttsp_power_on()
438 return error; in cyttsp_power_on()
440 error = cyttsp_set_sysinfo_regs(ts); in cyttsp_power_on()
441 if (error) in cyttsp_power_on()
442 return error; in cyttsp_power_on()
444 error = cyttsp_set_operational_mode(ts); in cyttsp_power_on()
445 if (error) in cyttsp_power_on()
446 return error; in cyttsp_power_on()
449 error = cyttsp_act_dist_setup(ts); in cyttsp_power_on()
450 if (error) in cyttsp_power_on()
451 return error; in cyttsp_power_on()
460 int error; in cyttsp_enable() local
468 error = ttsp_read_block_data(ts, CY_REG_BASE, in cyttsp_enable()
470 if (error) in cyttsp_enable()
471 return error; in cyttsp_enable()
483 int error; in cyttsp_disable() local
485 error = ttsp_send_command(ts, CY_LOW_POWER_MODE); in cyttsp_disable()
486 if (error) in cyttsp_disable()
487 return error; in cyttsp_disable()
631 int error; in cyttsp_probe() local
652 error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->regulators), in cyttsp_probe()
654 if (error) { in cyttsp_probe()
655 dev_err(dev, "Failed to get regulators: %d\n", error); in cyttsp_probe()
656 return ERR_PTR(error); in cyttsp_probe()
659 error = regulator_bulk_enable(ARRAY_SIZE(ts->regulators), in cyttsp_probe()
661 if (error) { in cyttsp_probe()
662 dev_err(dev, "Cannot enable regulators: %d\n", error); in cyttsp_probe()
663 return ERR_PTR(error); in cyttsp_probe()
666 error = devm_add_action_or_reset(dev, cyttsp_disable_regulators, ts); in cyttsp_probe()
667 if (error) { in cyttsp_probe()
669 return ERR_PTR(error); in cyttsp_probe()
674 error = PTR_ERR(ts->reset_gpio); in cyttsp_probe()
675 dev_err(dev, "Failed to request reset gpio, error %d\n", error); in cyttsp_probe()
676 return ERR_PTR(error); in cyttsp_probe()
679 error = cyttsp_parse_properties(ts); in cyttsp_probe()
680 if (error) in cyttsp_probe()
681 return ERR_PTR(error); in cyttsp_probe()
701 error = input_mt_init_slots(input_dev, CY_MAX_ID, INPUT_MT_DIRECT); in cyttsp_probe()
702 if (error) { in cyttsp_probe()
704 return ERR_PTR(error); in cyttsp_probe()
707 error = devm_request_threaded_irq(dev, ts->irq, NULL, cyttsp_irq, in cyttsp_probe()
710 if (error) { in cyttsp_probe()
712 ts->irq, error); in cyttsp_probe()
713 return ERR_PTR(error); in cyttsp_probe()
718 error = cyttsp_power_on(ts); in cyttsp_probe()
719 if (error) in cyttsp_probe()
720 return ERR_PTR(error); in cyttsp_probe()
722 error = input_register_device(input_dev); in cyttsp_probe()
723 if (error) { in cyttsp_probe()
725 error); in cyttsp_probe()
726 return ERR_PTR(error); in cyttsp_probe()