From: Mark Brown <broonie@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Question: regmap_field_write() - why using update?
Date: Thu, 14 Jul 2022 16:07:23 +0100 [thread overview]
Message-ID: <YtAxK1lIooDmdVBP@sirena.org.uk> (raw)
In-Reply-To: <e759045a-bc01-c194-35ad-42b534ccaa01@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-07-14 15:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 15:01 Krzysztof Kozlowski
2022-07-14 15:07 ` Mark Brown [this message]
2022-07-14 15:13 ` Krzysztof Kozlowski
2022-07-14 15:15 ` Krzysztof Kozlowski
2022-07-14 18:27 ` Mark Brown
2022-07-19 12:01 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YtAxK1lIooDmdVBP@sirena.org.uk \
--to=broonie@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®