[PATCH v3 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver
Markus Elfring
Markus.Elfring at web.de
Sat Oct 31 01:09:13 PDT 2026
…
> +++ b/drivers/i2c/busses/i2c-amlogic-a9.c
> @@ -0,0 +1,445 @@
…
> +static int aml_i2c_xfer_msg(struct aml_i2c *i2c, struct i2c_msg *msg, bool last)
> +{
…
> + if (!time_left) {
> + spin_lock_irqsave(&i2c->lock, flags);
> + i2c->state = A9_STATE_IDLE;
> + clear_irq_status(i2c, IRQ_ALL_MASK);
> + reset_fifo_pos(i2c);
> + spin_unlock_irqrestore(&i2c->lock, flags);
> + return -ETIMEDOUT;
> + }
…
Under which circumstances would you become interested to apply a statement
like “guard(spinlock_irqsave)(&i2c->lock);”?
https://elixir.bootlin.com/linux/v7.3/source/include/linux/spinlock.h#L642-L645
Regards,
Markus
More information about the linux-amlogic
mailing list