Re: [PATCH 02/10] drivers/mfd/sta2x11-mfd: add regmap support

From: Mark Brown
Date: Wed Oct 24 2012 - 08:49:48 EST


On Wed, Oct 24, 2012 at 02:31:18PM +0200, Davide Ciminaghi wrote:
> On Tue, Oct 23, 2012 at 06:18:38PM +0100, Mark Brown wrote:

> > This and most of your other readable/writable things look like a
> > framework feature waiting to be written - something data driven which
> > takes a table of register ranges and goes and does the
> > __reg_within_range() check on them. Seems like it'd be really useful
> > for devices like this.

> I was looking at other drivers with regmap support, and it actually looks
> like this __reg_within_range (or similar) thing is fairly common.

Yes, that's exactly what I'm saying - lots of people need it so it
should get factored out.

> My opinion is that passing function pointers for
> readable/writeable/precious/volatile methods could still be useful when
> registers' features or access properties can change at runtime (for instance a

This is essential for sparse register maps, really.

Attachment: signature.asc
Description: Digital signature