[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110622194258.GA20340@opensource.wolfsonmicro.com>
Date: Wed, 22 Jun 2011 20:42:59 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@...afoo.de>
Cc: linux-kernel@...r.kernel.org,
Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Liam Girdwood <lrg@...com>, Graeme Gregory <gg@...mlogic.co.uk>
Subject: Re: [PATCH 1/8] regmap: Add generic non-memory mapped register
access API
On Wed, Jun 22, 2011 at 09:20:41PM +0200, Lars-Peter Clausen wrote:
> Well, then the spi regmap driver needs to use read_flag_bit = 7 instead of
> read_flag_bit = 8 and the BUG_ON should also be updated to read_flag_bit >= 8.
Bah, so it should.
> And the current code also disallows to use the first bit as the read_flag. So
> in my opinion using a one-based index here is a good idea.
Disallowing that case was half the intention, the main issue being that
if you're flagging in the bottom bit of the top byte on the bus then
you'll be in the middle of the bitfield used by the register which is
going to confuse things.
If something really needs to use the bottom bit we probably need to add
a second form of mangling which uses the bottom of the register rather
than the top, or allow buses to have bus specific register formatting.
Although come to think of it this doesn't actually help your cases at
all as those are per-device settings and this is a per bus setting so
I'm inclined to just revert back to the original code and say that for a
first pass those devices are being sufficiently odd that we don't
support them, we can add support as an extension later.
--
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