[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtAxK1lIooDmdVBP@sirena.org.uk>
Date: Thu, 14 Jul 2022 16:07:23 +0100
From: Mark Brown <broonie@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Question: regmap_field_write() - why using update?
On Thu, Jul 14, 2022 at 05:01:29PM +0200, Krzysztof Kozlowski wrote:
> I am converting my driver using MMIO to regmap from readl/writel and to
> my surprise I found that regmap_field_write() does not behave the same
> as regmap_write(). I would expect that they are the same, except one
> operates on fields.
> However regmap_field_write() uses an update method [1] which means it
> reads and performs update. regmap_write() simply writes without a read.
> I find it inconsistent and a bit confusing. Any reasons for such
> behavior so I won't send a patch which breaks 100 of devices?
How would you propose to write to a field without reading the rest of
the bits in the register? Otherwise you'd be doing a full register
write rather than just a write to the specific field.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists