Re: [PATCH v8 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver
From: Xianwei Zhao
Date: Mon Nov 16 2026 - 21:16:42 EST
Hi Markus,
Thanks for your review.
On 2026/11/14 17:10, Markus Elfring wrote:
…
+++ 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?
Indeed, Will use guard.