mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: allow to define reg_update_bits for no bus configuration
Date: Wed, 3 Nov 2021 17:01:16 +0000	[thread overview]
Message-ID: <YYLAXL4HjgBGuF91@sirena.org.uk> (raw)
In-Reply-To: <20211102214138.28873-1-ansuelsmth@gmail.com>

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

On Tue, Nov 02, 2021 at 10:41:38PM +0100, Ansuel Smith wrote:

> @@ -3064,7 +3065,7 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
>  	if (change)
>  		*change = false;
>  
> -	if (regmap_volatile(map, reg) && map->reg_update_bits) {
> +	if ((regmap_volatile(map, reg) || !map->bus) && map->reg_update_bits) {
>  		ret = map->reg_update_bits(map->bus_context, reg, mask, val);
>  		if (ret == 0 && change)
>  			*change = true;

I don't understand this change.  The point of the check for volatile
there is that if the register isn't volatile then we need to ensure that
the cache gets updated with any change that happens so we need to go
through paths that include cache updates.  The presence or otherwise of
a bus does not seem at all relevant here.

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

  reply	other threads:[~2021-11-03 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 21:41 Ansuel Smith
2021-11-03 17:01 ` Mark Brown [this message]
2021-11-03 19:48   ` Ansuel Smith
2021-11-03 21:29     ` Mark Brown
2021-11-03 21:53       ` Ansuel Smith
2021-11-04 14:50         ` Mark Brown
2021-11-04 14:57           ` Ansuel Smith

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=YYLAXL4HjgBGuF91@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®