regmap: Add support for discarding parts of the register cache
Allow drivers to discard parts of the register cache, for example if part of the hardware has been reset. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
f722406faa
commit
697e85bc6a
4 changed files with 70 additions and 0 deletions
|
@ -394,6 +394,8 @@ bool regmap_can_raw_write(struct regmap *map);
|
|||
int regcache_sync(struct regmap *map);
|
||||
int regcache_sync_region(struct regmap *map, unsigned int min,
|
||||
unsigned int max);
|
||||
int regcache_drop_region(struct regmap *map, unsigned int min,
|
||||
unsigned int max);
|
||||
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);
|
||||
|
@ -562,6 +564,13 @@ static inline int regcache_sync_region(struct regmap *map, unsigned int min,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int regcache_drop_region(struct regmap *map, unsigned int min,
|
||||
unsigned int max)
|
||||
{
|
||||
WARN_ONCE(1, "regmap API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void regcache_cache_only(struct regmap *map, bool enable)
|
||||
{
|
||||
WARN_ONCE(1, "regmap API is disabled");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue