Lines Matching refs:operation
390 struct mlxbf_i2c_smbus_operation operation[MLXBF_I2C_SMBUS_MAX_OP_CNT]; member
739 struct mlxbf_i2c_smbus_operation *operation; in mlxbf_i2c_smbus_start_transaction() local
776 operation = &request->operation[op_idx]; in mlxbf_i2c_smbus_start_transaction()
777 flags = operation->flags; in mlxbf_i2c_smbus_start_transaction()
793 write_len += operation->length; in mlxbf_i2c_smbus_start_transaction()
794 if (data_idx + operation->length > in mlxbf_i2c_smbus_start_transaction()
800 operation->buffer, operation->length); in mlxbf_i2c_smbus_start_transaction()
801 data_idx += operation->length; in mlxbf_i2c_smbus_start_transaction()
812 read_len = operation->length - 1; in mlxbf_i2c_smbus_start_transaction()
813 read_buf = operation->buffer; in mlxbf_i2c_smbus_start_transaction()
871 request->operation[0].length = 0; in mlxbf_i2c_smbus_quick_command()
872 request->operation[0].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_quick_command()
873 request->operation[0].flags |= read ? MLXBF_I2C_F_READ : 0; in mlxbf_i2c_smbus_quick_command()
881 request->operation[0].length = 1; in mlxbf_i2c_smbus_byte_func()
882 request->operation[0].length += pec_check; in mlxbf_i2c_smbus_byte_func()
884 request->operation[0].flags = MLXBF_I2C_F_SMBUS_OPERATION; in mlxbf_i2c_smbus_byte_func()
885 request->operation[0].flags |= read ? in mlxbf_i2c_smbus_byte_func()
887 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_byte_func()
889 request->operation[0].buffer = data; in mlxbf_i2c_smbus_byte_func()
898 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_byte_func()
899 request->operation[0].flags = in mlxbf_i2c_smbus_data_byte_func()
901 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_byte_func()
902 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_byte_func()
904 request->operation[1].length = 1; in mlxbf_i2c_smbus_data_byte_func()
905 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_byte_func()
906 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_byte_func()
908 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_byte_func()
917 request->operation[0].length = 1; in mlxbf_i2c_smbus_data_word_func()
918 request->operation[0].flags = in mlxbf_i2c_smbus_data_word_func()
920 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_data_word_func()
921 request->operation[0].buffer = command; in mlxbf_i2c_smbus_data_word_func()
923 request->operation[1].length = 2; in mlxbf_i2c_smbus_data_word_func()
924 request->operation[1].length += pec_check; in mlxbf_i2c_smbus_data_word_func()
925 request->operation[1].flags = read ? in mlxbf_i2c_smbus_data_word_func()
927 request->operation[1].buffer = data; in mlxbf_i2c_smbus_data_word_func()
937 request->operation[0].length = 1; in mlxbf_i2c_smbus_i2c_block_func()
938 request->operation[0].flags = in mlxbf_i2c_smbus_i2c_block_func()
940 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_i2c_block_func()
941 request->operation[0].buffer = command; in mlxbf_i2c_smbus_i2c_block_func()
948 request->operation[1].length = in mlxbf_i2c_smbus_i2c_block_func()
951 request->operation[1].flags = read ? in mlxbf_i2c_smbus_i2c_block_func()
957 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_i2c_block_func()
959 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_i2c_block_func()
972 request->operation[0].length = 1; in mlxbf_i2c_smbus_block_func()
973 request->operation[0].flags = in mlxbf_i2c_smbus_block_func()
975 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_block_func()
976 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_block_func()
977 request->operation[0].buffer = command; in mlxbf_i2c_smbus_block_func()
979 request->operation[1].length = in mlxbf_i2c_smbus_block_func()
982 request->operation[1].flags = read ? in mlxbf_i2c_smbus_block_func()
984 request->operation[1].buffer = data + 1; in mlxbf_i2c_smbus_block_func()
986 *data_len = request->operation[1].length; in mlxbf_i2c_smbus_block_func()
999 request->operation[0].length = 1; in mlxbf_i2c_smbus_process_call_func()
1000 request->operation[0].flags = in mlxbf_i2c_smbus_process_call_func()
1002 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_process_call_func()
1003 request->operation[0].flags |= pec_check ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_process_call_func()
1004 request->operation[0].buffer = command; in mlxbf_i2c_smbus_process_call_func()
1006 request->operation[1].length = 2; in mlxbf_i2c_smbus_process_call_func()
1007 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_process_call_func()
1008 request->operation[1].buffer = data; in mlxbf_i2c_smbus_process_call_func()
1010 request->operation[2].length = 3; in mlxbf_i2c_smbus_process_call_func()
1011 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_process_call_func()
1012 request->operation[2].buffer = data; in mlxbf_i2c_smbus_process_call_func()
1024 request->operation[0].length = 1; in mlxbf_i2c_smbus_blk_process_call_func()
1025 request->operation[0].flags = in mlxbf_i2c_smbus_blk_process_call_func()
1027 request->operation[0].flags |= MLXBF_I2C_F_SMBUS_BLOCK; in mlxbf_i2c_smbus_blk_process_call_func()
1028 request->operation[0].flags |= (pec_check) ? MLXBF_I2C_F_SMBUS_PEC : 0; in mlxbf_i2c_smbus_blk_process_call_func()
1029 request->operation[0].buffer = command; in mlxbf_i2c_smbus_blk_process_call_func()
1034 request->operation[1].length = length - pec_check; in mlxbf_i2c_smbus_blk_process_call_func()
1035 request->operation[1].flags = MLXBF_I2C_F_WRITE; in mlxbf_i2c_smbus_blk_process_call_func()
1036 request->operation[1].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()
1038 request->operation[2].length = length; in mlxbf_i2c_smbus_blk_process_call_func()
1039 request->operation[2].flags = MLXBF_I2C_F_READ; in mlxbf_i2c_smbus_blk_process_call_func()
1040 request->operation[2].buffer = data; in mlxbf_i2c_smbus_blk_process_call_func()