]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/base/regmap/internal.h
regmap: Introduce caching support
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Mon, 19 Sep 2011 13:34:00 +0000 (14:34 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 19 Sep 2011 18:06:31 +0000 (19:06 +0100)
commit9fabe24e9b1af84509b842731d2beaf85e66681e
tree6ff64e0b6f42775925fdb3d396adce620a64e6f6
parentb9fb3f3e77cbd536b245db023091e3b7423adeba
regmap: Introduce caching support

This patch introduces caching support for regmap.  The regcache API
has evolved essentially out of ASoC soc-cache so most of the actual
caching types (except LZO) have been tested in the past.

The purpose of regcache is to optimize in time and space the handling
of register caches.  Time optimization is achieved by not having to go
over a slow bus like I2C to read the value of a register, instead it is
cached locally in memory and can be retrieved faster.  Regarding space
optimization, some of the cache types are better at packing the caches,
for e.g. the rbtree and the LZO caches.  By doing this the sacrifice in
time still wins over doing I2C transactions.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/Makefile
drivers/base/regmap/internal.h
drivers/base/regmap/regcache.c [new file with mode: 0644]
include/linux/regmap.h