diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-09 09:11:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-09 09:11:22 -0700 |
commit | 12a5146bda2f21728bdd475f10e5785fc62c9c29 (patch) | |
tree | 58ad20ec47632419abc4716d418056874fca80a3 /include | |
parent | 2ec98f567888501df0140c858af5f5ea10216a6f (diff) | |
parent | aaccf3863ce22108ae1d3bac82604eec9d8ae44c (diff) |
Merge tag 'regmap-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown:
"This is a relatively busy release for regmap, though not busy in the
grand scheme of things, with the addition of support for I3C from
Vitor Soares and a few small fixes and cleanups"
* tag 'regmap-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: select CONFIG_REGMAP while REGMAP_SCCB is set
regmap: lzo: Switch to bitmap_zalloc()
regmap: fix bulk writes on paged registers
regmap: add i3c bus support
regmap: debugfs: Fix memory leak in regmap_debugfs_init
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index d3dea823af8e..38e1369e8bd0 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -22,6 +22,7 @@ struct module; struct clk; struct device; struct i2c_client; +struct i3c_device; struct irq_domain; struct slim_device; struct spi_device; @@ -621,6 +622,10 @@ struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus, const struct regmap_config *config, struct lock_class_key *lock_key, const char *lock_name); +struct regmap *__devm_regmap_init_i3c(struct i3c_device *i3c, + const struct regmap_config *config, + struct lock_class_key *lock_key, + const char *lock_name); /* * Wrapper for regmap_init macros to include a unique lockdep key and name * for each call. No-op if CONFIG_LOCKDEP is not set. @@ -979,6 +984,21 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); #define devm_regmap_init_slimbus(slimbus, config) \ __regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \ slimbus, config) + +/** + * devm_regmap_init_i3c() - Initialise managed 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. The regmap will be automatically freed by the + * device management code. + */ +#define devm_regmap_init_i3c(i3c, config) \ + __regmap_lockdep_wrapper(__devm_regmap_init_i3c, #config, \ + i3c, config) + int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk); void regmap_mmio_detach_clk(struct regmap *map); void regmap_exit(struct regmap *map); |