1. 16 2月, 2018 3 次提交
  2. 13 2月, 2018 2 次提交
  3. 08 2月, 2018 1 次提交
    • D
      regmap: Fix reversed bounds check in regmap_raw_write() · f00e7109
      Dan Carpenter 提交于
      We're supposed to be checking that "val_len" is not too large but
      instead we check if it is smaller than the max.
      
      The only function affected would be regmap_i2c_smbus_i2c_write() in
      drivers/base/regmap/regmap-i2c.c.  Strangely that function has its own
      limit check which returns an error if (count >= I2C_SMBUS_BLOCK_MAX) so
      it doesn't look like it has ever been able to do anything except return
      an error.
      
      Fixes: c335931e ("regmap: Add raw_write/read checks for max_raw_write/read sizes")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      f00e7109
  4. 08 1月, 2018 1 次提交
    • A
      regmap: Allow empty read/write_flag_mask · 9bf485c9
      Andrew F. Davis 提交于
      All zero read and write masks in the regmap config are used to signal no
      special mask is needed and the bus defaults are used. In some devices
      all zero read/write masks are the special mask and bus defaults should
      not be used. To signal this a new variable is added.
      
      For example SPI often sets bit 7 in address to signal to the device a
      read is requested. On TI AFE44xx parts with SPI interfaces no bit
      needs to be set as registers are either read or write only and the
      operation can be determined from the address only. For this case both
      masks must be zero to not effect the address.
      Signed-off-by: NAndrew F. Davis <afd@ti.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9bf485c9
  5. 27 12月, 2017 1 次提交
  6. 19 12月, 2017 1 次提交
    • K
      regmap: use proper part of work_buf for storing val · 4c90f297
      Krzysztof Adamski 提交于
      The map->work_buf is a buffer preallocated in __regmap_init() with size
      allowing it to store all 3 parts of a buffer - reg, pad and val. While
      reg and val parts are always properly setup before each transaction, the
      pad part is left at its default value (zeros). Until it is overwritten,
      that is.
      
      _regmap_bus_read(), when calling _regmap_raw_read() uses beginning of
      work_buf as a place to store data read. Usually that is fine but if
      val_bits > reg_bits && pad_bits > 0, padding area of work_buf() may get
      overwritten. Since padding is not zeroed before each transaction,
      garbage will be used on next calls.
      
      This patch moves the val pointer used for _regmap_raw_read() to point
      to a part of work_buf intended for storing value read.
      Signed-off-by: NKrzysztof Adamski <krzysztof.adamski@nokia.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4c90f297
  7. 14 12月, 2017 2 次提交
  8. 13 12月, 2017 1 次提交
  9. 06 12月, 2017 1 次提交
    • B
      regmap: allow to disable all locking mechanisms · c9b41fcf
      Bartosz Golaszewski 提交于
      We have a use case in the at24 EEPROM driver (recently converted to
      using regmap instead of raw i2c/smbus calls) where we read from/write
      to the regmap in a loop, while protecting the entire loop with
      a mutex.
      
      Currently this implicitly makes us use two mutexes - one in the driver
      and one in regmap. While browsing the code for similar use cases I
      noticed a significant number of places where locking *seems* redundant.
      
      Allow users to completely disable any locking mechanisms in regmap
      config.
      Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c9b41fcf
  10. 29 11月, 2017 1 次提交
  11. 06 11月, 2017 1 次提交
  12. 04 11月, 2017 2 次提交
  13. 03 11月, 2017 1 次提交
    • M
      regmap: Add a config option for hwspinlock · f25637a6
      Mark Brown 提交于
      Unlike other lock types hwspinlocks are optional and can be built
      modular so we can't use them unconditionally in regmap so add a config
      option that drivers that want to use hwspinlocks with regmap can select
      which will ensure that hwspinlock is built in.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f25637a6
  14. 01 11月, 2017 1 次提交
  15. 13 1月, 2017 1 次提交
    • C
      regmap: Fixup the kernel-doc comments on functions/structures · 2cf8e2df
      Charles Keepax 提交于
      Most of the kernel-doc comments in regmap don't actually generate
      correctly. This patch fixes up a few common issues, corrects some typos
      and adds some missing argument descriptions.
      
      The most common issues being using a : after the function name which
      causes the short description to not render correctly and not separating
      the long and short descriptions of the function. There are quite a few
      instances of arguments not being described or given the wrong name as
      well.
      
      This patch doesn't fixup functions/structures that are currently missing
      descriptions.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      2cf8e2df
  16. 19 12月, 2016 1 次提交
  17. 22 9月, 2016 1 次提交
  18. 16 9月, 2016 2 次提交
  19. 18 8月, 2016 1 次提交
  20. 09 8月, 2016 1 次提交
  21. 30 6月, 2016 1 次提交
    • C
      regmap: Support bulk writes for devices without raw formatting · 5bf75b44
      Chen-Yu Tsai 提交于
      When doing a bulk writes from a device which lacks raw I/O support we
      fall back to doing register at a time reads but we still use the raw
      formatters in order to render the data into the word size used by the
      device (since bulk reads still operate on the device word size rather
      than unsigned ints).  This means that devices without raw formatting
      such as those that provide reg_read() are not supported.  Provide
      handling for them by copying the values read into native endian values
      of the appropriate size.
      
      This complements commit d5b98eb1 ("regmap: Support bulk reads for
      devices without raw formatting").
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      5bf75b44
  22. 05 3月, 2016 1 次提交
  23. 26 2月, 2016 1 次提交
  24. 20 2月, 2016 11 次提交