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()
374 return error; in ili251x_firmware_update_resolution()
395 int error; in ili251x_firmware_update_firmware_version() local
399 error = priv->chip->read_reg(client, REG_FIRMWARE_VERSION, in ili251x_firmware_update_firmware_version()
401 if (!error) in ili251x_firmware_update_firmware_version()
404 return error; in ili251x_firmware_update_firmware_version()
411 int error; in ili251x_firmware_update_kernel_version() local
415 error = priv->chip->read_reg(client, REG_KERNEL_VERSION, in ili251x_firmware_update_kernel_version()
417 if (!error) in ili251x_firmware_update_kernel_version()
420 return error; in ili251x_firmware_update_kernel_version()
427 int error; in ili251x_firmware_update_protocol_version() local
431 error = priv->chip->read_reg(client, REG_PROTOCOL_VERSION, in ili251x_firmware_update_protocol_version()
433 if (!error) in ili251x_firmware_update_protocol_version()
436 return error; in ili251x_firmware_update_protocol_version()
443 int error; in ili251x_firmware_update_ic_mode() local
447 error = priv->chip->read_reg(client, REG_GET_MODE, &md, sizeof(md)); in ili251x_firmware_update_ic_mode()
448 if (!error) in ili251x_firmware_update_ic_mode()
451 return error; in ili251x_firmware_update_ic_mode()
458 int error; in ili251x_firmware_update_cached_state() local
467 error = ili251x_firmware_update_resolution(dev); in ili251x_firmware_update_cached_state()
468 if (error) in ili251x_firmware_update_cached_state()
469 return error; in ili251x_firmware_update_cached_state()
471 error = ili251x_firmware_update_firmware_version(dev); in ili251x_firmware_update_cached_state()
472 if (error) in ili251x_firmware_update_cached_state()
473 return error; in ili251x_firmware_update_cached_state()
475 error = ili251x_firmware_update_kernel_version(dev); in ili251x_firmware_update_cached_state()
476 if (error) in ili251x_firmware_update_cached_state()
477 return error; in ili251x_firmware_update_cached_state()
479 error = ili251x_firmware_update_protocol_version(dev); in ili251x_firmware_update_cached_state()
480 if (error) in ili251x_firmware_update_cached_state()
481 return error; in ili251x_firmware_update_cached_state()
483 error = ili251x_firmware_update_ic_mode(dev); in ili251x_firmware_update_cached_state()
484 if (error) in ili251x_firmware_update_cached_state()
485 return error; in ili251x_firmware_update_cached_state()
581 int error; in ili251x_firmware_to_buffer() local
600 error = -EFBIG; in ili251x_firmware_to_buffer()
620 return error; in ili251x_firmware_to_buffer()
629 int error; in ili251x_switch_ic_mode() local
631 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
632 if (error) in ili251x_switch_ic_mode()
633 return error; in ili251x_switch_ic_mode()
640 error = i2c_master_send(client, cmd_wren, sizeof(cmd_wren)); in ili251x_switch_ic_mode()
641 if (error != sizeof(cmd_wren)) in ili251x_switch_ic_mode()
647 error = i2c_master_send(client, &cmd_mode, 1); in ili251x_switch_ic_mode()
648 if (error != 1) in ili251x_switch_ic_mode()
654 error = priv->chip->read_reg(client, REG_GET_MODE, md, sizeof(md)); in ili251x_switch_ic_mode()
655 if (error) in ili251x_switch_ic_mode()
656 return error; in ili251x_switch_ic_mode()
668 int error, i = 0; in ili251x_firmware_busy() local
673 error = priv->chip->read_reg(client, REG_IC_BUSY, &data, 1); in ili251x_firmware_busy()
674 if (error) in ili251x_firmware_busy()
675 return error; in ili251x_firmware_busy()
692 int error; in ili251x_firmware_write_to_ic() local
708 error = i2c_master_send(client, cmd_wr, sizeof(cmd_wr)); in ili251x_firmware_write_to_ic()
709 if (error != sizeof(cmd_wr)) in ili251x_firmware_write_to_ic()
712 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
713 if (error) in ili251x_firmware_write_to_ic()
714 return error; in ili251x_firmware_write_to_ic()
719 error = i2c_master_send(client, fw_data, 33); in ili251x_firmware_write_to_ic()
720 if (error != sizeof(fw_data)) in ili251x_firmware_write_to_ic()
721 return error; in ili251x_firmware_write_to_ic()
722 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
723 if (error) in ili251x_firmware_write_to_ic()
724 return error; in ili251x_firmware_write_to_ic()
727 error = i2c_master_send(client, &cmd_crc, 1); in ili251x_firmware_write_to_ic()
728 if (error != 1) in ili251x_firmware_write_to_ic()
731 error = ili251x_firmware_busy(client); in ili251x_firmware_write_to_ic()
732 if (error) in ili251x_firmware_write_to_ic()
733 return error; in ili251x_firmware_write_to_ic()
735 error = priv->chip->read_reg(client, REG_READ_DATA_CRC, in ili251x_firmware_write_to_ic()
737 if (error) in ili251x_firmware_write_to_ic()
738 return error; in ili251x_firmware_write_to_ic()
750 int error; in ili251x_firmware_reset() local
752 error = i2c_master_send(client, cmd_reset, sizeof(cmd_reset)); in ili251x_firmware_reset()
753 if (error != sizeof(cmd_reset)) in ili251x_firmware_reset()
778 int error; in ili210x_firmware_update_store() local
781 error = request_ihex_firmware(&fw, fwname, dev); in ili210x_firmware_update_store()
782 if (error) { in ili210x_firmware_update_store()
784 fwname, error); in ili210x_firmware_update_store()
785 return error; in ili210x_firmware_update_store()
788 error = ili251x_firmware_to_buffer(fw, &fwbuf, &ac_end, &df_end); in ili210x_firmware_update_store()
790 if (error) in ili210x_firmware_update_store()
791 return error; in ili210x_firmware_update_store()
806 error = ili251x_firmware_reset(client); in ili210x_firmware_update_store()
807 if (error) in ili210x_firmware_update_store()
812 error = ili251x_switch_ic_mode(client, REG_SET_MODE_BL); in ili210x_firmware_update_store()
813 if (!error) in ili210x_firmware_update_store()
817 if (error) in ili210x_firmware_update_store()
824 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0xf000, df_end, 1); in ili210x_firmware_update_store()
825 if (error) { in ili210x_firmware_update_store()
826 dev_err(dev, "DF firmware update failed, error=%d\n", error); in ili210x_firmware_update_store()
832 error = ili251x_firmware_write_to_ic(dev, fwbuf, 0x2000, ac_end, 0); in ili210x_firmware_update_store()
833 if (error) { in ili210x_firmware_update_store()
834 dev_err(dev, "AC firmware update failed, error=%d\n", error); in ili210x_firmware_update_store()
842 error = ili251x_switch_ic_mode(client, REG_SET_MODE_AP); in ili210x_firmware_update_store()
843 if (!error) in ili210x_firmware_update_store()
847 if (error) in ili210x_firmware_update_store()
852 error = ili251x_firmware_update_cached_state(dev); in ili210x_firmware_update_store()
853 if (error) in ili210x_firmware_update_store()
856 error = count; in ili210x_firmware_update_store()
860 dev_dbg(dev, "Firmware update ended, error=%i\n", error); in ili210x_firmware_update_store()
863 return error; in ili210x_firmware_update_store()
924 int error; in ili210x_i2c_probe() local
947 error = devm_add_action_or_reset(dev, ili210x_power_down, in ili210x_i2c_probe()
949 if (error) in ili210x_i2c_probe()
950 return error; in ili210x_i2c_probe()
979 error = ili251x_firmware_update_cached_state(dev); in ili210x_i2c_probe()
980 if (error) { in ili210x_i2c_probe()
982 error); in ili210x_i2c_probe()
983 return error; in ili210x_i2c_probe()
987 error = input_mt_init_slots(input, priv->chip->max_touches, in ili210x_i2c_probe()
989 if (error) { in ili210x_i2c_probe()
990 dev_err(dev, "Unable to set up slots, err: %d\n", error); in ili210x_i2c_probe()
991 return error; in ili210x_i2c_probe()
994 error = devm_request_threaded_irq(dev, client->irq, NULL, ili210x_irq, in ili210x_i2c_probe()
996 if (error) { in ili210x_i2c_probe()
998 error); in ili210x_i2c_probe()
999 return error; in ili210x_i2c_probe()
1002 error = devm_add_action_or_reset(dev, ili210x_stop, priv); in ili210x_i2c_probe()
1003 if (error) in ili210x_i2c_probe()
1004 return error; in ili210x_i2c_probe()
1006 error = devm_device_add_group(dev, &ili210x_attr_group); in ili210x_i2c_probe()
1007 if (error) { in ili210x_i2c_probe()
1009 error); in ili210x_i2c_probe()
1010 return error; in ili210x_i2c_probe()
1013 error = input_register_device(priv->input); in ili210x_i2c_probe()
1014 if (error) { in ili210x_i2c_probe()
1015 dev_err(dev, "Cannot register input device, err: %d\n", error); in ili210x_i2c_probe()
1016 return error; in ili210x_i2c_probe()