Lines Matching full:error
243 int error; in hideep_pgm_r_reg() local
245 error = hideep_pgm_r_mem(ts, addr, &data, 1); in hideep_pgm_r_reg()
246 if (error) { in hideep_pgm_r_reg()
249 addr, error); in hideep_pgm_r_reg()
250 return error; in hideep_pgm_r_reg()
260 int error; in hideep_pgm_w_reg() local
262 error = hideep_pgm_w_mem(ts, addr, &data, 1); in hideep_pgm_w_reg()
263 if (error) { in hideep_pgm_w_reg()
266 addr, val, error); in hideep_pgm_w_reg()
267 return error; in hideep_pgm_w_reg()
280 * write for the second write to avoid error logging. \
317 int error; in hideep_pgm_get_pattern() local
319 error = regmap_bulk_write(ts->reg, p1, &p2, 1); in hideep_pgm_get_pattern()
320 if (error) { in hideep_pgm_get_pattern()
323 __func__, error); in hideep_pgm_get_pattern()
324 return error; in hideep_pgm_get_pattern()
330 error = hideep_pgm_w_reg(ts, HIDEEP_ESI_TX_INVALID, 0x01); in hideep_pgm_get_pattern()
331 if (error) in hideep_pgm_get_pattern()
332 return error; in hideep_pgm_get_pattern()
334 error = hideep_pgm_r_reg(ts, HIDEEP_SYSCON_PGM_ID, pattern); in hideep_pgm_get_pattern()
335 if (error) in hideep_pgm_get_pattern()
336 return error; in hideep_pgm_get_pattern()
345 int error; in hideep_enter_pgm() local
348 error = hideep_pgm_get_pattern(ts, &pattern); in hideep_enter_pgm()
349 if (error) { in hideep_enter_pgm()
351 "hideep_pgm_get_pattern failed: %d\n", error); in hideep_enter_pgm()
373 int error; in hideep_nvm_unlock() local
376 error = hideep_pgm_r_reg(ts, 0x0000000C, &unmask_code); in hideep_nvm_unlock()
378 if (error) in hideep_nvm_unlock()
379 return error; in hideep_nvm_unlock()
404 int error; in hideep_check_status() local
407 error = hideep_pgm_r_reg(ts, HIDEEP_FLASH_STA, &status); in hideep_check_status()
408 if (!error && status) in hideep_check_status()
421 int error; in hideep_program_page() local
423 error = hideep_check_status(ts); in hideep_program_page()
424 if (error) in hideep_program_page()
437 error = hideep_check_status(ts); in hideep_program_page()
438 if (error) in hideep_program_page()
457 error = hideep_check_status(ts); in hideep_program_page()
458 if (error) in hideep_program_page()
474 int error; in hideep_program_nvm() local
476 error = hideep_nvm_unlock(ts); in hideep_program_nvm()
477 if (error) in hideep_program_nvm()
478 return error; in hideep_program_nvm()
484 error = hideep_pgm_r_mem(ts, 0x00000000 + addr, in hideep_program_nvm()
486 if (error) { in hideep_program_nvm()
489 __func__, addr, error); in hideep_program_nvm()
490 return error; in hideep_program_nvm()
495 error = hideep_program_page(ts, addr, in hideep_program_nvm()
497 if (error) { in hideep_program_nvm()
500 __func__, addr, error); in hideep_program_nvm()
501 return error; in hideep_program_nvm()
524 int error; in hideep_verify_nvm() local
530 error = hideep_pgm_r_mem(ts, 0x00000000 + addr, in hideep_verify_nvm()
532 if (error) { in hideep_verify_nvm()
535 __func__, addr, error); in hideep_verify_nvm()
536 return error; in hideep_verify_nvm()
565 int error; in hideep_load_dwz() local
567 error = hideep_enter_pgm(ts); in hideep_load_dwz()
568 if (error) in hideep_load_dwz()
569 return error; in hideep_load_dwz()
573 error = hideep_pgm_r_mem(ts, HIDEEP_DWZ_INFO, in hideep_load_dwz()
580 if (error) { in hideep_load_dwz()
582 "failed to fetch DWZ data: %d\n", error); in hideep_load_dwz()
583 return error; in hideep_load_dwz()
615 int error; in hideep_flash_firmware() local
618 error = hideep_program_nvm(ts, ucode, ucode_len); in hideep_flash_firmware()
619 if (!error) { in hideep_flash_firmware()
620 error = hideep_verify_nvm(ts, ucode, ucode_len); in hideep_flash_firmware()
621 if (!error) in hideep_flash_firmware()
626 return error; in hideep_flash_firmware()
632 int error, error2; in hideep_update_firmware() local
637 error = hideep_enter_pgm(ts); in hideep_update_firmware()
638 if (error) in hideep_update_firmware()
639 return error; in hideep_update_firmware()
641 error = hideep_flash_firmware(ts, ucode, ucode_len); in hideep_update_firmware()
642 if (error) in hideep_update_firmware()
644 "firmware update failed: %d\n", error); in hideep_update_firmware()
656 return error ?: error2; in hideep_update_firmware()
661 int error = 0; in hideep_power_on() local
663 error = regulator_enable(ts->vcc_vdd); in hideep_power_on()
664 if (error) in hideep_power_on()
666 "failed to enable 'vdd' regulator: %d", error); in hideep_power_on()
670 error = regulator_enable(ts->vcc_vid); in hideep_power_on()
671 if (error) in hideep_power_on()
674 error); in hideep_power_on()
681 error = regmap_write(ts->reg, HIDEEP_RESET_CMD, 0x01); in hideep_power_on()
682 if (error) in hideep_power_on()
684 "failed to send 'reset' command: %d\n", error); in hideep_power_on()
689 return error; in hideep_power_on()
757 int error; in hideep_irq() local
761 error = regmap_bulk_read(ts->reg, HIDEEP_EVENT_ADDR, in hideep_irq()
763 if (error) { in hideep_irq()
764 dev_err(&ts->client->dev, "failed to read events: %d\n", error); in hideep_irq()
777 int error; in hideep_get_axis_info() local
779 error = regmap_bulk_read(ts->reg, 0x28, val, ARRAY_SIZE(val)); in hideep_get_axis_info()
780 if (error) in hideep_get_axis_info()
781 return error; in hideep_get_axis_info()
796 int error; in hideep_init_input() local
817 error = hideep_get_axis_info(ts); in hideep_init_input()
818 if (error) in hideep_init_input()
819 return error; in hideep_init_input()
822 error = input_mt_init_slots(ts->input_dev, HIDEEP_MT_MAX, in hideep_init_input()
824 if (error) in hideep_init_input()
825 return error; in hideep_init_input()
838 error = device_property_read_u32_array(dev, "linux,keycodes", in hideep_init_input()
841 if (error) { in hideep_init_input()
842 dev_dbg(dev, "failed to read keymap: %d", error); in hideep_init_input()
843 return error; in hideep_init_input()
857 error = input_register_device(ts->input_dev); in hideep_init_input()
858 if (error) { in hideep_init_input()
859 dev_err(dev, "failed to register input device: %d", error); in hideep_init_input()
860 return error; in hideep_init_input()
875 int error; in hideep_update_fw() local
877 error = kstrtoint(buf, 0, &mode); in hideep_update_fw()
878 if (error) in hideep_update_fw()
879 return error; in hideep_update_fw()
886 error = request_firmware(&fw_entry, fw_name, dev); in hideep_update_fw()
887 if (error) { in hideep_update_fw()
889 fw_name, error); in hideep_update_fw()
895 error = -EINVAL; in hideep_update_fw()
902 error = -EFBIG; in hideep_update_fw()
909 error = hideep_update_firmware(ts, (const __be32 *)fw_entry->data, in hideep_update_fw()
920 return error ?: count; in hideep_update_fw()
998 int error; in hideep_resume() local
1000 error = hideep_power_on(ts); in hideep_resume()
1001 if (error) { in hideep_resume()
1003 return error; in hideep_resume()
1026 int error; in hideep_probe() local
1030 dev_err(&client->dev, "check i2c device error"); in hideep_probe()
1049 error = PTR_ERR(ts->reg); in hideep_probe()
1051 "failed to initialize regmap: %d\n", error); in hideep_probe()
1052 return error; in hideep_probe()
1068 error = hideep_power_on(ts); in hideep_probe()
1069 if (error) { in hideep_probe()
1070 dev_err(&client->dev, "power on failed: %d\n", error); in hideep_probe()
1071 return error; in hideep_probe()
1074 error = devm_add_action_or_reset(&client->dev, hideep_power_off, ts); in hideep_probe()
1075 if (error) in hideep_probe()
1076 return error; in hideep_probe()
1078 error = hideep_load_dwz(ts); in hideep_probe()
1079 if (error) { in hideep_probe()
1080 dev_err(&client->dev, "failed to load dwz: %d", error); in hideep_probe()
1081 return error; in hideep_probe()
1086 error = hideep_init_input(ts); in hideep_probe()
1087 if (error) in hideep_probe()
1088 return error; in hideep_probe()
1090 error = devm_request_threaded_irq(&client->dev, client->irq, in hideep_probe()
1093 if (error) { in hideep_probe()
1095 client->irq, error); in hideep_probe()
1096 return error; in hideep_probe()
1099 error = devm_device_add_group(&client->dev, &hideep_ts_attr_group); in hideep_probe()
1100 if (error) { in hideep_probe()
1102 "failed to add sysfs attributes: %d\n", error); in hideep_probe()
1103 return error; in hideep_probe()