mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Mark Brown <broonie@kernel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Question: regmap_field_write() - why using update?
Date: Thu, 14 Jul 2022 17:01:29 +0200	[thread overview]
Message-ID: <e759045a-bc01-c194-35ad-42b534ccaa01@linaro.org> (raw)

Hi guys,

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?

[1]
https://elixir.bootlin.com/linux/latest/source/include/linux/regmap.h#L1307

Best regards,
Krzysztof

             reply	other threads:[~2022-07-14 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 15:01 Krzysztof Kozlowski [this message]
2022-07-14 15:07 ` Mark Brown
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=e759045a-bc01-c194-35ad-42b534ccaa01@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=broonie@kernel.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®