From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 02/15] GPIO: port LoCoMo gpio support from old driver Date: Thu, 6 Nov 2014 06:03:35 +0000 Message-ID: <20141106060335.GR8509@sirena.org.uk> References: <1414454528-24240-1-git-send-email-dbaryshkov@gmail.com> <1414454528-24240-3-git-send-email-dbaryshkov@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YttKMwf6abDJOSyE" 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 To: Dmitry Eremin-Solenikov Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-spi.vger.kernel.org --YttKMwf6abDJOSyE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --YttKMwf6abDJOSyE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUWw82AAoJECTWi3JdVIfQzMAH/27/lKZbrTrd1rIoHTVxu3Pz qQzFDvoBmssvSLHk0fMkvcx7cJ9IahKBs9EtmyM5dR3lhDIfZZi5OYTw+dmyiyVu 07BxmlnkvP7mv5HuI1VrUyfz0SeBxfAIQDsLgiwwikXZD+3eUZgjlZVuWHt3WlAM ITH5dFFv3enp692X0hMRz9XWiFwqlW3w5SXhpqlP5h3PgWPEjIei1QNqe3H9ELBr 5Or31N42bBWSzA1FA5HzBoEbOx8D11E8RUtnhWgixmzFcKoYQmXHDPe+DJ11XCPe 9hhOpeDthhrSKUFi4M6kQxJ218uHjoWNjYsgRAIYgL2bG8dFLKSjSsAUgSXZY94= =saoU -----END PGP SIGNATURE----- --YttKMwf6abDJOSyE--