Lines Matching refs:operation

360 	struct mlxbf_i2c_smbus_operation operation[MLXBF_I2C_SMBUS_MAX_OP_CNT];  member
714 struct mlxbf_i2c_smbus_operation *operation; in mlxbf_i2c_smbus_start_transaction() local
751 operation = &request->operation[op_idx]; in mlxbf_i2c_smbus_start_transaction()
752 flags = operation->flags; in mlxbf_i2c_smbus_start_transaction()
768 write_len += operation->length; in mlxbf_i2c_smbus_start_transaction()
769 if (data_idx + operation->length > in mlxbf_i2c_smbus_start_transaction()
775 operation->buffer, operation->length); in mlxbf_i2c_smbus_start_transaction()
776 data_idx += operation->length; in mlxbf_i2c_smbus_start_transaction()
787 read_len = operation->length - 1; in mlxbf_i2c_smbus_start_transaction()
788 read_buf = operation->buffer; in mlxbf_i2c_smbus_start_transaction()
846 request->operation[0].length = 0; in mlxbf_i2c_smbus_quick_command()
847 request->operation[0].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_quick_command()
848 request->operation[0].flags |= read ? MLXBF_I2C_F_READ : 0; in mlxbf_i2c_smbus_quick_command()
856 request->operation[0].length = 1; in mlxbf_i2c_smbus_byte_func()
857 request->operation[0].length += pec_check; in mlxbf_i2c_smbus_byte_func()
859 request->operation[0].flags = MLXBF_I2C_F_SMBUS_OPERATION; in mlxbf_i2c_smbus_byte_func()
860 request->operation[0].flags |= read ? in mlxbf_i2c_smbus_byte_func()
862 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_byte_func()
864 request->operation[0].buffer = data; in mlxbf_i2c_smbus_byte_func()
873 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_byte_func()
874 request->operation[0].flags = in mlxbf_i2c_smbus_data_byte_func()
876 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_byte_func()
877 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_byte_func()
879 request->operation[1].length = 1; in mlxbf_i2c_smbus_data_byte_func()
880 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_byte_func()
881 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_byte_func()
883 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_byte_func()
892 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_word_func()
893 request->operation[0].flags = in mlxbf_i2c_smbus_data_word_func()
895 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_word_func()
896 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_word_func()
898 request->operation[1].length = 2; in mlxbf_i2c_smbus_data_word_func()
899 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_word_func()
900 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_word_func()
902 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_word_func()
912 request->operation[0].length = 1; in mlxbf_i2c_smbus_i2c_block_func()
913 request->operation[0].flags = in mlxbf_i2c_smbus_i2c_block_func()
915 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_i2c_block_func()
916 request->operation[0].buffer = command; in mlxbf_i2c_smbus_i2c_block_func()
923 request->operation[1].length = in mlxbf_i2c_smbus_i2c_block_func()
926 request->operation[1].flags = read ? in mlxbf_i2c_smbus_i2c_block_func()
932 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_i2c_block_func()
934 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_i2c_block_func()
947 request->operation[0].length = 1; in mlxbf_i2c_smbus_block_func()
948 request->operation[0].flags = in mlxbf_i2c_smbus_block_func()
950 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_block_func()
951 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_block_func()
952 request->operation[0].buffer = command; in mlxbf_i2c_smbus_block_func()
954 request->operation[1].length = in mlxbf_i2c_smbus_block_func()
957 request->operation[1].flags = read ? in mlxbf_i2c_smbus_block_func()
959 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_block_func()
961 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_block_func()
974 request->operation[0].length = 1; in mlxbf_i2c_smbus_process_call_func()
975 request->operation[0].flags = in mlxbf_i2c_smbus_process_call_func()
977 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_process_call_func()
978 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_process_call_func()
979 request->operation[0].buffer = command; in mlxbf_i2c_smbus_process_call_func()
981 request->operation[1].length = 2; in mlxbf_i2c_smbus_process_call_func()
982 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_process_call_func()
983 request->operation[1].buffer = data; in mlxbf_i2c_smbus_process_call_func()
985 request->operation[2].length = 3; in mlxbf_i2c_smbus_process_call_func()
986 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_process_call_func()
987 request->operation[2].buffer = data; in mlxbf_i2c_smbus_process_call_func()
999 request->operation[0].length = 1; in mlxbf_i2c_smbus_blk_process_call_func()
1000 request->operation[0].flags = in mlxbf_i2c_smbus_blk_process_call_func()
1002 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_blk_process_call_func()
1003 request->operation[0].flags |= (pec_check) ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_blk_process_call_func()
1004 request->operation[0].buffer = command; in mlxbf_i2c_smbus_blk_process_call_func()
1009 request->operation[1].length = length - pec_check; in mlxbf_i2c_smbus_blk_process_call_func()
1010 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_blk_process_call_func()
1011 request->operation[1].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()
1013 request->operation[2].length = length; in mlxbf_i2c_smbus_blk_process_call_func()
1014 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_blk_process_call_func()
1015 request->operation[2].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()