1. 12 Aug, 2019 1 commit
  2. 25 Apr, 2019 1 commit
  3. 01 Apr, 2019 1 commit
  4. 23 Jan, 2019 1 commit
    • Matti Vaittinen's avatar
      regmap: regmap-irq: Add main status register support · a2d21848
      Matti Vaittinen authored and Mark Brown's avatar Mark Brown committed
      
      
      There is bunch of devices with multiple logical blocks which
      can generate interrupts. It's not a rare case that the interrupt
      reason registers are arranged so that there is own status/ack/mask
      register for each logical block. In some devices there is also a
      'main interrupt register(s)' which can indicate what sub blocks
      have interrupts pending.
      
      When such a device is connected via slow bus like i2c the main
      part of interrupt handling latency can be caused by bus accesses.
      On systems where it is expected that only one (or few) sub blocks
      have active interrupts we can reduce the latency by only reading
      the main register and those sub registers which have active
      interrupts. Support this with regmap-irq for simple cases where
      main register does not require acking or masking.
      Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      a2d21848
  5. 14 Jan, 2019 1 commit
  6. 31 Dec, 2018 1 commit
  7. 19 Dec, 2018 3 commits
  8. 13 Dec, 2018 1 commit
    • Bartosz Golaszewski's avatar
      regmap: irq: handle HW using separate rising/falling edge interrupts · bc998a73
      Bartosz Golaszewski authored and Mark Brown's avatar Mark Brown committed
      
      
      Some interrupt controllers use separate bits for controlling rising
      and falling edge interrupts in the mask register i.e. they have one
      interrupt for rising edge and one for falling.
      
      We already handle the case where we have a single interrupt in the
      mask register and a separate type configuration register.
      
      Add a new switch to regmap_irq_chip which tells the framework to use
      the mask_base address for configuring the edge of the interrupts that
      define type_falling/rising_mask values.
      
      For such interrupts we never update the type_base bits. For interrupts
      that don't define type masks or their regmap irq chip doesn't set the
      type_in_mask to true everything stays the same.
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      bc998a73
  9. 28 Jun, 2017 1 commit
  10. 09 Jun, 2017 1 commit
  11. 12 Jan, 2017 1 commit
    • Charles Keepax's avatar
      regmap: Fixup the kernel-doc comments on functions/structures · 2cf8e2df
      Charles Keepax authored and Mark Brown's avatar Mark Brown committed
      
      
      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: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      2cf8e2df
  12. 02 Jun, 2016 1 commit
    • Laxman Dewangan's avatar
      regmap: irq: Add support to call client specific pre/post interrupt service · ccc12561
      Laxman Dewangan authored and Mark Brown's avatar Mark Brown committed
      
      
      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: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      ccc12561
  13. 05 Mar, 2016 1 commit
    • Laxman Dewangan's avatar
      regmap: irq: add devm apis for regmap_{add,del}_irq_chip · 045b9848
      Laxman Dewangan authored and Mark Brown's avatar Mark Brown committed
      
      
      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: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      045b9848
  14. 29 Feb, 2016 1 commit
  15. 15 Feb, 2016 1 commit
    • Laxman Dewangan's avatar
      regmap: irq: add devm apis for regmap_{add,del}_irq_chip · 800c3a0e
      Laxman Dewangan authored and Mark Brown's avatar Mark Brown committed
      
      
      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: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      800c3a0e
  16. 09 Feb, 2016 1 commit
  17. 05 Jan, 2016 1 commit
    • Laxman Dewangan's avatar
      regmap: irq: add support for configuration of trigger type · 7a78479f
      Laxman Dewangan authored and Mark Brown's avatar Mark Brown committed
      
      
      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: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      7a78479f
  18. 20 Nov, 2015 2 commits
  19. 17 Sep, 2015 2 commits
  20. 21 Aug, 2015 1 commit
  21. 09 Jun, 2015 1 commit
    • Rob Herring's avatar
      regmap: kill off set_irq_flags usage · e723f2ce
      Rob Herring authored and Mark Brown's avatar Mark Brown committed
      
      
      set_irq_flags is ARM specific with custom flags which have genirq
      equivalents. Convert drivers to use the genirq interfaces directly, so we
      can kill off set_irq_flags. The translation of flags is as follows:
      
      IRQF_VALID -> !IRQ_NOREQUEST
      IRQF_PROBE -> !IRQ_NOPROBE
      IRQF_NOAUTOEN -> IRQ_NOAUTOEN
      
      For IRQs managed by an irqdomain, the irqdomain core code handles clearing
      and setting IRQ_NOREQUEST already, so there is no need to do this in
      .map() functions and we can simply remove the set_irq_flags calls. Some
      users also set IRQ_NOPROBE and this has been maintained although it is not
      clear that is really needed. There appears to be a great deal of blind
      copy and paste of this code.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      e723f2ce
  22. 02 Jun, 2015 1 commit
  23. 27 Apr, 2015 1 commit
  24. 14 Feb, 2015 1 commit
  25. 26 May, 2014 1 commit
  26. 13 Mar, 2014 1 commit
    • Krzysztof Kozlowski's avatar
      regmap: irq: Set data pointer only on regmap_add_irq_chip success · 72a6a5df
      Krzysztof Kozlowski authored
      
      
      After setting the 'data' pointer (wchich is returned to the caller for
      freeing later) the regmap_add_irq_chip() could still fail for various
      reasons (ENOMEM, regmap_read or regmap_write failure). In such case the
      memory under 'data' was freed in error path and error value was returned
      but the 'data' variable was not changed.
      
      This could lead to errors if the caller passed such 'data' to
      regmap_del_irq_chip().
      
      The 'data' pointer should be changed atomically from the caller
      perspective - set it only on regmap_add_irq_chip() success.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      72a6a5df
  27. 03 Feb, 2014 1 commit
  28. 16 Dec, 2013 1 commit
  29. 22 Oct, 2013 1 commit
    • Yi Zhang's avatar
      regmap: irq: clear status when disable irq · 4bd7145b
      Yi Zhang authored
      
      
      clear the status bit if the mask register doesn't prevent
      the chip level irq from being asserted
      
      OR in the following sequence, there will be irq storm happens:
      1) interrupt is triggered;
      2) another thread disables it(the mask bit is set);
      3) _Then_ the interrupt thread is not ACKed(the status bit is not cleared),
         and it's ignored;
      4) if the irq is still asserted because of the uncleared status bit,
         the irq storm happens;
      Signed-off-by: default avatarYi Zhang <yizhang@marvell.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      4bd7145b
  30. 23 Jul, 2013 1 commit
  31. 19 Mar, 2013 1 commit
  32. 01 Mar, 2013 1 commit
  33. 04 Jan, 2013 3 commits
  34. 03 Jan, 2013 1 commit