Thread (13 messages) 13 messages, 4 authors, 2015-01-19

Re: [PATCH v5 2/3] i2c: iproc: Add Broadcom iProc I2C Driver

flat view

From: Arend van Spriel <hidden>
Date: 2015-01-18 09:14:14
Also in: linux-arm-kernel, linux-i2c, lkml

On 01/17/15 00:42, Ray Jui wrote:

[...]
quoted hunk ↗ jump to hunk
+/*
+ * Can be expanded in the future if more interrupt status bits are utilized
+ */
+#define ISR_MASK (1<<  IS_M_START_BUSY_SHIFT)
+
+static irqreturn_t bcm_iproc_i2c_isr(int irq, void *data)
+{
+	struct bcm_iproc_i2c_dev *iproc_i2c = data;
+	u32 status = readl(iproc_i2c->base + IS_OFFSET);
+
+	status&= ISR_MASK;
+
+	if (!status)
+		return IRQ_NONE;
+
+	writel(status, iproc_i2c->base + IS_OFFSET);
+	complete_all(&iproc_i2c->done);
Looking over this code it seems to me there is always a single process waiting for iproc_i2c->done to complete. So using complete() here would suffice.

Regards,
Arend
quoted hunk ↗ jump to hunk
+
+	return IRQ_HANDLED;
+}
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help