summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-15 14:27:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-15 14:27:51 -0700
commit8e258317dd01261331670877beafa3157bd61478 (patch)
tree00e70b3e411ae55b4efd8b14aaa70b2b58a59ba6 /include
parente41a25c53f96abe40edc5db1626d37a518852d84 (diff)
parent8ad7f3b265a87cd4e5052677545f90f14c855b10 (diff)
Merge tag 'regmap-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "This has been quite a busy release for regmap, the user visible changes are quite minor but there's some quite good work on internal code improvements: - Cleanup helper for __free()ing regmap_fields - Support non-devm I3C regmaps - A bunch of cleanup work, mostly from Andy Shevchenko - Fix for bootstrapping issues with hardware initialised regmaps, which was the main inspiration for some of the cleanups" * tag 'regmap-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: i3c: Add non-devm regmap_init_i3c() helper regmap: debugfs: fix race condition in dummy name allocation regmap: Synchronize cache for the page selector regmap: Simplify devres handling regcache: Move HW readback after cache initialisation regcache: Allocate and free reg_defaults on the same level regcache: Move count check and cache_bypass assignment to the caller regcache: Factor out regcache_hw_exit() helper regcache: Amend printf() specifiers when printing registers regcache: Define iterator inside for-loop and align their types regmap: define cleanup helper for regmap_field regmap: sort header includes regcache: Split regcache_count_cacheable_registers() helper regcache: Remove duplicate check in regcache_hw_init()
Diffstat (limited to 'include')
-rw-r--r--include/linux/regmap.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index caff2240bdab..df44cb30f53b 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -10,15 +10,16 @@
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
*/
-#include <linux/list.h>
-#include <linux/rbtree.h>
-#include <linux/ktime.h>
+#include <linux/bug.h>
+#include <linux/cleanup.h>
#include <linux/delay.h>
#include <linux/err.h>
-#include <linux/bug.h>
-#include <linux/lockdep.h>
-#include <linux/iopoll.h>
#include <linux/fwnode.h>
+#include <linux/iopoll.h>
+#include <linux/ktime.h>
+#include <linux/list.h>
+#include <linux/lockdep.h>
+#include <linux/rbtree.h>
struct module;
struct clk;
@@ -692,6 +693,10 @@ struct regmap *__regmap_init_sdw_mbq(struct device *dev, struct sdw_slave *sdw,
const struct regmap_sdw_mbq_cfg *mbq_config,
struct lock_class_key *lock_key,
const char *lock_name);
+struct regmap *__regmap_init_i3c(struct i3c_device *i3c,
+ const struct regmap_config *config,
+ struct lock_class_key *lock_key,
+ const char *lock_name);
struct regmap *__regmap_init_spi_avmm(struct spi_device *spi,
const struct regmap_config *config,
struct lock_class_key *lock_key,
@@ -999,6 +1004,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
dev, sdw, config, mbq_config)
/**
+ * regmap_init_i3c() - Initialise register map
+ *
+ * @i3c: Device that will be interacted with
+ * @config: Configuration for register map
+ *
+ * The return value will be an ERR_PTR() on error or a valid pointer to
+ * a struct regmap.
+ */
+#define regmap_init_i3c(i3c, config) \
+ __regmap_lockdep_wrapper(__regmap_init_i3c, #config, \
+ i3c, config)
+
+/**
* regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
* to AVMM Bus Bridge
*
@@ -1460,6 +1478,8 @@ struct regmap_field *regmap_field_alloc(struct regmap *regmap,
struct reg_field reg_field);
void regmap_field_free(struct regmap_field *field);
+DEFINE_FREE(regmap_field, struct regmap_field *, if (_T) regmap_field_free(_T))
+
struct regmap_field *devm_regmap_field_alloc(struct device *dev,
struct regmap *regmap, struct reg_field reg_field);
void devm_regmap_field_free(struct device *dev, struct regmap_field *field);