Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: gpio_keys: implement polling mode support
Some MCU have limitations with GPIO interrupts. Add a polling mode to the gpio-keys driver to support those cases. This required a bit of a refactoring of the driver data structure to add a instance wide data, and move the pin specific pointer in the config structure. For polling, reuse the button 0 delayed work so we minimize the resource waste, the two work handler functions are only referenced when used so at least those are discarded automatically if no instance needs them. Fix a bug in the PM structure instantiation as well. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
- Loading branch information
1 parent
89982b7
commit 276424d
Showing
3 changed files
with
108 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters