1. 04 11月, 2017 2 次提交
  2. 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
  3. 01 11月, 2017 1 次提交
  4. 17 7月, 2017 2 次提交
  5. 29 6月, 2017 1 次提交
  6. 10 6月, 2017 1 次提交
  7. 08 6月, 2017 1 次提交
  8. 07 6月, 2017 2 次提交
  9. 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
  10. 19 12月, 2016 1 次提交
  11. 25 11月, 2016 1 次提交
    • K
      regmap: cache: Remove unused 'blksize' variable · daaadbf0
      Kirtika Ruchandani 提交于
      Commit 2cbbb579 ("regmap: Add the LZO cache support") introduced
      'blksize' in  regcache_lzo_read() and regcache_lzo_write(), that is
      set but not used. Compiling with W=1 gives the following warnings,
      fix them.
      
      drivers/base/regmap/regcache-lzo.c: In function ‘regcache_lzo_read’:
      drivers/base/regmap/regcache-lzo.c:239:9: warning: variable ‘blksize’ set but not used [-Wunused-but-set-variable]
        size_t blksize, tmp_dst_len;
               ^
      drivers/base/regmap/regcache-lzo.c: In function ‘regcache_lzo_write’:
      drivers/base/regmap/regcache-lzo.c:278:9: warning: variable ‘blksize’ set but not used [-Wunused-but-set-variable]
        size_t blksize, tmp_dst_len;
               ^
      
      These are harmless warnings and are only being fixed to reduce the
      noise with W=1 in the kernel.
      
      Fixes: 2cbbb579 ("regmap: Add the LZO cache support")
      Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NKirtika Ruchandani <kirtika@chromium.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      daaadbf0
  12. 22 9月, 2016 1 次提交
  13. 16 9月, 2016 2 次提交
  14. 18 8月, 2016 1 次提交
  15. 09 8月, 2016 2 次提交
  16. 04 8月, 2016 1 次提交
    • L
      regmap: rbtree: Avoid overlapping nodes · 1bc8da4e
      Lars-Peter Clausen 提交于
      When searching for a suitable node that should be used for inserting a new
      register, which does not fall within the range of any existing node, we not
      only looks for nodes which are directly adjacent to the new register, but
      for nodes within a certain proximity. This is done to avoid creating lots
      of small nodes with just a few registers spacing in between, which would
      increase memory usage as well as tree traversal time.
      
      This means there might be multiple node candidates which fall within the
      proximity range of the new register. If we choose the first node we
      encounter, under certain register insertion patterns it is possible to end
      up with overlapping ranges. This will break order in the rbtree and can
      cause the cached register value to become corrupted.
      
      E.g. take the simplified example where the proximity range is 2 and the
      register insertion sequence is 1, 4, 2, 3, 5.
       * Insert of register 1 creates a new node, this is the root of the rbtree
       * Insert of register 4 creates a new node, which is inserted to the right
         of the root.
       * Insert of register 2 gets inserted to the first node
       * Insert of register 3 gets inserted to the first node
       * Insert of register 5 also gets inserted into the first node since
         this is the first node encountered and it is within the proximity range.
         Now there are two overlapping nodes.
      
      To avoid this always choose the node that is closest to the new register.
      This will ensure that nodes will not overlap. The tree traversal is still
      done as a binary search, we just don't stop at the first node found. So the
      complexity of the algorithm stays within the same order.
      
      Ideally if a new register is in the range of two adjacent blocks those
      blocks should be merged, but that is a much more invasive change and left
      for later.
      
      The issue was initially introduced in commit 472fdec7 ("regmap: rbtree:
      Reduce number of nodes, take 2"), but became much more exposed by commit
      6399aea6 ("regmap: rbtree: When adding a reg do a bsearch for target
      node") which changed the order in which nodes are looked-up.
      
      Fixes: 6399aea6 ("regmap: rbtree: When adding a reg do a bsearch for target node")
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1bc8da4e
  17. 30 7月, 2016 1 次提交
  18. 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
  19. 22 6月, 2016 1 次提交
    • G
      regmap-i2c: Use i2c block command only if register value width is 8 bit · d4ef9306
      Guenter Roeck 提交于
      Chips with 16-bit registers don't usually work well with I2C block
      commands. For example, neither the LM75 datasheet nor the TMP102 datasheet
      mentions block command support, and in fact it does not work for any of
      those chips. Also, it is not clear how the block command would handle
      16-bit SMBus operations in the fist place, since the data format associated
      with those commands is either little endian or big endian, which requires
      some kind of conversion to or from host byte order.
      
      Only use i2c block commands if both register and value width is 8 bit.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d4ef9306
  20. 03 6月, 2016 1 次提交
    • L
      regmap: irq: Add support to call client specific pre/post interrupt service · ccc12561
      Laxman Dewangan 提交于
      Regmap irq implements the generic interrupt service routine which
      is common for most of devices. Some devices, like MAX77620, MAX20024
      needs the special handling before and after servicing the interrupt
      as generic. For the example, MAX77620 programming guidelines for
      interrupt servicing says:
      1. When interrupt occurs from PMIC, mask the PMIC interrupt by setting
         GLBLM.
      2. Read IRQTOP and service the interrupt accordingly.
      3. Once all interrupts has been checked and serviced, the interrupt
         service routine un-masks the hardware interrupt line by clearing
         GLBLM.
      
      The step (2) is implemented in regmap irq as generic routine. For
      step (1) and (3), add callbacks from regmap irq to client driver
      to handle chip specific configurations.
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ccc12561
  21. 15 4月, 2016 1 次提交
  22. 01 4月, 2016 1 次提交
  23. 30 3月, 2016 3 次提交
  24. 24 3月, 2016 1 次提交
  25. 23 3月, 2016 1 次提交
  26. 05 3月, 2016 2 次提交
    • L
      regmap: irq: add devm apis for regmap_{add,del}_irq_chip · 045b9848
      Laxman Dewangan 提交于
      Add device managed APIs for regmap_add_irq_chip() and
      regmap_del_irq_chip() so that it can be managed by
      device framework for freeing it.
      
      This helps on following:
      1. Maintaining the sequence of resource allocation and deallocation
      	regmap_add_irq_chip(&d);
      	devm_requested_threaded_irq(virq)
      
      	On free path:
      		regmap_del_irq_chip(d);
      		and then removing the irq registration.
      
      	On this case, regmap irq is deleted before the irq is free.
      	This force to use normal irq registration.
      
      	By using devm apis, the sequence can be maintain properly:
      		devm_regmap_add_irq_chip(&d);
      		devm_requested_threaded_irq(virq);
      
      	and resource deallocation will be done in reverse order
      	by device framework.
      
      2. No need to delete the regmap_irq_chip in error path or remove
         callback and hence there is less code on this path.
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      045b9848
    • K
      regmap: replace regmap_write_bits() · b821957a
      Kuninori Morimoto 提交于
      commit 23b92e4cf5fd ("regmap: remove regmap_write_bits()")
      removed regmap_write_bits(), but MFD driver was using it.
      So, commit e30fccd6771d ("regmap: Keep regmap_write_bits()")
      turns out it, but it is using original style.
      This patch uses regmap_update_bits_base() for regmap_write_bits()
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b821957a
  27. 29 2月, 2016 1 次提交
  28. 26 2月, 2016 1 次提交
  29. 20 2月, 2016 4 次提交