Lines Matching full:error

89 	int error, ret;  in ili210x_read_reg()  local
93 error = ret < 0 ? ret : -EIO; in ili210x_read_reg()
94 dev_err(&client->dev, "%s failed: %d\n", __func__, error); in ili210x_read_reg()
95 return error; in ili210x_read_reg()
138 int error; in ili211x_read_touch_data() local
144 error = ret < 0 ? ret : -EIO; in ili211x_read_touch_data()
145 dev_err(&client->dev, "%s failed: %d\n", __func__, error); in ili211x_read_touch_data()
146 return error; in ili211x_read_touch_data()
155 "CRC error (crc=0x%02x expected=0x%02x)\n", in ili211x_read_touch_data()
231 int error; in ili251x_read_reg_common() local
244 error = ret < 0 ? ret : -EIO; in ili251x_read_reg_common()
245 dev_err(&client->dev, "%s failed: %d\n", __func__, error); in ili251x_read_reg_common()
257 int error; in ili251x_read_touch_data() local
259 error = ili251x_read_reg_common(client, REG_TOUCHDATA, in ili251x_read_touch_data()
261 if (!error && data[0] == 2) { in ili251x_read_touch_data()
262 error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1, in ili251x_read_touch_data()
264 if (error >= 0) in ili251x_read_touch_data()
265 error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO; in ili251x_read_touch_data()
268 return error; in ili251x_read_touch_data()
340 int error; in ili210x_irq() local
344 error = chip->get_touch_data(client, touchdata); in ili210x_irq()
345 if (error) { in ili210x_irq()
347 "Unable to get touch data: %d\n", error); in ili210x_irq()
369 int error; in ili251x_firmware_update_resolution() local
372 error = priv->chip->read_reg(client, REG_PANEL_INFO, &rs, sizeof(rs)); in ili251x_firmware_update_resolution()
373 if (!error) { in ili251x_firmware_update_resolution()
379 error = -EINVAL; in ili251x_firmware_update_resolution()
383 * In case of error, the firmware might be stuck in bootloader mode, in ili251x_firmware_update_resolution()
388 if (error) { in ili251x_firmware_update_resolution()
399 return error; in ili251x_firmware_update_resolution()
406 int error; in ili251x_firmware_update_firmware_version() local
410 error = priv->chip->read_reg(client, REG_FIRMWARE_VERSION, in ili251x_firmware_update_firmware_version()
412 if (!error) in ili251x_firmware_update_firmware_version()
415 return error; in ili251x_firmware_update_firmware_version()
422 int error; in ili251x_firmware_update_kernel_version() local
426 error = priv->chip->read_reg(client, REG_KERNEL_VERSION, in ili251x_firmware_update_kernel_version()
428 if (!error) in ili251x_firmware_update_kernel_version()
431 return error; in ili251x_firmware_update_kernel_version()
438 int error; in ili251x_firmware_update_protocol_version() local
442 error = priv->chip->read_reg(client, REG_PROTOCOL_VERSION, in ili251x_firmware_update_protocol_version()
444 if (!error) in ili251x_firmware_update_protocol_version()
447 return error; in ili251x_firmware_update_protocol_version()
454 int error; in ili251x_firmware_update_ic_mode() local
458 error = priv->chip->read_reg(client, REG_GET_MODE, &md, sizeof(md)); in ili251x_firmware_update_ic_mode()
459 if (!error) in ili251x_firmware_update_ic_mode()
462 return error; in ili251x_firmware_update_ic_mode()
469 int error; in ili251x_firmware_update_cached_state() local
478 error = ili251x_firmware_update_resolution(dev); in ili251x_firmware_update_cached_state()
479 if (error) in ili251x_firmware_update_cached_state()
480 return error; in ili251x_firmware_update_cached_state()
482 error = ili251x_firmware_update_firmware_version(dev); in ili251x_firmware_update_cached_state()
483 if (error) in ili251x_firmware_update_cached_state()
484 return error; in ili251x_firmware_update_cached_state()
486 error = ili251x_firmware_update_kernel_version(dev); in ili251x_firmware_update_cached_state()
487 if (error) in ili251x_firmware_update_cached_state()
488 return error; in ili251x_firmware_update_cached_state()
490 error = ili251x_firmware_update_protocol_version(dev); in ili251x_firmware_update_cached_state()
491 if (error) in ili251x_firmware_update_cached_state()
492 return error; in ili251x_firmware_update_cached_state()
494 error = ili251x_firmware_update_ic_mode(dev); in ili251x_firmware_update_cached_state()
495 if (error) in ili251x_firmware_update_cached_state()
496 return error; in ili251x_firmware_update_cached_state()
632 int error; in ili251x_switch_ic_mode() local
634 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
635 if (error) in ili251x_switch_ic_mode()
636 return error; in ili251x_switch_ic_mode()
643 error = i2c_master_send(client, cmd_wren, sizeof(cmd_wren)); in ili251x_switch_ic_mode()
644 if (error != sizeof(cmd_wren)) in ili251x_switch_ic_mode()
650 error = i2c_master_send(client, &cmd_mode, 1); in ili251x_switch_ic_mode()
651 if (error != 1) in ili251x_switch_ic_mode()
657 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
658 if (error) in ili251x_switch_ic_mode()
659 return error; in ili251x_switch_ic_mode()
671 int error, i = 0; in ili251x_firmware_busy() local
676 error = priv->chip->read_reg(client, REG_IC_BUSY, &data, 1); in ili251x_firmware_busy()
677 if (error) in ili251x_firmware_busy()
678 return error; in ili251x_firmware_busy()
695 int error; in ili251x_firmware_write_to_ic() local
711 error = i2c_master_send(client, cmd_wr, sizeof(cmd_wr)); in ili251x_firmware_write_to_ic()
712 if (error != sizeof(cmd_wr)) in ili251x_firmware_write_to_ic()
715 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
716 if (error) in ili251x_firmware_write_to_ic()
717 return error; in ili251x_firmware_write_to_ic()
722 error = i2c_master_send(client, fw_data, 33); in ili251x_firmware_write_to_ic()
723 if (error != sizeof(fw_data)) in ili251x_firmware_write_to_ic()
724 return error; in ili251x_firmware_write_to_ic()
725 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
726 if (error) in ili251x_firmware_write_to_ic()
727 return error; in ili251x_firmware_write_to_ic()
730 error = i2c_master_send(client, &cmd_crc, 1); in ili251x_firmware_write_to_ic()
731 if (error != 1) in ili251x_firmware_write_to_ic()
734 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
735 if (error) in ili251x_firmware_write_to_ic()
736 return error; in ili251x_firmware_write_to_ic()
738 error = priv->chip->read_reg(client, REG_READ_DATA_CRC, in ili251x_firmware_write_to_ic()
740 if (error) in ili251x_firmware_write_to_ic()
741 return error; in ili251x_firmware_write_to_ic()
753 int error; in ili251x_firmware_reset() local
755 error = i2c_master_send(client, cmd_reset, sizeof(cmd_reset)); in ili251x_firmware_reset()
756 if (error != sizeof(cmd_reset)) in ili251x_firmware_reset()
776 int error; in ili210x_do_firmware_update() local
779 error = ili251x_firmware_reset(client); in ili210x_do_firmware_update()
780 if (error) in ili210x_do_firmware_update()
781 return error; in ili210x_do_firmware_update()
785 error = ili251x_switch_ic_mode(client, REG_SET_MODE_BL); in ili210x_do_firmware_update()
786 if (!error) in ili210x_do_firmware_update()
790 if (error) in ili210x_do_firmware_update()
791 return error; in ili210x_do_firmware_update()
797 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0xf000, df_end, 1); in ili210x_do_firmware_update()
798 if (error) { in ili210x_do_firmware_update()
799 dev_err(dev, "DF firmware update failed, error=%d\n", error); in ili210x_do_firmware_update()
800 return error; in ili210x_do_firmware_update()
805 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0x2000, ac_end, 0); in ili210x_do_firmware_update()
806 if (error) { in ili210x_do_firmware_update()
807 dev_err(dev, "AC firmware update failed, error=%d\n", error); in ili210x_do_firmware_update()
808 return error; in ili210x_do_firmware_update()
815 error = ili251x_switch_ic_mode(client, REG_SET_MODE_AP); in ili210x_do_firmware_update()
816 if (!error) in ili210x_do_firmware_update()
820 if (error) in ili210x_do_firmware_update()
821 return error; in ili210x_do_firmware_update()
825 error = ili251x_firmware_update_cached_state(dev); in ili210x_do_firmware_update()
826 if (error) in ili210x_do_firmware_update()
827 return error; in ili210x_do_firmware_update()
840 int error; in ili210x_firmware_update_store() local
843 error = request_ihex_firmware(&fw, fwname, dev); in ili210x_firmware_update_store()
844 if (error) { in ili210x_firmware_update_store()
845 dev_err(dev, "Failed to request firmware %s, error=%d\n", in ili210x_firmware_update_store()
846 fwname, error); in ili210x_firmware_update_store()
847 return error; in ili210x_firmware_update_store()
852 error = PTR_ERR_OR_ZERO(fwbuf); in ili210x_firmware_update_store()
853 if (error) in ili210x_firmware_update_store()
854 return error; in ili210x_firmware_update_store()
868 error = ili210x_do_firmware_update(priv, fwbuf, ac_end, df_end); in ili210x_firmware_update_store()
872 dev_dbg(dev, "Firmware update ended, error=%i\n", error); in ili210x_firmware_update_store()
875 return error ?: count; in ili210x_firmware_update_store()
937 int error; in ili210x_i2c_probe() local
960 error = devm_add_action_or_reset(dev, ili210x_power_down, in ili210x_i2c_probe()
962 if (error) in ili210x_i2c_probe()
963 return error; in ili210x_i2c_probe()
992 error = ili251x_firmware_update_cached_state(dev); in ili210x_i2c_probe()
993 if (error) in ili210x_i2c_probe()
995 error); in ili210x_i2c_probe()
999 error = input_mt_init_slots(input, priv->chip->max_touches, in ili210x_i2c_probe()
1001 if (error) { in ili210x_i2c_probe()
1002 dev_err(dev, "Unable to set up slots, err: %d\n", error); in ili210x_i2c_probe()
1003 return error; in ili210x_i2c_probe()
1006 error = devm_request_threaded_irq(dev, client->irq, NULL, ili210x_irq, in ili210x_i2c_probe()
1008 if (error) { in ili210x_i2c_probe()
1010 error); in ili210x_i2c_probe()
1011 return error; in ili210x_i2c_probe()
1014 error = devm_add_action_or_reset(dev, ili210x_stop, priv); in ili210x_i2c_probe()
1015 if (error) in ili210x_i2c_probe()
1016 return error; in ili210x_i2c_probe()
1018 error = input_register_device(priv->input); in ili210x_i2c_probe()
1019 if (error) { in ili210x_i2c_probe()
1020 dev_err(dev, "Cannot register input device, err: %d\n", error); in ili210x_i2c_probe()
1021 return error; in ili210x_i2c_probe()