From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v2 1/1] gpio: merrifield: Introduce GPIO driver to support Merrifield Date: Mon, 11 Jul 2016 13:08:48 +0300 Message-ID: <1468231728.30123.538.camel@linux.intel.com> References: <1467976103-133151-1-git-send-email-andriy.shevchenko@linux.intel.com> <20160711045503.GF14693@lahna.fi.intel.com> <1468230187.30123.533.camel@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mga14.intel.com ([192.55.52.115]:1823 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbcGKKI5 (ORCPT ); Mon, 11 Jul 2016 06:08:57 -0400 In-Reply-To: <1468230187.30123.533.camel@linux.intel.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij , Mika Westerberg Cc: "linux-gpio@vger.kernel.org" , David Cohen , "Wood, Brian J" On Mon, 2016-07-11 at 12:43 +0300, Andy Shevchenko wrote: > On Mon, 2016-07-11 at 11:13 +0200, Linus Walleij wrote: > > On Mon, Jul 11, 2016 at 6:55 AM, Mika Westerberg > > wrote: > > > On Fri, Jul 08, 2016 at 02:08:23PM +0300, Andy Shevchenko wrote: > > > > +static void mrfld_irq_ack(struct irq_data *d) > > > > +{ > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct mrfld_gpio *priv =3D irq_= data_get_irq_chip_data(d); > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0u32 gpio =3D irqd_to_hwirq(d); > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0void __iomem *gisr =3D gpio_reg(= &priv->chip, gpio, GISR); > > > > + > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0writel(BIT(gpio % 32), gisr); > > >=20 > > > It just occured me that you actually need to take the lock here. > > > If > > > another thread is doing series of updates on the same register > > > this > > > might step over what the other thread is doing. > >=20 > > I accept incremental patches, I think it's safe to begin with this > > merged > > and work from there if there are issues. >=20 > You were faster than me in case it's already merged. Otherwise there > is > v3 I sent today. Discard that one. I sent an incremental patch. "gpio: merrifield: Protect irq_ack() and gpio_set() by lock" --=20 Andy Shevchenko Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html