]> Pileus Git - ~andy/linux/blobdiff - include/linux/regmap.h
regmap: Allow drivers to reinitialise the register cache at runtime
[~andy/linux] / include / linux / regmap.h
index 3daac2d8dc37c427bd49d173fe1e0b2d645bed2b..86923a98a7664e5dd3dcd1bfff0016bda56689e1 100644 (file)
@@ -15,8 +15,8 @@
 
 #include <linux/device.h>
 #include <linux/list.h>
-#include <linux/module.h>
 
+struct module;
 struct i2c_client;
 struct spi_device;
 
@@ -25,7 +25,7 @@ enum regcache_type {
        REGCACHE_NONE,
        REGCACHE_INDEXED,
        REGCACHE_RBTREE,
-       REGCACHE_LZO
+       REGCACHE_COMPRESSED
 };
 
 /**
@@ -129,6 +129,8 @@ struct regmap *regmap_init_spi(struct spi_device *dev,
                               const struct regmap_config *config);
 
 void regmap_exit(struct regmap *map);
+int regmap_reinit_cache(struct regmap *map,
+                       const struct regmap_config *config);
 int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
 int regmap_raw_write(struct regmap *map, unsigned int reg,
                     const void *val, size_t val_len);
@@ -143,5 +145,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
 int regcache_sync(struct regmap *map);
 void regcache_cache_only(struct regmap *map, bool enable);
 void regcache_cache_bypass(struct regmap *map, bool enable);
+void regcache_mark_dirty(struct regmap *map);
 
 #endif