drivers/touch/cst816: add palm gesture to turn off backlight - #1979
Open
josiahcbloomer wants to merge 2 commits into
Open
drivers/touch/cst816: add palm gesture to turn off backlight#1979josiahcbloomer wants to merge 2 commits into
josiahcbloomer wants to merge 2 commits into
Conversation
based on my testing, the CST816 appears to report a palm covering the screen as gesture 0xAA. it is not in the documented gesture list; it was found by dumping the chip's register block on device while I tried a number of different touch gestures. this is now reported by the driver Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Josiah <josiah@bloomer.cc>
adds a new global touch gesture and corresponding settings toggle - tapping the screen with your palm now immediately turns off the backlight, as if the timer expired. this mirrors the gesture functionality of many mainstream smartwatches. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Josiah <josiah@bloomer.cc>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tap the screen with your palm and the backlight turns off, mirroring a gesture found on many major smartwatches on the market. Adds a new option: Settings → Display → Backlight → "Palm to sleep", which is on by default.
How the palm is detected
The CST816 seems to report this itself. Register
0x01reads0xAAfor a palm, and doesn't seem to be for anything else. it isn't in the documented gesture list and nothing in the tree referenced it. Found by dumping the chip's register block on device and testing repeatedly on my PT2.I would love if some more people would build and test on their watches.
Tests
Built for obelix@pvt. tests pass.
Tested on my Core Time 2. Haven't noticed any false positives yet.
Co-authored with Claude.