1. 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
  2. 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
  3. 27 3月, 2013 4 次提交
  4. 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
  5. 13 3月, 2013 1 次提交
  6. 04 3月, 2013 2 次提交
  7. 05 2月, 2013 1 次提交
  8. 04 2月, 2013 2 次提交
    • A
      regmap: Export regmap_async_complete_cb · f804fb56
      Axel Lin 提交于
      This fixes below build error when CONFIG_REGMAP=y && CONFIG_REGMAP_SPI=m
      
      ERROR: "regmap_async_complete_cb" [drivers/base/regmap/regmap-spi.ko] undefined!
      make[1]: *** [__modpost] Error 1
      make: *** [modules] Error 2
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      f804fb56
    • S
      regmap: include linux/sched.h to fix build · 30b2a553
      Stephen Warren 提交于
      This fixes:
      
      drivers/base/regmap/regmap.c: In function 'regmap_async_complete_cb':
      drivers/base/regmap/regmap.c:1656:3: error: 'TASK_NORMAL' undeclared (first use in this function)
      drivers/base/regmap/regmap.c:1656:3: note: each undeclared identifier is reported only once for each function it appears in
      drivers/base/regmap/regmap.c: In function 'regmap_async_complete':
      drivers/base/regmap/regmap.c:1688:2: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
      drivers/base/regmap/regmap.c:1688:2: error: implicit declaration of function 'schedule'
      
      An alternative might be to adjust linux/wait.h to include linux/sched.h,
      but since that hasn't been done before, I assume we're consciously
      avoiding doing that.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      30b2a553
  9. 29 1月, 2013 2 次提交
  10. 22 1月, 2013 1 次提交
  11. 14 1月, 2013 2 次提交
  12. 12 1月, 2013 1 次提交
  13. 21 11月, 2012 1 次提交
  14. 30 10月, 2012 1 次提交
  15. 26 10月, 2012 1 次提交
  16. 17 10月, 2012 1 次提交
  17. 15 10月, 2012 8 次提交
  18. 04 8月, 2012 1 次提交
  19. 06 7月, 2012 1 次提交
  20. 19 6月, 2012 1 次提交
  21. 18 6月, 2012 2 次提交
  22. 08 6月, 2012 1 次提交
  23. 03 6月, 2012 3 次提交