From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arend van Spriel Subject: Re: [PATCH v5 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Date: Sun, 18 Jan 2015 10:14:04 +0100 Message-ID: <54BB795C.6040402@broadcom.com> References: <1421451737-7107-1-git-send-email-rjui@broadcom.com> <1421451737-7107-3-git-send-email-rjui@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421451737-7107-3-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ray Jui Cc: Wolfram Sang , =?ISO-8859-1?Q?Uwe_Kleine-K=F6nig?= , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , Christian Daudt , Matt Porter , Florian Fainelli , Russell King , Scott Branden , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org 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. Regards, Arend > + > + 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