[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130517215246.GA24730@core.coreip.homeip.net>
Date: Fri, 17 May 2013 14:52:46 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Regmap and register ranges
On Fri, May 17, 2013 at 09:50:25PM +0100, Mark Brown wrote:
> On Fri, May 17, 2013 at 09:24:30AM -0700, Dmitry Torokhov wrote:
>
> > I am looking at regmap and I wonder if I am missing something with the
> > way it checks if a window crosses another range boundary or if a
> > selector is in some other window as it seem to be always tripping on
> > itself. Should we skip the current range as we iterate through them
> > and do sanity checks?
>
> > The setup: a device with 0x0000 - 0xffff potential register range, paged
> > in chunks of 256 registers with page selector register repeated at 0xff.
>
> 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.
>
> 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?
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists