Lines Matching full:error

122 #define ERROR			0x80  macro
332 int error, error2; in rohm_ts_manual_calibration() local
347 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_manual_calibration()
350 if (error) in rohm_ts_manual_calibration()
353 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
355 if (error) in rohm_ts_manual_calibration()
364 error = rohm_i2c_burst_read(client, PRM1_X_H, buf, sizeof(buf)); in rohm_ts_manual_calibration()
365 if (error) in rohm_ts_manual_calibration()
378 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
380 if (error) in rohm_ts_manual_calibration()
413 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
415 if (error) in rohm_ts_manual_calibration()
418 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
420 if (error) in rohm_ts_manual_calibration()
423 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
425 if (error) in rohm_ts_manual_calibration()
431 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_manual_calibration()
433 if (error) in rohm_ts_manual_calibration()
436 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_manual_calibration()
438 if (error) in rohm_ts_manual_calibration()
442 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_manual_calibration()
443 if (error) in rohm_ts_manual_calibration()
459 error = val; in rohm_ts_manual_calibration()
470 error = val; in rohm_ts_manual_calibration()
479 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG1, in rohm_ts_manual_calibration()
481 if (error) in rohm_ts_manual_calibration()
484 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG2, in rohm_ts_manual_calibration()
486 if (error) in rohm_ts_manual_calibration()
489 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG3, in rohm_ts_manual_calibration()
491 if (error) in rohm_ts_manual_calibration()
495 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
498 if (error) in rohm_ts_manual_calibration()
504 error = -EBUSY; in rohm_ts_manual_calibration()
513 return error ? error : error2; in rohm_ts_manual_calibration()
536 int error; in rohm_ts_soft_irq() local
539 error = i2c_smbus_write_byte_data(client, INT_MASK, INT_ALL); in rohm_ts_soft_irq()
540 if (error) in rohm_ts_soft_irq()
544 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_soft_irq()
545 if (error) in rohm_ts_soft_irq()
550 error = rohm_i2c_burst_read(client, POS_X1_H, buf, sizeof(buf)); in rohm_ts_soft_irq()
551 if (error) in rohm_ts_soft_irq()
629 error = rohm_ts_manual_calibration(ts); in rohm_ts_soft_irq()
630 if (error) in rohm_ts_soft_irq()
632 error); in rohm_ts_soft_irq()
649 int error, error2; in rohm_ts_load_firmware() local
652 error = request_firmware(&fw, firmware_name, dev); in rohm_ts_load_firmware()
653 if (error) { in rohm_ts_load_firmware()
655 firmware_name, error); in rohm_ts_load_firmware()
656 return error; in rohm_ts_load_firmware()
659 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_load_firmware()
662 if (error) in rohm_ts_load_firmware()
670 error = i2c_smbus_write_byte_data(client, EX_WDAT, 0); in rohm_ts_load_firmware()
671 if (error) in rohm_ts_load_firmware()
675 error = i2c_smbus_write_byte_data(client, EX_ADDR_H, 0); in rohm_ts_load_firmware()
676 if (error) in rohm_ts_load_firmware()
679 error = i2c_smbus_write_byte_data(client, EX_ADDR_L, 0); in rohm_ts_load_firmware()
680 if (error) in rohm_ts_load_firmware()
683 error = i2c_smbus_write_byte_data(client, COMMON_SETUP1, in rohm_ts_load_firmware()
685 if (error) in rohm_ts_load_firmware()
695 error = i2c_smbus_write_i2c_block_data(client, EX_WDAT, in rohm_ts_load_firmware()
697 if (error) in rohm_ts_load_firmware()
707 error = status; in rohm_ts_load_firmware()
712 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_load_firmware()
713 if (error) in rohm_ts_load_firmware()
719 error = -EIO; in rohm_ts_load_firmware()
725 return error ? error : error2; in rohm_ts_load_firmware()
731 int error; in rohm_ts_update_setting() local
740 error = i2c_smbus_write_byte_data(ts->client, in rohm_ts_update_setting()
743 if (error) in rohm_ts_update_setting()
744 return error; in rohm_ts_update_setting()
766 int error; in swap_xy_store() local
768 error = kstrtouint(buf, 0, &val); in swap_xy_store()
769 if (error) in swap_xy_store()
770 return error; in swap_xy_store()
772 error = rohm_ts_update_setting(ts, SWAP_XY, val); in swap_xy_store()
773 return error ?: count; in swap_xy_store()
791 int error; in inv_x_store() local
793 error = kstrtouint(buf, 0, &val); in inv_x_store()
794 if (error) in inv_x_store()
795 return error; in inv_x_store()
797 error = rohm_ts_update_setting(ts, INV_X, val); in inv_x_store()
798 return error ?: count; in inv_x_store()
816 int error; in inv_y_store() local
818 error = kstrtouint(buf, 0, &val); in inv_y_store()
819 if (error) in inv_y_store()
820 return error; in inv_y_store()
822 error = rohm_ts_update_setting(ts, INV_Y, val); in inv_y_store()
823 return error ?: count; in inv_y_store()
841 int error; in rohm_ts_device_init() local
851 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
853 if (error) in rohm_ts_device_init()
854 return error; in rohm_ts_device_init()
860 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
861 if (error) in rohm_ts_device_init()
862 return error; in rohm_ts_device_init()
864 error = i2c_smbus_write_byte_data(client, EX_WDAT, 0); in rohm_ts_device_init()
865 if (error) in rohm_ts_device_init()
866 return error; in rohm_ts_device_init()
868 error = i2c_smbus_write_byte_data(client, COMMON_SETUP1, 0); in rohm_ts_device_init()
869 if (error) in rohm_ts_device_init()
870 return error; in rohm_ts_device_init()
872 error = i2c_smbus_write_byte_data(client, COMMON_SETUP2, setup2); in rohm_ts_device_init()
873 if (error) in rohm_ts_device_init()
874 return error; in rohm_ts_device_init()
876 error = i2c_smbus_write_byte_data(client, COMMON_SETUP3, in rohm_ts_device_init()
878 if (error) in rohm_ts_device_init()
879 return error; in rohm_ts_device_init()
881 error = i2c_smbus_write_byte_data(client, THRESHOLD_GESTURE, in rohm_ts_device_init()
883 if (error) in rohm_ts_device_init()
884 return error; in rohm_ts_device_init()
886 error = i2c_smbus_write_byte_data(client, INTERVAL_TIME, in rohm_ts_device_init()
888 if (error) in rohm_ts_device_init()
889 return error; in rohm_ts_device_init()
891 error = i2c_smbus_write_byte_data(client, CPU_FREQ, CPU_FREQ_10MHZ); in rohm_ts_device_init()
892 if (error) in rohm_ts_device_init()
893 return error; in rohm_ts_device_init()
895 error = i2c_smbus_write_byte_data(client, PRM_SWOFF_TIME, in rohm_ts_device_init()
897 if (error) in rohm_ts_device_init()
898 return error; in rohm_ts_device_init()
900 error = i2c_smbus_write_byte_data(client, ADC_CTRL, ADC_DIV_DEFAULT); in rohm_ts_device_init()
901 if (error) in rohm_ts_device_init()
902 return error; in rohm_ts_device_init()
904 error = i2c_smbus_write_byte_data(client, ADC_WAIT, ADC_WAIT_DEFAULT); in rohm_ts_device_init()
905 if (error) in rohm_ts_device_init()
906 return error; in rohm_ts_device_init()
911 error = i2c_smbus_write_byte_data(client, STEP_X, STEP_X_DEFAULT); in rohm_ts_device_init()
912 if (error) in rohm_ts_device_init()
913 return error; in rohm_ts_device_init()
915 error = i2c_smbus_write_byte_data(client, STEP_Y, STEP_Y_DEFAULT); in rohm_ts_device_init()
916 if (error) in rohm_ts_device_init()
917 return error; in rohm_ts_device_init()
919 error = i2c_smbus_write_byte_data(client, OFFSET_X, OFFSET_X_DEFAULT); in rohm_ts_device_init()
920 if (error) in rohm_ts_device_init()
921 return error; in rohm_ts_device_init()
923 error = i2c_smbus_write_byte_data(client, OFFSET_Y, OFFSET_Y_DEFAULT); in rohm_ts_device_init()
924 if (error) in rohm_ts_device_init()
925 return error; in rohm_ts_device_init()
927 error = i2c_smbus_write_byte_data(client, THRESHOLD_TOUCH, in rohm_ts_device_init()
929 if (error) in rohm_ts_device_init()
930 return error; in rohm_ts_device_init()
932 error = i2c_smbus_write_byte_data(client, EVR_XY, EVR_XY_DEFAULT); in rohm_ts_device_init()
933 if (error) in rohm_ts_device_init()
934 return error; in rohm_ts_device_init()
936 error = i2c_smbus_write_byte_data(client, EVR_X, EVR_X_DEFAULT); in rohm_ts_device_init()
937 if (error) in rohm_ts_device_init()
938 return error; in rohm_ts_device_init()
940 error = i2c_smbus_write_byte_data(client, EVR_Y, EVR_Y_DEFAULT); in rohm_ts_device_init()
941 if (error) in rohm_ts_device_init()
942 return error; in rohm_ts_device_init()
945 error = i2c_smbus_write_byte_data(client, CALIBRATION_ADJUST, in rohm_ts_device_init()
947 if (error) in rohm_ts_device_init()
948 return error; in rohm_ts_device_init()
950 error = i2c_smbus_write_byte_data(client, SWCONT, SWCONT_DEFAULT); in rohm_ts_device_init()
951 if (error) in rohm_ts_device_init()
952 return error; in rohm_ts_device_init()
954 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_device_init()
957 if (error) in rohm_ts_device_init()
958 return error; in rohm_ts_device_init()
960 error = rohm_ts_load_firmware(client, BU21023_FIRMWARE_NAME); in rohm_ts_device_init()
961 if (error) { in rohm_ts_device_init()
962 dev_err(dev, "failed to load firmware: %d\n", error); in rohm_ts_device_init()
963 return error; in rohm_ts_device_init()
972 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG1, in rohm_ts_device_init()
974 if (error) in rohm_ts_device_init()
975 return error; in rohm_ts_device_init()
977 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG2, in rohm_ts_device_init()
979 if (error) in rohm_ts_device_init()
980 return error; in rohm_ts_device_init()
982 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG3, in rohm_ts_device_init()
984 if (error) in rohm_ts_device_init()
985 return error; in rohm_ts_device_init()
987 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
989 if (error) in rohm_ts_device_init()
990 return error; in rohm_ts_device_init()
992 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
994 if (error) in rohm_ts_device_init()
995 return error; in rohm_ts_device_init()
998 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
999 if (error) in rohm_ts_device_init()
1000 return error; in rohm_ts_device_init()
1003 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_device_init()
1006 if (error) in rohm_ts_device_init()
1007 return error; in rohm_ts_device_init()
1009 error = i2c_smbus_write_byte_data(client, ERR_MASK, in rohm_ts_device_init()
1012 if (error) in rohm_ts_device_init()
1013 return error; in rohm_ts_device_init()
1016 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
1018 if (error) in rohm_ts_device_init()
1019 return error; in rohm_ts_device_init()
1026 int error; in rohm_ts_power_off() local
1028 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1030 if (error) { in rohm_ts_power_off()
1032 "failed to power off device CPU: %d\n", error); in rohm_ts_power_off()
1033 return error; in rohm_ts_power_off()
1036 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1038 if (error) in rohm_ts_power_off()
1040 "failed to power off the device: %d\n", error); in rohm_ts_power_off()
1042 return error; in rohm_ts_power_off()
1049 int error; in rohm_ts_open() local
1052 error = rohm_ts_device_init(client, ts->setup2); in rohm_ts_open()
1053 if (error) { in rohm_ts_open()
1055 "device initialization failed: %d\n", error); in rohm_ts_open()
1056 return error; in rohm_ts_open()
1079 int error; in rohm_bu21023_i2c_probe() local
1092 error = rohm_ts_power_off(client); in rohm_bu21023_i2c_probe()
1093 if (error) in rohm_bu21023_i2c_probe()
1094 return error; in rohm_bu21023_i2c_probe()
1121 error = input_mt_init_slots(input, MAX_CONTACTS, in rohm_bu21023_i2c_probe()
1124 if (error) { in rohm_bu21023_i2c_probe()
1126 return error; in rohm_bu21023_i2c_probe()
1129 error = devm_request_threaded_irq(dev, client->irq, in rohm_bu21023_i2c_probe()
1132 if (error) { in rohm_bu21023_i2c_probe()
1133 dev_err(dev, "failed to request IRQ: %d\n", error); in rohm_bu21023_i2c_probe()
1134 return error; in rohm_bu21023_i2c_probe()
1137 error = input_register_device(input); in rohm_bu21023_i2c_probe()
1138 if (error) { in rohm_bu21023_i2c_probe()
1139 dev_err(dev, "failed to register input device: %d\n", error); in rohm_bu21023_i2c_probe()
1140 return error; in rohm_bu21023_i2c_probe()
1143 return error; in rohm_bu21023_i2c_probe()