[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180802101437.GE9117@sirena.org.uk>
Date: Thu, 2 Aug 2018 11:14:37 +0100
From: Mark Brown <broonie@...nel.org>
To: Stefan Popa <stefan.popa@...log.com>
Cc: jic23@...nel.org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
Crestez Dan Leonard <leonard.crestez@...el.com>
Subject: Re: [PATCH v2 3/6] regmap: Add regmap_pipe_read API
On Wed, Aug 01, 2018 at 06:17:47PM +0300, Stefan Popa wrote:
> From: Crestez Dan Leonard <leonard.crestez@...el.com>
>
> The regmap API usually assumes that bulk read operations will read a
> range of registers but some I2C/SPI devices have certain registers for
> which a such a read operation will return data from an internal FIFO
> instead. Add an explicit API to support bulk read with pipe rather than
> range semantics.
If we're going to do this it's probably best to explicitly mark the
registers where it will work otherwise we'll end up confusing ourselves
and corrupting data at some point, provide another op like readable and
so on.
I'd also suggest calling it something like _noinc (for non-incrementing)
instead of _pipe as I was a bit confused about what a pipe read was. We
could also have a software implementation for things like ADC outputs
where the register doesn't have the convenient nonincrementing behaviour
but we want to do repeated reads.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists