archive mirror
 help / color / mirror / Atom feed
From: Christian Marangi <>
To: Mark Brown <>,
	Greg Kroah-Hartman <>,
	"Rafael J. Wysocki" <>,
Cc: Christian Marangi <>
Subject: [PATCH] regmap: permit to set reg_update_bits with bulk implementation
Date: Fri, 15 Jul 2022 22:10:32 +0200	[thread overview]
Message-ID: <> (raw)

A regmap may still require to set a custom reg_update_bits instead of
relying to the regmap_bus_read/write general function.

Permit to set it in the map if provided by the regmap config.

Signed-off-by: Christian Marangi <>

If this is accepted, this is needed for net-next tree so a signed tags
is needed, if it's not a problem.

 drivers/base/regmap/regmap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 0caa5690c560..fee221c5008c 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -882,6 +882,8 @@ struct regmap *__regmap_init(struct device *dev,
 	if (config && config->read && config->write) {
 		map->reg_read  = _regmap_bus_read;
+		if (config->reg_update_bits)
+			map->reg_update_bits = config->reg_update_bits;
 		/* Bulk read/write */
 		map->read = config->read;

             reply	other threads:[~2022-07-15 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 20:10 Christian Marangi [this message]
2022-07-18 13:43 ` [PATCH] regmap: permit to set reg_update_bits with bulk implementation Mark Brown
2022-07-18 13:48   ` Christian Marangi
2022-07-18 14:42     ` Mark Brown
2022-07-18 14:44       ` Christian Marangi
2022-07-18 20:37         ` Christian Marangi

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).