Re: Regmap and register ranges

From: Mark Brown
Date: Sat May 18 2013 - 07:24:25 EST

On Fri, May 17, 2013 at 02:52:46PM -0700, Dmitry Torokhov wrote:
> On Fri, May 17, 2013 at 09:50:25PM +0100, Mark Brown wrote:

> > The general idea is that the pages should be mapped in to virtual
> > addresses rather than real ones so in your example you might add a
> > prefix so all the registers are numbered 0x10000 to 0x1ffff. The
> > physical registers and the ones inside the paged range aren't supposed
> > to overlap.

> The issue I have with doing an arbitrary offset is that then data
> exposed in debugfs does not match the data from device's specification.

Adding a random prefix on the front does mean you can just ignore the
prefix. But this seems a fairly odd way for the device to do things to
be honest... paging every single register is a bit random.

> > We should probably either do sanity checks for this at init time or come
> > up with a sensible way to support this in case someone does decide to do
> > it, though this is the first time anyone noticed.

> Does this mean you'll be open to patches allowing this scenario?

Obviously I'm always open to patches that aren't crazy, though I do
reserve the right to define what's crazy :)

Attachment: signature.asc
Description: Digital signature