[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ytar85UrdSeJuj2Y@sirena.org.uk>
Date: Tue, 19 Jul 2022 14:04:51 +0100
From: Mark Brown <broonie@...nel.org>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
linux-kernel@...r.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: [PATCH] regmap: support regmap_field_write() on non-readable
fields
On Tue, Jul 19, 2022 at 12:54:02PM +0000, Charles Keepax wrote:
> On Tue, Jul 19, 2022 at 02:14:46PM +0200, Krzysztof Kozlowski wrote:
> > + if (regmap_readable(field->regmap, field->reg))
> > + return regmap_update_bits_base(field->regmap, field->reg,
> > + mask, val << field->shift,
> > + change, async, force);
> I think this will break other valid use-cases, regmap_readable (I
> believe) returns if the register is physically readable, however
> it should still be possible to use update bits if the register is
> in the cache even if it can't physically be read. So really you
> need to fall into this path if it is readable or in the cache.
This is true, we don't currently have a readable_or_cached() check -
this is implemented as trying the cache and only considering actually
reading if there's a read, effectively what we want to do here is force
a cache only read.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists