Skip to content
Commit 01be4aff authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Carles Cufí
Browse files

input: gpio_qdec: add power management support



Add power management support to the gpio-qdec driver.

This is a bit complicated by the fact that the driver has two modes of
operation and the interrupt, timer and idle work ineract with each
other.

The suspend sequence is:
- set the suspended bit (inhibits the poll timer so that it does not
  resubmit the idle work)
- cancel the idle work (so that it does not schedule and re-set the
  interrupt or timers)
- disable interrupts (if used)
- stop the sampling timer
- disconnect the pins

The resume sequence is more or less the opposite.

Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 550b16a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment