linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: permit to set reg_update_bits with bulk implementation
@ 2022-07-15 20:10 Christian Marangi
  2022-07-18 13:43 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Marangi @ 2022-07-15 20:10 UTC (permalink / raw)
  To: Mark Brown, Greg Kroah-Hartman, Rafael J. Wysocki, linux-kernel
  Cc: Christian Marangi

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 <ansuelsmth@gmail.com>
---

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;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-18 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 20:10 [PATCH] regmap: permit to set reg_update_bits with bulk implementation Christian Marangi
2022-07-18 13:43 ` 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

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).