Merge tag 'for-linus-5.12b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / include / linux / regmap.h
index e7834d9..2cc4ecd 100644 (file)
@@ -315,6 +315,10 @@ typedef void (*regmap_unlock)(void *);
  *                   masks are used.
  * @zero_flag_mask: If set, read_flag_mask and write_flag_mask are used even
  *                   if they are both empty.
+ * @use_relaxed_mmio: If set, MMIO R/W operations will not use memory barriers.
+ *                    This can avoid load on devices which don't require strict
+ *                    orderings, but drivers should carefully add any explicit
+ *                    memory barriers when they may require them.
  * @use_single_read: If set, converts the bulk read operation into a series of
  *                   single read operations. This is useful for a device that
  *                   does not support  bulk read.
@@ -388,6 +392,7 @@ struct regmap_config {
 
        bool use_single_read;
        bool use_single_write;
+       bool use_relaxed_mmio;
        bool can_multi_write;
 
        enum regmap_endian reg_format_endian;
@@ -570,6 +575,10 @@ struct regmap *__regmap_init_sdw(struct sdw_slave *sdw,
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
                                 const char *lock_name);
+struct regmap *__regmap_init_sdw_mbq(struct sdw_slave *sdw,
+                                    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,
@@ -619,6 +628,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
                                 const char *lock_name);
+struct regmap *__devm_regmap_init_sdw_mbq(struct sdw_slave *sdw,
+                                         const struct regmap_config *config,
+                                         struct lock_class_key *lock_key,
+                                         const char *lock_name);
 struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
@@ -817,6 +830,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
        __regmap_lockdep_wrapper(__regmap_init_sdw, #config,            \
                                sdw, config)
 
+/**
+ * regmap_init_sdw_mbq() - Initialise register map
+ *
+ * @sdw: 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_sdw_mbq(sdw, config)                                       \
+       __regmap_lockdep_wrapper(__regmap_init_sdw_mbq, #config,                \
+                               sdw, config)
+
 /**
  * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
  * to AVMM Bus Bridge
@@ -989,6 +1015,20 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
        __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config,       \
                                sdw, config)
 
+/**
+ * devm_regmap_init_sdw_mbq() - Initialise managed register map
+ *
+ * @sdw: 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_sdw_mbq(sdw, config)                  \
+       __regmap_lockdep_wrapper(__devm_regmap_init_sdw_mbq, #config,   \
+                               sdw, config)
+
 /**
  * devm_regmap_init_slimbus() - Initialise managed register map
  *