Lines Matching refs:error

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()
650 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()
727 return error ? error : error2; in rohm_ts_load_firmware()
745 int error; in swap_xy_store() local
747 error = kstrtouint(buf, 0, &val); in swap_xy_store()
748 if (error) in swap_xy_store()
749 return error; in swap_xy_store()
751 error = mutex_lock_interruptible(&ts->input->mutex); in swap_xy_store()
752 if (error) in swap_xy_store()
753 return error; in swap_xy_store()
761 error = i2c_smbus_write_byte_data(ts->client, COMMON_SETUP2, in swap_xy_store()
766 return error ? error : count; in swap_xy_store()
784 int error; in inv_x_store() local
786 error = kstrtouint(buf, 0, &val); in inv_x_store()
787 if (error) in inv_x_store()
788 return error; in inv_x_store()
790 error = mutex_lock_interruptible(&ts->input->mutex); in inv_x_store()
791 if (error) in inv_x_store()
792 return error; in inv_x_store()
800 error = i2c_smbus_write_byte_data(ts->client, COMMON_SETUP2, in inv_x_store()
805 return error ? error : count; in inv_x_store()
823 int error; in inv_y_store() local
825 error = kstrtouint(buf, 0, &val); in inv_y_store()
826 if (error) in inv_y_store()
827 return error; in inv_y_store()
829 error = mutex_lock_interruptible(&ts->input->mutex); in inv_y_store()
830 if (error) in inv_y_store()
831 return error; in inv_y_store()
839 error = i2c_smbus_write_byte_data(client, COMMON_SETUP2, in inv_y_store()
844 return error ? error : count; in inv_y_store()
865 int error; in rohm_ts_device_init() local
875 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
877 if (error) in rohm_ts_device_init()
878 return error; in rohm_ts_device_init()
884 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
885 if (error) in rohm_ts_device_init()
886 return error; in rohm_ts_device_init()
888 error = i2c_smbus_write_byte_data(client, EX_WDAT, 0); in rohm_ts_device_init()
889 if (error) in rohm_ts_device_init()
890 return error; in rohm_ts_device_init()
892 error = i2c_smbus_write_byte_data(client, COMMON_SETUP1, 0); in rohm_ts_device_init()
893 if (error) in rohm_ts_device_init()
894 return error; in rohm_ts_device_init()
896 error = i2c_smbus_write_byte_data(client, COMMON_SETUP2, setup2); 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, COMMON_SETUP3, in rohm_ts_device_init()
902 if (error) in rohm_ts_device_init()
903 return error; in rohm_ts_device_init()
905 error = i2c_smbus_write_byte_data(client, THRESHOLD_GESTURE, in rohm_ts_device_init()
907 if (error) in rohm_ts_device_init()
908 return error; in rohm_ts_device_init()
910 error = i2c_smbus_write_byte_data(client, INTERVAL_TIME, 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, CPU_FREQ, CPU_FREQ_10MHZ); 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, PRM_SWOFF_TIME, in rohm_ts_device_init()
921 if (error) in rohm_ts_device_init()
922 return error; in rohm_ts_device_init()
924 error = i2c_smbus_write_byte_data(client, ADC_CTRL, ADC_DIV_DEFAULT); in rohm_ts_device_init()
925 if (error) in rohm_ts_device_init()
926 return error; in rohm_ts_device_init()
928 error = i2c_smbus_write_byte_data(client, ADC_WAIT, ADC_WAIT_DEFAULT); in rohm_ts_device_init()
929 if (error) in rohm_ts_device_init()
930 return error; in rohm_ts_device_init()
935 error = i2c_smbus_write_byte_data(client, STEP_X, STEP_X_DEFAULT); in rohm_ts_device_init()
936 if (error) in rohm_ts_device_init()
937 return error; in rohm_ts_device_init()
939 error = i2c_smbus_write_byte_data(client, STEP_Y, STEP_Y_DEFAULT); in rohm_ts_device_init()
940 if (error) in rohm_ts_device_init()
941 return error; in rohm_ts_device_init()
943 error = i2c_smbus_write_byte_data(client, OFFSET_X, OFFSET_X_DEFAULT); in rohm_ts_device_init()
944 if (error) in rohm_ts_device_init()
945 return error; in rohm_ts_device_init()
947 error = i2c_smbus_write_byte_data(client, OFFSET_Y, OFFSET_Y_DEFAULT); in rohm_ts_device_init()
948 if (error) in rohm_ts_device_init()
949 return error; in rohm_ts_device_init()
951 error = i2c_smbus_write_byte_data(client, THRESHOLD_TOUCH, in rohm_ts_device_init()
953 if (error) in rohm_ts_device_init()
954 return error; in rohm_ts_device_init()
956 error = i2c_smbus_write_byte_data(client, EVR_XY, EVR_XY_DEFAULT); in rohm_ts_device_init()
957 if (error) in rohm_ts_device_init()
958 return error; in rohm_ts_device_init()
960 error = i2c_smbus_write_byte_data(client, EVR_X, EVR_X_DEFAULT); in rohm_ts_device_init()
961 if (error) in rohm_ts_device_init()
962 return error; in rohm_ts_device_init()
964 error = i2c_smbus_write_byte_data(client, EVR_Y, EVR_Y_DEFAULT); in rohm_ts_device_init()
965 if (error) in rohm_ts_device_init()
966 return error; in rohm_ts_device_init()
969 error = i2c_smbus_write_byte_data(client, CALIBRATION_ADJUST, in rohm_ts_device_init()
971 if (error) in rohm_ts_device_init()
972 return error; in rohm_ts_device_init()
974 error = i2c_smbus_write_byte_data(client, SWCONT, SWCONT_DEFAULT); in rohm_ts_device_init()
975 if (error) in rohm_ts_device_init()
976 return error; in rohm_ts_device_init()
978 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_device_init()
981 if (error) in rohm_ts_device_init()
982 return error; in rohm_ts_device_init()
984 error = rohm_ts_load_firmware(client, BU21023_FIRMWARE_NAME); in rohm_ts_device_init()
985 if (error) { in rohm_ts_device_init()
986 dev_err(dev, "failed to load firmware: %d\n", error); in rohm_ts_device_init()
987 return error; in rohm_ts_device_init()
996 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG1, in rohm_ts_device_init()
998 if (error) in rohm_ts_device_init()
999 return error; in rohm_ts_device_init()
1001 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG2, in rohm_ts_device_init()
1003 if (error) in rohm_ts_device_init()
1004 return error; in rohm_ts_device_init()
1006 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG3, in rohm_ts_device_init()
1008 if (error) in rohm_ts_device_init()
1009 return error; in rohm_ts_device_init()
1011 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
1013 if (error) in rohm_ts_device_init()
1014 return error; in rohm_ts_device_init()
1016 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
1018 if (error) in rohm_ts_device_init()
1019 return error; in rohm_ts_device_init()
1022 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
1023 if (error) in rohm_ts_device_init()
1024 return error; in rohm_ts_device_init()
1027 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_device_init()
1030 if (error) in rohm_ts_device_init()
1031 return error; in rohm_ts_device_init()
1033 error = i2c_smbus_write_byte_data(client, ERR_MASK, in rohm_ts_device_init()
1036 if (error) in rohm_ts_device_init()
1037 return error; in rohm_ts_device_init()
1040 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
1045 return error; in rohm_ts_device_init()
1050 int error; in rohm_ts_power_off() local
1052 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1054 if (error) { in rohm_ts_power_off()
1056 "failed to power off device CPU: %d\n", error); in rohm_ts_power_off()
1057 return error; in rohm_ts_power_off()
1060 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1062 if (error) in rohm_ts_power_off()
1064 "failed to power off the device: %d\n", error); in rohm_ts_power_off()
1066 return error; in rohm_ts_power_off()
1073 int error; in rohm_ts_open() local
1076 error = rohm_ts_device_init(client, ts->setup2); in rohm_ts_open()
1077 if (error) { in rohm_ts_open()
1079 "device initialization failed: %d\n", error); in rohm_ts_open()
1080 return error; in rohm_ts_open()
1103 int error; in rohm_bu21023_i2c_probe() local
1116 error = rohm_ts_power_off(client); in rohm_bu21023_i2c_probe()
1117 if (error) in rohm_bu21023_i2c_probe()
1118 return error; in rohm_bu21023_i2c_probe()
1145 error = input_mt_init_slots(input, MAX_CONTACTS, in rohm_bu21023_i2c_probe()
1148 if (error) { in rohm_bu21023_i2c_probe()
1150 return error; in rohm_bu21023_i2c_probe()
1153 error = devm_request_threaded_irq(dev, client->irq, in rohm_bu21023_i2c_probe()
1156 if (error) { in rohm_bu21023_i2c_probe()
1157 dev_err(dev, "failed to request IRQ: %d\n", error); in rohm_bu21023_i2c_probe()
1158 return error; in rohm_bu21023_i2c_probe()
1161 error = input_register_device(input); in rohm_bu21023_i2c_probe()
1162 if (error) { in rohm_bu21023_i2c_probe()
1163 dev_err(dev, "failed to register input device: %d\n", error); in rohm_bu21023_i2c_probe()
1164 return error; in rohm_bu21023_i2c_probe()
1167 error = devm_device_add_group(dev, &rohm_ts_attr_group); in rohm_bu21023_i2c_probe()
1168 if (error) { in rohm_bu21023_i2c_probe()
1169 dev_err(dev, "failed to create sysfs group: %d\n", error); in rohm_bu21023_i2c_probe()
1170 return error; in rohm_bu21023_i2c_probe()
1173 return error; in rohm_bu21023_i2c_probe()