Skip to content

Switch polarity for the wakeup-uart4 key

Sjoerd Simons requested to merge fix-wakeup-key into tcl-linux-4.9.y

The wakeup gpio-code is there mostly to enable using uart4 as a wakeup source. Due to SoC limitation uart4 cannot be directly used as a wakeup source, but the pins can be used to wakeup the system when used in gpio mode. Hence the device-tree re-muxes the uart pins as gpio pins when going into sleep at which point they're also exposed as a gpio key (which is enabled as a wakeup-source) to the kernel.

This all works nicely to wake up the device from suspend on keyboard activity. However it does trigger key presses of KEY_WAKEUP on resume, which is also fine. However the way it was reported makes it appear to user-space as if the KEY_WAKEUP is being held down, which in turn confuses our version of Gtk+ on wayland (and isn't very nice in general).

To sort that out flip the polarity of the gpio such that a high signal means key press and low key depressed, the latter being the case when the pins are muxed back to uart mode. Also drop the debounce-interval and use the default, which results in just a single KEY_WAKEUP press being triggered after suspend rather then multiple

Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk

Merge request reports