From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v5 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Date: Sun, 18 Jan 2015 10:47:41 +0100 Message-ID: <20150118094741.GE22880@pengutronix.de> References: <1421451737-7107-1-git-send-email-rjui@broadcom.com> <1421451737-7107-3-git-send-email-rjui@broadcom.com> <54BB795C.6040402@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <54BB795C.6040402-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Arend van Spriel Cc: Ray Jui , Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christian Daudt , Russell King , Scott Branden , Pawel Moll , Ian Campbell , Wolfram Sang , Florian Fainelli , Matt Porter , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Grant Likely , Kumar Gala , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-i2c@vger.kernel.org Hello, On Sun, Jan 18, 2015 at 10:14:04AM +0100, Arend van Spriel wrote: > On 01/17/15 00:42, Ray Jui wrote: >=20 > [...] >=20 > >+/* > >+ * 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 =3D data; > >+ u32 status =3D readl(iproc_i2c->base + IS_OFFSET); > >+ > >+ status&=3D ISR_MASK; > >+ > >+ if (!status) > >+ return IRQ_NONE; > >+ > >+ writel(status, iproc_i2c->base + IS_OFFSET); > >+ complete_all(&iproc_i2c->done); >=20 > 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 pic= k one over the other in this case. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig = | Industrial Linux Solutions | http://www.pengutronix.de/= | -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html