From: Mark Brown <broonie@kernel.org>
To: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
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 14:21:38 +0100 [thread overview]
Message-ID: <643e5dd9-2d1f-4cc7-90e0-22e4a07ecd0f@sirena.org.uk> (raw)
In-Reply-To: <f7cf3e43-c7bc-67ac-e9ea-e7a79bcd8a88@fi.rohmeurope.com>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On Fri, Apr 28, 2023 at 12:36:51PM +0000, Vaittinen, Matti wrote:
> On 4/28/23 14:35, Mark Brown wrote:
> > 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!
Yeah, like you said in your commit there are cases where suppressing the
write is still useful - you might have some bits that are volatile and
some not or you might have something like a pattern where the hardware
can set bits and the host writes 1 to clear. One common thing is to
have read only status bits mixed in with normal read/write bits.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-04-28 13:21 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
2023-04-28 13:21 ` Mark Brown [this message]
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=643e5dd9-2d1f-4cc7-90e0-22e4a07ecd0f@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Matti.Vaittinen@fi.rohmeurope.com \
--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®