From: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
To: Mark Brown <broonie@kernel.org>,
Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] regmap: force update_bits() to write to HW when reg is volatile
Date: Fri, 28 Apr 2023 12:36:51 +0000 [thread overview]
Message-ID: <f7cf3e43-c7bc-67ac-e9ea-e7a79bcd8a88@fi.rohmeurope.com> (raw)
In-Reply-To: <14d81f72-ab34-4405-b826-b52636d2be18@sirena.org.uk>
On 4/28/23 14:35, Mark Brown wrote:
> On Fri, Apr 28, 2023 at 08:44:06AM +0300, Matti Vaittinen wrote:
>> In many cases the volatile registers are expected to be written to
>> regardless of the existing value (because, the value of a volatile
>> register can't be trusted to stay the same during RMW cycle). In fact, it
>> is questionable if the volatile registers and regmap_update_bits()
>> conceptually make sense without device specific map->reg_update_bits.
>
> I think you're looking for regmap_write_bits() here.
Yes. Thanks for pointing this out to me. This is the functionality I
searched for.
However, my question really was if the regmap_update_bits() (and
regmap_set_bits() / regmap_clear_bits()) should automatically work as
regmap_write_bits() for volatile registers. I'll take your answer as
"no" - and try to remember just use regmap_write_bits() with volatile
registers which may require forcing writing the value even when it is
not changed. Thanks!
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2023-04-28 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 5:44 Matti Vaittinen
2023-04-28 11:35 ` Mark Brown
2023-04-28 12:36 ` Vaittinen, Matti [this message]
2023-04-28 13:21 ` Mark Brown
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=f7cf3e43-c7bc-67ac-e9ea-e7a79bcd8a88@fi.rohmeurope.com \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=broonie@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=rafael@kernel.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®