mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question: regmap_field_write() - why using update?
@ 2022-07-14 15:01 Krzysztof Kozlowski
  2022-07-14 15:07 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-14 15:01 UTC (permalink / raw)
  To: Mark Brown, Srinivas Kandagatla, Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-19 12:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 15:01 Question: regmap_field_write() - why using update? Krzysztof Kozlowski
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

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®