From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Eremin-Solenikov Date: Tue, 11 Nov 2014 13:16:38 +0000 Subject: Re: [PATCH 02/15] GPIO: port LoCoMo gpio support from old driver Message-Id: List-Id: References: <1414454528-24240-1-git-send-email-dbaryshkov@gmail.com> <1414454528-24240-3-git-send-email-dbaryshkov@gmail.com> <20141106060335.GR8509@sirena.org.uk> In-Reply-To: <20141106060335.GR8509@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mark Brown Cc: Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" , Linux Input , "linux-leds@vger.kernel.org" , "linux-spi@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "alsa-devel@alsa-project.org" , Andrea Adami , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Alexandre Courbot , Dmitry Torokhov , Bryan Wu , Richard Purdie , Samuel Ortiz , Lee Jones 2014-11-06 9:03 GMT+03:00 Mark Brown : > On Thu, Nov 06, 2014 at 01:33:24AM +0400, Dmitry Eremin-Solenikov wrote: >> 2014-11-03 16:43 GMT+03:00 Linus Walleij : > >> > Yes that's the point: if you use regmap mmio you get the RMW-locking >> > for free, with the regmap implementation. > >> Just to be more concrete. Currently locomo_gpio_ack_irq() function uses >> one lock and one unlock for doing 3 consecutive RMW I I convert locomo >> to regmap, will that be 3 lock/unlock calls or still one? (Or maybe I'm >> trying to be over-protective here and adding more lock/unlock cycles >> won't matter that much?) > > You'll get three lock/unlocks, we could add an interface for bulk > updates under one lock if it's important though. > >> Next question: if I have to export regmap to several subdrivers, is it better >> to have one big regmap or to have one-map-per-driver approach? > > One regmap for the physical register map which is shared between all the > users. Mark, Linus, Just to better understand your suggestions: do you want me to convert to regmap only gpio driver or do you suggest to convert all LoCoMo drivers? That is doable, of course, but the amount of changes is overwhelming. Also I'm concerned about the performance impact from going through regmap layers. -- With best wishes Dmitry