Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266992
b: refs/heads/master
c: 92afb28
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Sep 19, 2011
1 parent b47aebd commit c2ca964
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39a58439d6006c48941511276c0041f56352c529
refs/heads/master: 92afb286d744511f51a05f8acb6c111d05737617
18 changes: 18 additions & 0 deletions trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,24 @@ int regcache_sync(struct regmap *map)
}
EXPORT_SYMBOL_GPL(regcache_sync);

/**
* regcache_cache_only: Put a register map into cache only mode
*
* @map: map to configure
* @cache_only: flag if changes should be written to the hardware
*
* When a register map is marked as cache only writes to the register
* map API will only update the register cache, they will not cause
* any hardware changes. This is useful for allowing portions of
* drivers to act as though the device were functioning as normal when
* it is disabled for power saving reasons.
*/
void regcache_cache_only(struct regmap *map, bool enable)
{
map->cache_only = enable;
}
EXPORT_SYMBOL_GPL(regcache_cache_only);

bool regcache_set_val(void *base, unsigned int idx,
unsigned int val, unsigned int word_size)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/regmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
unsigned int mask, unsigned int val);

int regcache_sync(struct regmap *map);
void regcache_cache_only(struct regmap *map, bool enable);

#endif

0 comments on commit c2ca964

Please sign in to comment.