Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267007
b: refs/heads/master
c: 6eb0f5e
h: refs/heads/master
i:
  267005: 20a2ce5
  267003: 4829ed3
  266999: 30714a1
  266991: b47aebd
  266975: 6f49f53
  266943: d3e17b2
  266879: da3d851
  266751: 298bff5
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Sep 30, 2011
1 parent 35300fe commit 0a25e4a
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: beb1a10f219ce720c13168203bd5ebe4ce7879e0
refs/heads/master: 6eb0f5e0154facfe4f0acdb9f474cde773319efc
19 changes: 19 additions & 0 deletions trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,25 @@ void regcache_cache_only(struct regmap *map, bool enable)
}
EXPORT_SYMBOL_GPL(regcache_cache_only);

/**
* regcache_cache_bypass: Put a register map into cache bypass mode
*
* @map: map to configure
* @cache_only: flag if changes should not be written to the hardware
*
* When a register map is marked with the cache bypass option, writes
* to the register map API will only update the hardware and not the
* the cache directly. This is useful when syncing the cache back to
* the hardware.
*/
void regcache_cache_bypass(struct regmap *map, bool enable)
{
mutex_lock(&map->lock);
map->cache_bypass = enable;
mutex_unlock(&map->lock);
}
EXPORT_SYMBOL_GPL(regcache_cache_bypass);

bool regcache_set_val(void *base, unsigned int idx,
unsigned int val, unsigned int word_size)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/regmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,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);

#endif

0 comments on commit 0a25e4a

Please sign in to comment.