[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130618183359.GR1403@sirena.org.uk>
Date: Tue, 18 Jun 2013 19:33:59 +0100
From: Mark Brown <broonie@...nel.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Lior Amsalem <alior@...vell.com>,
Jason Cooper <jason@...edaemon.net>,
Andrew Lunn <andrew@...n.ch>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
Stephen Warren <swarren@...dotorg.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>,
Grant Likely <grant.likely@...retlab.ca>,
Ben Dooks <ben.dooks@...ethink.co.uk>,
Rob Landley <rob@...dley.net>,
Gregory CLEMENT <gregory.clement@...e-electrons.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Subject: Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver
On Tue, Jun 18, 2013 at 04:11:16PM +0100, Russell King - ARM Linux wrote:
> On Tue, Jun 18, 2013 at 05:02:49PM +0200, Linus Walleij wrote:
> > Nowadays I would do the above with regmap_update_bits().
> > Mutual exclusion for read-modify-write of individual bits in a
> > register is one of those cases where doing a regmap over
> > a memory-mapped register range makes a lot of sense.
> > (drivers/mfd/syscon.c being a nice example)
> So, for that solution we need to have some kind of global regmap per
> register or somesuch. Then you run into regmap needing a struct
> device - well, with a shared register, which struct device do you
> use, or do you have to invent one?
> That sounds more heavy-weight than is really necessary.
Yes, regmap is far too heavyweight for a lot of these things - it
shouldn't really go in performance critical at the CPU level paths, it's
designed around things where I/O costs are considerable and worth
avoiding.
I do think that this is a very good idea - with the I2C/SPI drivers I
was reviewing prior to regmap there were always just far too many simple
bugs with read/modify/write cycles so factoring out the code really
helped with review.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists