1. 26 2月, 2014 3 次提交
  2. 22 2月, 2014 1 次提交
  3. 30 12月, 2013 1 次提交
  4. 17 12月, 2013 1 次提交
  5. 24 11月, 2013 1 次提交
  6. 21 11月, 2013 1 次提交
  7. 12 11月, 2013 1 次提交
  8. 15 10月, 2013 1 次提交
  9. 14 10月, 2013 1 次提交
  10. 11 10月, 2013 1 次提交
  11. 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
  12. 09 10月, 2013 3 次提交
  13. 08 10月, 2013 1 次提交
  14. 17 9月, 2013 2 次提交
  15. 17 8月, 2013 1 次提交
  16. 09 8月, 2013 1 次提交
    • I
      regmap: regcache: allow read-only regs to be cached · 515f2261
      Ionut Nicu 提交于
      The regmap_writeable() check should not be done in
      regcache_write() because this prevents read-only
      registers to be cached. After a read on a read-only
      register its value will not be stored in the cache
      and the next time someone will try to read it the
      value will be read from the bus instead of the
      cache.
      
      Instead the regmap_writeable() check should be done
      in _regmap_write() to prevent callers from writing
      to read-only registers.
      Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      515f2261
  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. 16 7月, 2013 1 次提交
  19. 04 7月, 2013 1 次提交
  20. 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
  21. 04 6月, 2013 1 次提交
  22. 25 5月, 2013 1 次提交
  23. 12 5月, 2013 1 次提交
  24. 16 4月, 2013 1 次提交
    • S
      regmap: don't corrupt work buffer in _regmap_raw_write() · 5a08d156
      Stephen Warren 提交于
      _regmap_raw_write() contains code to call regcache_write() to write
      values to the cache. That code calls memcpy() to copy the value data to
      the start of the work_buf. However, at least when _regmap_raw_write() is
      called from _regmap_bus_raw_write(), the value data is in the work_buf,
      and this memcpy() operation may over-write part of that value data,
      depending on the value of reg_bytes + pad_bytes. At least when using
      reg_bytes==1 and pad_bytes==0, corruption of the value data does occur.
      
      To solve this, remove the memcpy() operation, and modify the subsequent
      .parse_val() call to parse the original value buffer directly.
      
      At least in the case of 8-bit register address and 16-bit values, and
      writes of single registers at a time, this memcpy-then-parse combination
      used to cancel each-other out; for a work-buffer containing xx 89 03,
      the memcpy changed it to 89 03 03, and the parse_val changed it back to
      89 89 03, thus leaving the value uncorrupted. This appears completely
      accidental though. Since commit 8a819ff8 "regmap: core: Split out in
      place value parsing", .parse_val only returns the parsed value, and does
      not modify the buffer, and hence does not (accidentally) undo the
      corruption caused by memcpy(). This caused bogus values to get written
      to HW, thus preventing e.g. audio playback on systems with a WM8903
      CODEC. This patch fixes that.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      5a08d156
  25. 10 4月, 2013 1 次提交
    • M
      regmap: Back out work buffer fix · 51a246aa
      Mark Brown 提交于
      This reverts commit bc8ce4 (regmap: don't corrupt work buffer in
      _regmap_raw_write()) since it turns out that it can cause issues when
      taken in isolation from the other changes in -next that lead to its
      discovery.  On the basis that nobody noticed the problems for quite some
      time without that subsequent work let's drop it from v3.9.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      51a246aa
  26. 27 3月, 2013 4 次提交
  27. 22 3月, 2013 1 次提交
    • S
      regmap: don't corrupt work buffer in _regmap_raw_write() · bc8ce4af
      Stephen Warren 提交于
      _regmap_raw_write() contains code to call regcache_write() to write
      values to the cache. That code calls memcpy() to copy the value data to
      the start of the work_buf. However, at least when _regmap_raw_write() is
      called from _regmap_bus_raw_write(), the value data is in the work_buf,
      and this memcpy() operation may over-write part of that value data,
      depending on the value of reg_bytes + pad_bytes. At least when using
      reg_bytes==1 and pad_bytes==0, corruption of the value data does occur.
      
      To solve this, remove the memcpy() operation, and modify the subsequent
      .parse_val() call to parse the original value buffer directly.
      
      At least in the case of 8-bit register address and 16-bit values, and
      writes of single registers at a time, this memcpy-then-parse combination
      used to cancel each-other out; for a work-buffer containing xx 89 03,
      the memcpy changed it to 89 03 03, and the parse_val changed it back to
      89 89 03, thus leaving the value uncorrupted. This appears completely
      accidental though. Since commit 8a819ff8 "regmap: core: Split out in
      place value parsing", .parse_val only returns the parsed value, and does
      not modify the buffer, and hence does not (accidentally) undo the
      corruption caused by memcpy(). This caused bogus values to get written
      to HW, thus preventing e.g. audio playback on systems with a WM8903
      CODEC. This patch fixes that.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      bc8ce4af
  28. 13 3月, 2013 1 次提交
  29. 04 3月, 2013 2 次提交
  30. 05 2月, 2013 1 次提交
  31. 04 2月, 2013 1 次提交