Lines Matching refs: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()
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 && error != ILI251X_DATA_SIZE2) in ili251x_read_touch_data()
265 error = -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()
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()
592 int error; in ili251x_firmware_to_buffer() local
611 error = -EFBIG; in ili251x_firmware_to_buffer()
631 return error; in ili251x_firmware_to_buffer()
640 int error; in ili251x_switch_ic_mode() local
642 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
643 if (error) in ili251x_switch_ic_mode()
644 return error; in ili251x_switch_ic_mode()
651 error = i2c_master_send(client, cmd_wren, sizeof(cmd_wren)); in ili251x_switch_ic_mode()
652 if (error != sizeof(cmd_wren)) in ili251x_switch_ic_mode()
658 error = i2c_master_send(client, &cmd_mode, 1); in ili251x_switch_ic_mode()
659 if (error != 1) in ili251x_switch_ic_mode()
665 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
666 if (error) in ili251x_switch_ic_mode()
667 return error; in ili251x_switch_ic_mode()
679 int error, i = 0; in ili251x_firmware_busy() local
684 error = priv->chip->read_reg(client, REG_IC_BUSY, &data, 1); in ili251x_firmware_busy()
685 if (error) in ili251x_firmware_busy()
686 return error; in ili251x_firmware_busy()
703 int error; in ili251x_firmware_write_to_ic() local
719 error = i2c_master_send(client, cmd_wr, sizeof(cmd_wr)); in ili251x_firmware_write_to_ic()
720 if (error != sizeof(cmd_wr)) in ili251x_firmware_write_to_ic()
723 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
724 if (error) in ili251x_firmware_write_to_ic()
725 return error; in ili251x_firmware_write_to_ic()
730 error = i2c_master_send(client, fw_data, 33); in ili251x_firmware_write_to_ic()
731 if (error != sizeof(fw_data)) in ili251x_firmware_write_to_ic()
732 return error; in ili251x_firmware_write_to_ic()
733 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
734 if (error) in ili251x_firmware_write_to_ic()
735 return error; in ili251x_firmware_write_to_ic()
738 error = i2c_master_send(client, &cmd_crc, 1); in ili251x_firmware_write_to_ic()
739 if (error != 1) in ili251x_firmware_write_to_ic()
742 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
743 if (error) in ili251x_firmware_write_to_ic()
744 return error; in ili251x_firmware_write_to_ic()
746 error = priv->chip->read_reg(client, REG_READ_DATA_CRC, in ili251x_firmware_write_to_ic()
748 if (error) in ili251x_firmware_write_to_ic()
749 return error; in ili251x_firmware_write_to_ic()
761 int error; in ili251x_firmware_reset() local
763 error = i2c_master_send(client, cmd_reset, sizeof(cmd_reset)); in ili251x_firmware_reset()
764 if (error != sizeof(cmd_reset)) in ili251x_firmware_reset()
789 int error; in ili210x_firmware_update_store() local
792 error = request_ihex_firmware(&fw, fwname, dev); in ili210x_firmware_update_store()
793 if (error) { in ili210x_firmware_update_store()
795 fwname, error); in ili210x_firmware_update_store()
796 return error; in ili210x_firmware_update_store()
799 error = ili251x_firmware_to_buffer(fw, &fwbuf, &ac_end, &df_end); in ili210x_firmware_update_store()
801 if (error) in ili210x_firmware_update_store()
802 return error; in ili210x_firmware_update_store()
817 error = ili251x_firmware_reset(client); in ili210x_firmware_update_store()
818 if (error) in ili210x_firmware_update_store()
823 error = ili251x_switch_ic_mode(client, REG_SET_MODE_BL); in ili210x_firmware_update_store()
824 if (!error) in ili210x_firmware_update_store()
828 if (error) in ili210x_firmware_update_store()
835 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0xf000, df_end, 1); in ili210x_firmware_update_store()
836 if (error) { in ili210x_firmware_update_store()
837 dev_err(dev, "DF firmware update failed, error=%d\n", error); in ili210x_firmware_update_store()
843 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0x2000, ac_end, 0); in ili210x_firmware_update_store()
844 if (error) { in ili210x_firmware_update_store()
845 dev_err(dev, "AC firmware update failed, error=%d\n", error); in ili210x_firmware_update_store()
853 error = ili251x_switch_ic_mode(client, REG_SET_MODE_AP); in ili210x_firmware_update_store()
854 if (!error) in ili210x_firmware_update_store()
858 if (error) in ili210x_firmware_update_store()
863 error = ili251x_firmware_update_cached_state(dev); in ili210x_firmware_update_store()
864 if (error) in ili210x_firmware_update_store()
867 error = count; in ili210x_firmware_update_store()
871 dev_dbg(dev, "Firmware update ended, error=%i\n", error); in ili210x_firmware_update_store()
874 return error; in ili210x_firmware_update_store()
935 int error; in ili210x_i2c_probe() local
958 error = devm_add_action_or_reset(dev, ili210x_power_down, in ili210x_i2c_probe()
960 if (error) in ili210x_i2c_probe()
961 return error; in ili210x_i2c_probe()
990 error = ili251x_firmware_update_cached_state(dev); in ili210x_i2c_probe()
991 if (error) in ili210x_i2c_probe()
993 error); in ili210x_i2c_probe()
997 error = input_mt_init_slots(input, priv->chip->max_touches, in ili210x_i2c_probe()
999 if (error) { in ili210x_i2c_probe()
1000 dev_err(dev, "Unable to set up slots, err: %d\n", error); in ili210x_i2c_probe()
1001 return error; in ili210x_i2c_probe()
1004 error = devm_request_threaded_irq(dev, client->irq, NULL, ili210x_irq, in ili210x_i2c_probe()
1006 if (error) { in ili210x_i2c_probe()
1008 error); in ili210x_i2c_probe()
1009 return error; in ili210x_i2c_probe()
1012 error = devm_add_action_or_reset(dev, ili210x_stop, priv); in ili210x_i2c_probe()
1013 if (error) in ili210x_i2c_probe()
1014 return error; in ili210x_i2c_probe()
1016 error = devm_device_add_group(dev, &ili210x_attr_group); in ili210x_i2c_probe()
1017 if (error) { in ili210x_i2c_probe()
1019 error); in ili210x_i2c_probe()
1020 return error; in ili210x_i2c_probe()
1023 error = input_register_device(priv->input); in ili210x_i2c_probe()
1024 if (error) { in ili210x_i2c_probe()
1025 dev_err(dev, "Cannot register input device, err: %d\n", error); in ili210x_i2c_probe()
1026 return error; in ili210x_i2c_probe()