Subversion Repositories Kolibri OS

Rev

Rev 5078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5078 Rev 5271
Line 46... Line 46...
46
	int r = 0;
46
	int r = 0;
Line 47... Line 47...
47
 
47
 
Line 48... Line 48...
48
	memset(&args, 0, sizeof(args));
48
	memset(&args, 0, sizeof(args));
-
 
49
 
Line 49... Line 50...
49
 
50
	mutex_lock(&chan->mutex);
Line 50... Line 51...
50
	mutex_lock(&chan->mutex);
51
	mutex_lock(&rdev->mode_info.atom_context->scratch_mutex);
51
 
52
 
Line 80... Line 81...
80
	args.ucI2CSpeed = TARGET_HW_I2C_CLOCK;
81
	args.ucI2CSpeed = TARGET_HW_I2C_CLOCK;
81
	args.ucTransBytes = num;
82
	args.ucTransBytes = num;
82
	args.ucSlaveAddr = slave_addr << 1;
83
	args.ucSlaveAddr = slave_addr << 1;
83
	args.ucLineNumber = chan->rec.i2c_id;
84
	args.ucLineNumber = chan->rec.i2c_id;
Line 84... Line 85...
84
 
85
 
Line 85... Line 86...
85
	atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
86
	atom_execute_table_scratch_unlocked(rdev->mode_info.atom_context, index, (uint32_t *)&args);
86
 
87
 
87
	/* error */
88
	/* error */
88
	if (args.ucStatus != HW_ASSISTED_I2C_STATUS_SUCCESS) {
89
	if (args.ucStatus != HW_ASSISTED_I2C_STATUS_SUCCESS) {
Line 93... Line 94...
93
 
94
 
94
	if (!(flags & HW_I2C_WRITE))
95
	if (!(flags & HW_I2C_WRITE))
Line 95... Line 96...
95
		radeon_atom_copy_swap(buf, base, num, false);
96
		radeon_atom_copy_swap(buf, base, num, false);
-
 
97
 
96
 
98
done:
Line 97... Line 99...
97
done:
99
	mutex_unlock(&rdev->mode_info.atom_context->scratch_mutex);
98
	mutex_unlock(&chan->mutex);
100
	mutex_unlock(&chan->mutex);