1. 19 Sep, 2011 3 commits
    • Dimitris Papastamos's avatar
      regmap: Add the rbtree cache support · 28644c80
      Dimitris Papastamos authored
      This patch adds support for the rbtree cache compression type.
      
      Each rbnode manages a variable length block of registers.  There can be no
      two nodes with overlapping blocks.  Each block has a base register and a
      currently top register, all the other registers, if any, lie in between these
      two and in ascending order.
      
      The reasoning behind the construction of this rbtree is simple.  In the
      snd_soc_rbtree_cache_init() function, we iterate over the register defaults
      provided by the regcache core.  For each register value that is non-zero we
      insert it in the rbtree.  In order to determine in which rbnode we need
      to add the register, we first look if there is another register already
      added that is adjacent to the one we are about to add.  If that is the case
      we append it in that rbnode block, otherwise we create a new rbnode
      with a single register in its block and add it to the tree.
      
      There are various optimizations across the implementation to speed up lookups
      by caching the most recently used rbnode.
      Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      28644c80
    • Dimitris Papastamos's avatar
      regmap: Add the indexed cache support · 195af65c
      Dimitris Papastamos authored
      This is the simplest form of a cache available in regcache.  Any
      registers whose default value is 0 are ignored.  If any of those
      registers are modified in the future, they will be placed in the
      cache on demand.  The cache layout is essentially using the provided
      register defaults by the regcache core directly and does not re-map
      it to another representation.
      Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      195af65c
    • Dimitris Papastamos's avatar
      regmap: Introduce caching support · 9fabe24e
      Dimitris Papastamos authored
      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: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      9fabe24e
  2. 09 Sep, 2011 2 commits
  3. 05 Sep, 2011 6 commits
  4. 22 Aug, 2011 6 commits
  5. 21 Aug, 2011 2 commits
    • Mark Brown's avatar
      ae130d22
    • Mark Brown's avatar
      regmap: Allow drivers to specify register defaults · bd20eb54
      Mark Brown authored
      It is useful for the register cache code to be able to specify the
      default values for the device registers. The major use is when restoring
      the register cache after suspend, knowing the register defaults allows
      us to skip registers that are at their default values when we resume which
      can be a substantial win on larger modern devices. For some devices
      (mostly older ones) the hardware does not support readback so the only way we
      can know the values is from code and so initializing the cache with default
      values makes it much easier for drivers work with read/modify/write
      updates.
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      bd20eb54
  6. 14 Aug, 2011 3 commits
  7. 12 Aug, 2011 2 commits
  8. 09 Aug, 2011 5 commits
  9. 08 Aug, 2011 11 commits