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

Wolfram Sang wsa at the-dreams.de
Sun Jan 18 03:06:58 PST 2015


On Sun, Jan 18, 2015 at 10:47:41AM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> On Sun, Jan 18, 2015 at 10:14:04AM +0100, Arend van Spriel wrote:
> > On 01/17/15 00:42, Ray Jui wrote:
> > 
> > [...]
> > 
> > >+/*
> > >+ * 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.
> Yeah, there is always only a single thread waiting. That means both
> complete and complete_all are suitable. AFAIK there is no reason to pick
> one over the other in this case.

Clarity?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150118/ead425df/attachment-0001.sig>


More information about the linux-arm-kernel mailing list