[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190814161938.GI4640@sirena.co.uk>
Date: Wed, 14 Aug 2019 17:19:38 +0100
From: Mark Brown <broonie@...nel.org>
To: Ben Whitten <ben.whitten@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andreas Färber <afaerber@...e.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, nandor.han@...sala.com
Subject: Re: [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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists