Lines Matching refs:operation
358 struct mlxbf_i2c_smbus_operation operation[MLXBF_I2C_SMBUS_MAX_OP_CNT]; member
695 struct mlxbf_i2c_smbus_operation *operation; in mlxbf_i2c_smbus_start_transaction() local
723 operation = &request->operation[op_idx]; in mlxbf_i2c_smbus_start_transaction()
724 flags = operation->flags; in mlxbf_i2c_smbus_start_transaction()
740 write_len += operation->length; in mlxbf_i2c_smbus_start_transaction()
742 operation->buffer, operation->length); in mlxbf_i2c_smbus_start_transaction()
743 data_idx += operation->length; in mlxbf_i2c_smbus_start_transaction()
754 read_len = operation->length - 1; in mlxbf_i2c_smbus_start_transaction()
755 read_buf = operation->buffer; in mlxbf_i2c_smbus_start_transaction()
810 request->operation[0].length = 0; in mlxbf_i2c_smbus_quick_command()
811 request->operation[0].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_quick_command()
812 request->operation[0].flags |= read ? MLXBF_I2C_F_READ : 0; in mlxbf_i2c_smbus_quick_command()
820 request->operation[0].length = 1; in mlxbf_i2c_smbus_byte_func()
821 request->operation[0].length += pec_check; in mlxbf_i2c_smbus_byte_func()
823 request->operation[0].flags = MLXBF_I2C_F_SMBUS_OPERATION; in mlxbf_i2c_smbus_byte_func()
824 request->operation[0].flags |= read ? in mlxbf_i2c_smbus_byte_func()
826 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_byte_func()
828 request->operation[0].buffer = data; in mlxbf_i2c_smbus_byte_func()
837 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_byte_func()
838 request->operation[0].flags = in mlxbf_i2c_smbus_data_byte_func()
840 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_byte_func()
841 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_byte_func()
843 request->operation[1].length = 1; in mlxbf_i2c_smbus_data_byte_func()
844 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_byte_func()
845 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_byte_func()
847 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_byte_func()
856 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_word_func()
857 request->operation[0].flags = in mlxbf_i2c_smbus_data_word_func()
859 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_word_func()
860 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_word_func()
862 request->operation[1].length = 2; in mlxbf_i2c_smbus_data_word_func()
863 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_word_func()
864 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_word_func()
866 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_word_func()
876 request->operation[0].length = 1; in mlxbf_i2c_smbus_i2c_block_func()
877 request->operation[0].flags = in mlxbf_i2c_smbus_i2c_block_func()
879 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_i2c_block_func()
880 request->operation[0].buffer = command; in mlxbf_i2c_smbus_i2c_block_func()
887 request->operation[1].length = in mlxbf_i2c_smbus_i2c_block_func()
890 request->operation[1].flags = read ? in mlxbf_i2c_smbus_i2c_block_func()
896 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_i2c_block_func()
898 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_i2c_block_func()
911 request->operation[0].length = 1; in mlxbf_i2c_smbus_block_func()
912 request->operation[0].flags = in mlxbf_i2c_smbus_block_func()
914 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_block_func()
915 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_block_func()
916 request->operation[0].buffer = command; in mlxbf_i2c_smbus_block_func()
918 request->operation[1].length = in mlxbf_i2c_smbus_block_func()
921 request->operation[1].flags = read ? in mlxbf_i2c_smbus_block_func()
923 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_block_func()
925 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_block_func()
938 request->operation[0].length = 1; in mlxbf_i2c_smbus_process_call_func()
939 request->operation[0].flags = in mlxbf_i2c_smbus_process_call_func()
941 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_process_call_func()
942 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_process_call_func()
943 request->operation[0].buffer = command; in mlxbf_i2c_smbus_process_call_func()
945 request->operation[1].length = 2; in mlxbf_i2c_smbus_process_call_func()
946 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_process_call_func()
947 request->operation[1].buffer = data; in mlxbf_i2c_smbus_process_call_func()
949 request->operation[2].length = 3; in mlxbf_i2c_smbus_process_call_func()
950 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_process_call_func()
951 request->operation[2].buffer = data; in mlxbf_i2c_smbus_process_call_func()
963 request->operation[0].length = 1; in mlxbf_i2c_smbus_blk_process_call_func()
964 request->operation[0].flags = in mlxbf_i2c_smbus_blk_process_call_func()
966 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_blk_process_call_func()
967 request->operation[0].flags |= (pec_check) ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_blk_process_call_func()
968 request->operation[0].buffer = command; in mlxbf_i2c_smbus_blk_process_call_func()
973 request->operation[1].length = length - pec_check; in mlxbf_i2c_smbus_blk_process_call_func()
974 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_blk_process_call_func()
975 request->operation[1].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()
977 request->operation[2].length = length; in mlxbf_i2c_smbus_blk_process_call_func()
978 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_blk_process_call_func()
979 request->operation[2].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()