Merge remote-tracking branches 'regmap/topic/1wire', 'regmap/topic/irq' and 'regmap...
[muen/linux.git] / include / linux / regmap.h
index 400172b59f24560bebc2baa5e1a4576fe88f1a76..978abfbac61783091046d63dbe23aedd2ad82b3c 100644 (file)
@@ -461,6 +461,10 @@ struct regmap *__regmap_init_spmi_ext(struct spmi_device *dev,
                                      const struct regmap_config *config,
                                      struct lock_class_key *lock_key,
                                      const char *lock_name);
                                      const struct regmap_config *config,
                                      struct lock_class_key *lock_key,
                                      const char *lock_name);
+struct regmap *__regmap_init_w1(struct device *w1_dev,
+                                const struct regmap_config *config,
+                                struct lock_class_key *lock_key,
+                                const char *lock_name);
 struct regmap *__regmap_init_mmio_clk(struct device *dev, const char *clk_id,
                                      void __iomem *regs,
                                      const struct regmap_config *config,
 struct regmap *__regmap_init_mmio_clk(struct device *dev, const char *clk_id,
                                      void __iomem *regs,
                                      const struct regmap_config *config,
@@ -493,6 +497,10 @@ struct regmap *__devm_regmap_init_spmi_ext(struct spmi_device *dev,
                                           const struct regmap_config *config,
                                           struct lock_class_key *lock_key,
                                           const char *lock_name);
                                           const struct regmap_config *config,
                                           struct lock_class_key *lock_key,
                                           const char *lock_name);
+struct regmap *__devm_regmap_init_w1(struct device *w1_dev,
+                                     const struct regmap_config *config,
+                                     struct lock_class_key *lock_key,
+                                     const char *lock_name);
 struct regmap *__devm_regmap_init_mmio_clk(struct device *dev,
                                           const char *clk_id,
                                           void __iomem *regs,
 struct regmap *__devm_regmap_init_mmio_clk(struct device *dev,
                                           const char *clk_id,
                                           void __iomem *regs,
@@ -596,6 +604,19 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
        __regmap_lockdep_wrapper(__regmap_init_spmi_ext, #config,       \
                                dev, config)
 
        __regmap_lockdep_wrapper(__regmap_init_spmi_ext, #config,       \
                                dev, config)
 
+/**
+ * regmap_init_w1() - Initialise register map
+ *
+ * @w1_dev: 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_w1(w1_dev, config)                                 \
+       __regmap_lockdep_wrapper(__regmap_init_w1, #config,             \
+                               w1_dev, config)
+
 /**
  * regmap_init_mmio_clk() - Initialise register map with register clock
  *
 /**
  * regmap_init_mmio_clk() - Initialise register map with register clock
  *
@@ -711,6 +732,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
        __regmap_lockdep_wrapper(__devm_regmap_init_spmi_ext, #config,  \
                                dev, config)
 
        __regmap_lockdep_wrapper(__devm_regmap_init_spmi_ext, #config,  \
                                dev, config)
 
+/**
+ * devm_regmap_init_w1() - Initialise managed register map
+ *
+ * @w1_dev: 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_w1(w1_dev, config)                            \
+       __regmap_lockdep_wrapper(__devm_regmap_init_w1, #config,        \
+                               w1_dev, config)
 /**
  * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
  *
 /**
  * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
  *