1. 26 2月, 2018 1 次提交
    • M
      regmap: mmio: Add function to attach a clock · 31895662
      Maxime Ripard 提交于
      regmap_init_mmio_clk allows to specify a clock that needs to be enabled
      while accessing the registers.
      
      However, that clock is retrieved through its clock ID, which means it will
      lookup that clock based on the current device that registers the regmap,
      and, in the DT case, will only look in that device OF node.
      
      This might be problematic if the clock to enable is stored in another node.
      Let's add a function that allows to attach a clock that has already been
      retrieved to a regmap in order to fix this.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      31895662
  2. 08 1月, 2018 2 次提交
  3. 27 12月, 2017 1 次提交
  4. 19 12月, 2017 1 次提交
  5. 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
  6. 01 11月, 2017 1 次提交
  7. 14 10月, 2017 1 次提交
    • A
      regmap: avoid -Wint-in-bool-context warning · 1b0c22e4
      Arnd Bergmann 提交于
      When we pass the result of a multiplication as the timeout or the delay,
      we can get a warning from gcc-7:
      
      drivers/mmc/host/bcm2835.c:596:149: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      drivers/mfd/arizona-core.c:247:195: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:49:27: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      
      The warning is a bit questionable inside of a macro, but this is
      intentional on the side of the gcc developers.  It is also an indication
      of another problem: we evaluate the timeout and sleep arguments multiple
      times, which can have undesired side-effects when those are complex
      expressions.
      
      This changes the two regmap variants to use local variables for storing
      copies of the timeouts.  This adds some more type safety, and avoids both
      the double-evaluation and the gcc warning.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484
      Link: http://lkml.kernel.org/r/20170726133756.2161367-1-arnd@arndb.deSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1b0c22e4
  8. 04 10月, 2017 1 次提交
  9. 11 7月, 2017 1 次提交
  10. 29 6月, 2017 1 次提交
  11. 07 6月, 2017 1 次提交
  12. 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
  13. 29 10月, 2016 1 次提交
  14. 13 10月, 2016 1 次提交
  15. 16 9月, 2016 1 次提交
  16. 15 7月, 2016 1 次提交
  17. 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
  18. 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
  19. 26 2月, 2016 2 次提交
  20. 20 2月, 2016 11 次提交
  21. 16 2月, 2016 1 次提交
    • L
      regmap: irq: add devm apis for regmap_{add,del}_irq_chip · 800c3a0e
      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>
      800c3a0e
  22. 23 1月, 2016 1 次提交
  23. 06 1月, 2016 1 次提交
    • L
      regmap: irq: add support for configuration of trigger type · 7a78479f
      Laxman Dewangan 提交于
      Some of devices supports the trigger level for interrupt
      like rising/falling edge specially for GPIOs. The interrupt
      support of such devices may have uses the generic regmap irq
      framework for implementation.
      
      Add support to configure the trigger type device interrupt
      register via regmap-irq framework. The regmap-irq framework
      configures the trigger register only if the details of trigger
      type registers are provided.
      
      [Fixed use of terery operator for legibility -- broonie]
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7a78479f
  24. 02 12月, 2015 1 次提交
  25. 06 10月, 2015 2 次提交
  26. 05 10月, 2015 1 次提交