Posted onEdited onIn编程相关Views: Word count in article: 359Reading time ≈1 mins.
gpio-keys is part of Linux input subsystem that can be used as key driver which can generate gpio interrupt. Comparing with user-implemented drivers base on GPIO subsystem, gpio-keys is much easier to use since it supports features like debounce/autorepeat by default.
Device tree bindings
node properties: compatible = "gpio-keys": Configure node as gpio-keys. autorepeat: Boolean, Enable auto repeat feature of Linux input
subnode properties:
linux,code: Keycode to emit.
interrupts-extended or interrupts: Interrupt line for that input.
debounce-interval: Debouncing interval time in milliseconds. If not specified defaults to 5.