Posted onEdited onIn编程相关Views: Symbols count in article: 2.3kReading time ≈2 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
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.