1. 12 11月, 2013 1 次提交
  2. 29 10月, 2013 1 次提交
  3. 24 10月, 2013 1 次提交
  4. 22 10月, 2013 1 次提交
    • Y
      regmap: irq: clear status when disable irq · 4bd7145b
      Yi Zhang 提交于
      clear the status bit if the mask register doesn't prevent
      the chip level irq from being asserted
      
      OR in the following sequence, there will be irq storm happens:
      1) interrupt is triggered;
      2) another thread disables it(the mask bit is set);
      3) _Then_ the interrupt thread is not ACKed(the status bit is not cleared),
         and it's ignored;
      4) if the irq is still asserted because of the uncleared status bit,
         the irq storm happens;
      Signed-off-by: NYi Zhang <yizhang@marvell.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      4bd7145b
  5. 15 10月, 2013 2 次提交
  6. 14 10月, 2013 1 次提交
  7. 11 10月, 2013 2 次提交
  8. 10 10月, 2013 1 次提交
    • A
      regmap: Fix regmap_bulk_write single-rw mutex deadlock · 4174a7a4
      Anthony Olech 提交于
      When regmap_bulk_write() is called with the map->use_single_rw flag set
      an immediate mutex deadlock happens because regmap_raw_write() is called
      after obtaining the mutex and regmap_raw_write() itself then tries to
      obtain the mutex as well.
      
      It is obvious that no one other than myself tried it with a real device.
      I did, but only for the purposes of an experiment and demonstration.
      
      But even if this situation will never ever happen with a real device, it
      is a bug and therefore should be fixed.
      Signed-off-by: NAnthony Olech <anthony.olech.opensource@diasemi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      4174a7a4
  9. 09 10月, 2013 3 次提交
  10. 08 10月, 2013 1 次提交
  11. 17 9月, 2013 2 次提交
  12. 29 8月, 2013 4 次提交
    • L
      regmap: rbtree: Make cache_present bitmap per node · 3f4ff561
      Lars-Peter Clausen 提交于
      With devices which have a dense and small register map but placed at a large
      offset the global cache_present bitmap imposes a huge memory overhead. Making
      the cache_present per rbtree node avoids the issue and easily reduces the memory
      footprint by a factor of ten. For devices with a more sparse map or without a
      large base register offset the memory usage might increase slightly by a few
      bytes, but not significantly. E.g. for a device which has ~50 registers at
      offset 0x4000 the memory footprint of the register cache goes down form 2496
      bytes to 175 bytes.
      
      Moving the bitmap to a per node basis means that the handling of the bitmap is
      now cache implementation specific and can no longer be managed by the core. The
      regcache_sync_block() function is extended by a additional parameter so that the
      cache implementation can tell the core which registers in the block are set and
      which are not. The parameter is optional and if NULL the core assumes that all
      registers are set. The rbtree cache also needs to implement its own drop
      callback instead of relying on the core to handle this.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3f4ff561
    • L
      regmap: rbtree: Reduce number of nodes, take 2 · 472fdec7
      Lars-Peter Clausen 提交于
      Support for reducing the number of nodes and memory consumption of the rbtree
      cache by allowing for small unused holes in the node's register cache block was
      initially added in commit 0c7ed856 ("regmap: Cut down on the average # of nodes
      in the rbtree cache"). But the commit had problems and so its effect was
      reverted again in commit 4e67fb5f ("regmap: rbtree: Fix overlapping rbnodes.").
      This patch brings the feature back of reducing the average number of nodes,
      which will speedup node look-up, while at the same time also reducing the memory
      usage of the rbtree cache. This patch takes a slightly different approach than
      the original patch though. It modifies the adjacent node look-up to not only
      consider nodes that are just one to the left or the right of the register but
      any node that falls in a certain range around the register. The range is
      calculated based on how much memory it would take to allocate a new node
      compared to how much memory it takes adding a set of unused registers to an
      existing node. E.g. if a node takes up 24 bytes and each register in a block
      uses 1 byte the range will be from the register address - 24 to the register
      address + 24. If we find a node that falls within this range it is cheaper or as
      expensive to add the register to the existing node and have a couple of unused
      registers in the node's cache compared to allocating a new node.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      472fdec7
    • L
      regmap: rbtree: Simplify adjacent node look-up · 194c753a
      Lars-Peter Clausen 提交于
      A register which is adjacent to a node will either be left to the first
      register or right to the last register. It will not be within the node's range,
      so there is no point in checking for each register cached by the node whether
      the new register is next to it. It is sufficient to check whether the register
      comes before the first register or after the last register of the node.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      194c753a
    • L
      regmap: debugfs: Fix continued read from registers file · 26ee4741
      Lars-Peter Clausen 提交于
      The regmap_debugfs_get_dump_start() function maps from a file offset to the
      register that can be found at that position in the file. This is done using a
      look-up table. Commit d6814a7d ("regmap: debugfs: Suppress cache for partial
      register files") added a check to bypass the look-up table for partial register
      files, since the offsets in that table are only correct for the full register
      file. The check incorrectly uses the file offset instead of the register base
      address and returns it. This will cause the file offset to be interpreted as a
      register address which will result in a incorrect output from the registers file
      for all reads except at position 0.
      
      The issue can easily be reproduced by doing small reads the registers file, e.g.
      `dd if=registers bs=10 count=5`.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      26ee4741
  13. 27 8月, 2013 1 次提交
  14. 22 8月, 2013 1 次提交
    • D
      regmap: rbtree: Fix overlapping rbnodes. · 4e67fb5f
      David Jander 提交于
      Avoid overlapping register regions by making the initial blklen of a new
      node 1. If a register write occurs to a yet uncached register, that is
      lower than but near an existing node's base_reg, a new node is created
      and it's blklen is set to an arbitrary value (sizeof(*rbnode)). That may
      cause this node to overlap with another node. Those nodes should be merged,
      but this merge doesn't happen yet, so this patch at least makes the initial
      blklen small enough to avoid hitting the wrong node, which may otherwise
      lead to severe breakage.
      Signed-off-by: NDavid Jander <david@protonic.nl>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      4e67fb5f
  15. 17 8月, 2013 1 次提交
  16. 09 8月, 2013 2 次提交
  17. 07 8月, 2013 1 次提交
    • P
      regmap: core: allow a virtual range to cover its own data window · f161d220
      Philipp Zabel 提交于
      I see no reason why a virtual range shouldn't be allowed to cover its
      own data window if the page selection register is in the same place
      on every page.
      For chips which use paged access for all of their registers, but only
      when connected via I2C, and which can access the whole register space
      directly when connected via SPI, this allows to avoid acrobatics with
      the register ranges by simply mapping the I2C ranges over the data
      window beginning at 0x0, and then using linear access for the SPI
      variant.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f161d220
  18. 05 8月, 2013 1 次提交
    • L
      regmap: cache: Make sure to sync the last register in a block · 2d49b598
      Lars-Peter Clausen 提交于
      regcache_sync_block_raw_flush() expects the address of the register after last
      register that needs to be synced as its parameter. But the last call to
      regcache_sync_block_raw_flush() in regcache_sync_block_raw() passes the address
      of the last register in the block. This effectively always skips over the last
      register in a block, even if it needs to be synced. In order to fix it increase
      the address by one register.
      
      The issue was introduced in commit 75a5f89f ("regmap: cache: Write consecutive
      registers in a single block write").
      
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      2d49b598
  19. 27 7月, 2013 1 次提交
  20. 24 7月, 2013 1 次提交
  21. 16 7月, 2013 1 次提交
  22. 04 7月, 2013 1 次提交
  23. 19 6月, 2013 1 次提交
  24. 12 6月, 2013 1 次提交
    • S
      regmap: Add regmap_field APIs · 67252287
      Srinivas Kandagatla 提交于
      It is common to access regmap registers at bit level, using
      regmap_update_bits or regmap_read functions, however the end user has to
      take care of a mask or shifting. This becomes overhead when such use
      cases are high. Having a common function to do this is much convenient
      and less error prone.
      
      The idea of regmap_field is simple, regmap_field gives a logical
      structure to bits of the regmap register, and the driver can use this
      logical entity without the knowledge of the bit positions and masks all
      over the code. This way code looks much neat and it need not handle the
      masks, shifts every time it access the those entities.
      
      With this new regmap_field_read/write apis the end user can setup a
      regmap field using regmap_field_init and use the return regmap_field to
      read write the register field without worrying about the masks or
      shifts.
      
      Also this apis will be useful for drivers which are based on regmaps,
      like some clocks or pinctrls which can work on the regmap_fields
      directly without having to worry about bit positions.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      67252287
  25. 04 6月, 2013 1 次提交
  26. 03 6月, 2013 1 次提交
  27. 02 6月, 2013 1 次提交
  28. 25 5月, 2013 1 次提交
  29. 24 5月, 2013 1 次提交
  30. 23 5月, 2013 1 次提交
  31. 14 5月, 2013 1 次提交