Re: [PATCH v2 3/6] regmap: Add regmap_pipe_read API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 01, 2018 at 06:17:47PM +0300, Stefan Popa wrote:
> From: Crestez Dan Leonard <leonard.crestez@xxxxxxxxx>
> 
> 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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux