lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: fix writes to non incrementing registers
On Wed, Aug 14, 2019 at 02:09:11PM +0100, Ben Whitten wrote:

> So it appeared that the last patch in this area for validating a register
> block [1] broke the regmap_noinc_write use case.

Please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read especially when they have no internet access.
I do frequently catch up on my mail on flights or while otherwise
travelling so this is even more pressing for me than just being about
making things a bit easier to read.

> Because regmap_noinc_write calls _regmap_raw_write and in
> turn hits the _regmap_raw_write_impl, the val_len is the depth of the
> one register to write to and not a block of registers which is assumed
> by the previous check. By inserting a check that the first (and only)
> register is a noinc one allows me to start writing to my FIFO again.

> I'm all for an alternative solution though if there is a cleaner approach.

Like I said if we're checking for nonincrementing registers it shouldn't
just be on the first register, it should be for every address in the
range. Probably accept it if the nonincrementing register is the first
and error otherwise, with some documentation explaining what's going on.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-14 18:20    [W:0.080 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site