aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorVitor Soares <Vitor.Soares@synopsys.com>2019-06-06 17:12:02 +0200
committerMark Brown <broonie@kernel.org>2019-06-07 13:09:55 +0100
commit6445500b43129baac36c56d629cf1dd9e1104167 (patch)
treee2cfdc293ae0641d25e300a2480983b916e21dec /include/linux/regmap.h
parentLinux 5.2-rc1 (diff)
downloadwireguard-linux-6445500b43129baac36c56d629cf1dd9e1104167.tar.xz
wireguard-linux-6445500b43129baac36c56d629cf1dd9e1104167.zip
regmap: add i3c bus support
Add basic support for i3c bus. This is a simple implementation that only give support for SDR Read and Write commands. Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index daeec7dbd65c..f65984d98b07 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -25,6 +25,7 @@ struct module;
struct clk;
struct device;
struct i2c_client;
+struct i3c_device;
struct irq_domain;
struct slim_device;
struct spi_device;
@@ -624,6 +625,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.
@@ -982,6 +987,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);