Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[als] Add datapipe for temporarily enabling ALS. Contributes to JB#32278
Normally the ambient light sensor is enabled/disabled based on the display state. However there are situations where it would be nice to poll light value even when the display is off. Add ambient_light_poll_pipe datapipe. When it is executed with a true value, the sensor is turned on for 5 seconds - unless the als master toggle is turned off in mce settings. Since the assumption is that ambient light sensor is configured not to wake up the device from suspend, a wakelock is held to keep device from entering suspend for the duration of als poll.
- Loading branch information
Showing
4 changed files
with
161 additions
and
3 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
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