mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 19:27:30 +0100	[thread overview]
Message-ID: <YtBgEreCVZyD0kwb@sirena.org.uk> (raw)
In-Reply-To: <277e0484-60bd-7405-4cd1-acf0a03ef195@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

On Thu, Jul 14, 2022 at 05:15:34PM +0200, Krzysztof Kozlowski wrote:
> On 14/07/2022 17:13, Krzysztof Kozlowski wrote:

> > Indeed, I forgot about bits in a field... So it has to be like this or I
> > need to use regmap_write(). I find the regmap field API very useful for
> > devices with different register layouts, but the actual "fields" part is
> > not really needed in my case.

> ... and few registers (like "clear" registers) actually do not allow to
> read.

The write only registers are a good point - we could handle them through
special casing, that'd avoid any overhead from reading or issues if a
physical read happens to return something unfortunate for some reason.
Now I think about it there's also the fun case of registers which don't
have symmetric read and write, though at some point regmap_field does
stop being useful and those might well be pushing it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-07-14 18:27 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
2022-07-14 15:13   ` Krzysztof Kozlowski
2022-07-14 15:15     ` Krzysztof Kozlowski
2022-07-14 18:27       ` Mark Brown [this message]
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=YtBgEreCVZyD0kwb@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®