Re: [PATCH v8 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver
From: Markus Elfring
Date: Sat Nov 14 2026 - 04:11:07 EST
…
> +++ b/drivers/i2c/busses/i2c-amlogic-a9.c
> @@ -0,0 +1,430 @@
…
> +static irqreturn_t aml_i2c_irq(int irqno, void *dev_id)
> +{
…
> + spin_lock(&i2c->lock);
> + irq_state = readl(i2c->regs + REG_CFG_IRQ_STATE);
…
> + clear_irq_status(i2c, IRQ_ALL_MASK);
> + spin_unlock(&i2c->lock);
> +
> + return IRQ_HANDLED;
> +}
…
What did hinder you to avoid duplicate source code a bit more for such a function implementation?
https://lore.kernel.org/linux-i2c/84565a50-0c52-45ff-b43a-3d30902690df@xxxxxxxxxxx/
Can another lock guard become helpful here?
Regards,
Markus