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

Xianwei Zhao xianwei.zhao at amlogic.com
Sun Nov 1 21:17:07 PST 2026


Hi Markus,
    Thanks for your advice.

On 2026/10/31 16:09, Markus Elfring wrote:
> …
>> +++ 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
> 

Will do.

> Regards,
> Markus



More information about the linux-amlogic mailing list