1. 26 10月, 2020 1 次提交
  2. 30 9月, 2020 2 次提交
    • K
      gpiolib: cdev: support setting debounce · 65cff704
      Kent Gibson 提交于
      Add support for setting debounce on a line via the GPIO uAPI.
      Where debounce is not supported by hardware, a software debounce is
      provided.
      
      The implementation of the software debouncer waits for the line to be
      stable for the debounce period before determining if a level change,
      and a corresponding edge event, has occurred.  This provides maximum
      protection against glitches, but also introduces a debounce_period
      latency to edge events.
      
      The software debouncer is integrated with the edge detection as it
      utilises the line interrupt, and integration is simpler than getting
      the two to interwork.  Where software debounce AND edge detection is
      required, the debouncer provides both.
      Signed-off-by: NKent Gibson <warthog618@gmail.com>
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      65cff704
    • K
      gpiolib: cdev: support edge detection for uAPI v2 · 73e03419
      Kent Gibson 提交于
      Add support for edge detection to lines requested using
      GPIO_V2_GET_LINE_IOCTL.
      
      The edge_detector implementation is based on the v1 lineevent
      implementation.  Unlike the v1 implementation, an overflow of the event
      buffer results in discarding older events, rather than the most
      recent, so the final event in a burst will correspond to the current
      state of the line.
      Signed-off-by: NKent Gibson <warthog618@gmail.com>
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      73e03419
  3. 17 9月, 2020 1 次提交
  4. 14 9月, 2020 3 次提交
  5. 11 9月, 2020 1 次提交
  6. 12 7月, 2020 2 次提交
  7. 30 6月, 2020 1 次提交
  8. 21 6月, 2020 1 次提交
  9. 03 6月, 2020 1 次提交
  10. 29 5月, 2020 2 次提交
  11. 27 5月, 2020 1 次提交
  12. 18 5月, 2020 1 次提交
  13. 16 5月, 2020 1 次提交
  14. 13 5月, 2020 1 次提交
  15. 28 4月, 2020 2 次提交
  16. 23 4月, 2020 2 次提交
  17. 01 4月, 2020 1 次提交
  18. 31 3月, 2020 1 次提交
  19. 28 3月, 2020 4 次提交
  20. 27 3月, 2020 1 次提交
  21. 25 3月, 2020 1 次提交
  22. 20 3月, 2020 1 次提交
  23. 11 3月, 2020 1 次提交
    • L
      gpiolib: Fix irq_disable() semantics · 8959b304
      Linus Walleij 提交于
      The implementation if .irq_disable() which kicks in between
      the gpiolib and the driver is not properly mimicking the
      expected semantics of the irqchip core: the irqchip will
      call .irq_disable() if that exists, else it will call
      mask_irq() which first checks if .irq_mask() is defined
      before calling it.
      
      Since we are calling it unconditionally, we get this bug
      from drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c, as it only
      defines .irq_mask_ack and not .irq_mask:
      
        Unable to handle kernel NULL pointer dereference at virtual address 00000000
        pgd = (ptrval)
        (...)
        PC is at 0x0
        LR is at gpiochip_irq_disable+0x20/0x30
      
      Fix this by only calling .irq_mask() if it exists.
      
      Cc: Brian Masney <masneyb@onstation.org>
      Cc: Hans Verkuil <hans.verkuil@cisco.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Fixes: 461c1a7d ("gpiolib: override irq_enable/disable")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20200306132326.1329640-1-linus.walleij@linaro.org
      8959b304
  24. 03 3月, 2020 1 次提交
  25. 02 3月, 2020 3 次提交
  26. 29 2月, 2020 1 次提交
  27. 25 2月, 2020 1 次提交
  28. 22 2月, 2020 1 次提交