wangzhi-art commented on code in PR #15648: URL: https://github.com/apache/nuttx/pull/15648#discussion_r1926259849
########## arch/arm/src/xmc4/xmc4_i2c.c: ########## @@ -837,8 +844,8 @@ static int i2c_transfer(struct i2c_master_s *dev, } else { + spin_unlock_irqrestore(&priv->spinlock, state); Review Comment:  The comment here indicates that the spin lock is used to achieve the effect of disabling interrupts, so the spin lock still needs to be retained. Regarding whether mutex can be deleted, I think it is better not to delete it, because when the I2C BUS cannot be acquired exclusively, the CPU resources can be abandoned and enter the blocking state to give up system resources. This should be in line with the previous design logic. If only the spin lock is used, it will be busy waiting all the time, which may not be in line with the previous logic. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org