Re: [PATCH v10 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver

From: Xianwei Zhao

Date: Wed Nov 18 2026 - 02:16:57 EST


Hi Markus,

On 2026/11/17 21:21, Markus Elfring wrote:
…
+++ b/drivers/i2c/busses/i2c-amlogic-a9.c
@@ -0,0 +1,428 @@
…
+static int aml_i2c_xfer_msg(struct aml_i2c *i2c, struct i2c_msg *msg, bool last)
+{
…
+ spin_lock_irqsave(&i2c->lock, flags);
+ i2c->state = (msg->flags & I2C_M_RD) ? A9_STATE_READ : A9_STATE_WRITE;
…
+ /* Start the transfer */
+ aml_i2c_do_start(i2c, msg);
+ spin_unlock_irqrestore(&i2c->lock, flags);
…
+ if (!time_left) {
+ guard(spinlock_irqsave)(&i2c->lock);
…
+ }
+
+ return i2c->error;
+}…
Will development interests grow also for the application of another scoped lock guard?
https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/cleanup.h#L325-L328


Will do.

Regards,
Markus