From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-kernel@vger.kernel.org, Michael.Hennerich@analog.com,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/6] regmap: Add a magic bus type to handle quirks of analog devices ADIS sensors.
Date: Wed, 7 Sep 2011 11:32:31 -0700 [thread overview]
Message-ID: <20110907183230.GA4423@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4E67B742.6030302@cam.ac.uk>
On Wed, Sep 07, 2011 at 07:26:10PM +0100, Jonathan Cameron wrote:
> On 09/07/11 18:47, Mark Brown wrote:
> > On Wed, Sep 07, 2011 at 05:19:43PM +0100, Jonathan Cameron wrote:
> > To be honest I'm not terribly happy about
> > pushing this into the regmap core code; if we start needing to do stuff
> > like this we should expose the bus interface.
> That's certainly an option, but I'd really like to use the regmap caching
> stuff in here. These things can have quite a few registers that other than
> their weird read / write quirks look much like any other register based
> device. (particularly ignoring the burst reads but they tend to apply
> to volatile registers only so caching is probably irrelevant).
> At the moment, the only hooks AFAIKS to allow this are at the bus level.
> I'm not sure where else they could go. (I haven't actually looked much
> at the cache code yet though).
Well, if there's not hooks they could be added if it's not too painful.
However I'm not convinced that's sane.
> Actually I may have misunderstood, do you mean expose the bus interface
> within regmap or just not use regmap at all?
Either. Or either expose marshalling or add configuration for the
marshalling depending on what's being done, I'm not convinced you need
to be working at SPI level at all.
> >> +static struct regmap_bus regmap_spi_adi = {
> >> + .write = regmap_spi_write,
> >> + .read = regmap_spi_read,
> >> +};
> > You want to implement the gather write too if you can.
> Doesn't really exist other than by linearising them into a series
> of calls to the write function. (assuming I understand what those
> functions are doing right!)
If you build up a series of SPI transfers you just need to control when
/CS gets bounced appropriately.
next prev parent reply other threads:[~2011-09-07 18:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4E6600A8.4020101@cam.ac.uk>
[not found] ` <20110906175435.GA2924@opensource.wolfsonmicro.com>
[not found] ` <Prayer.1.3.4.1109062213100.4243@hermes-2.csi.cam.ac.uk>
2011-09-07 16:10 ` Blockers on IIO usage of regmap Jonathan Cameron
2011-09-07 16:19 ` [RFC PATCH 0/6] Using regmap with ADIS devices Jonathan Cameron
2011-09-07 16:19 ` [PATCH 1/6] SPI: add ability to say we want a cs change after every transfer Jonathan Cameron
2011-09-07 17:35 ` Mark Brown
2011-09-07 18:14 ` Jonathan Cameron
2011-09-07 18:12 ` Mark Brown
2011-09-07 18:28 ` Jonathan Cameron
2011-09-07 16:19 ` [PATCH 2/6] regmap: Add a magic bus type to handle quirks of analog devices ADIS sensors Jonathan Cameron
2011-09-07 17:47 ` Mark Brown
2011-09-07 18:26 ` Jonathan Cameron
2011-09-07 18:32 ` Mark Brown [this message]
2011-09-07 18:50 ` Jonathan Cameron
2011-09-07 18:44 ` Mark Brown
2011-09-07 19:14 ` Jonathan Cameron
2011-09-07 16:19 ` [PATCH 3/6] staging:iio:imu: adis16400 partial conversion to regmap Jonathan Cameron
2011-09-07 16:23 ` Jonathan Cameron
2011-09-07 16:19 ` [PATCH 4/6] regmap-spi-adi + staging:iio:imu:adis16400 halve register addresses Jonathan Cameron
2011-09-07 16:19 ` [PATCH 5/6] regmap-spi-adi generalize regmap_spi_read Jonathan Cameron
2011-09-07 16:19 ` [PATCH 6/6] staging:iio:imu:adis16400 make use of regmap bulk read capabilities Jonathan Cameron
2011-09-07 17:57 ` Blockers on IIO usage of regmap Mark Brown
2011-09-07 18:12 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110907183230.GA4423@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).