power: Adds POWER_HINT_DISABLE_TOUCH

POWER_HINT_DISABLE_TOUCH is used to hint power hal that device is
in a state that touch controller could be disabled to save power.

Bug: 30143923
Change-Id: I56c588e62afadffdb367b6e2c3115cffef51bb45
(cherry picked from commit 90db35122d)
This commit is contained in:
Chenjie Luo 2016-07-14 15:46:58 -07:00
parent 4d2023e33a
commit fc40b05ae1

View file

@ -64,7 +64,8 @@ typedef enum {
POWER_HINT_LOW_POWER = 0x00000005, POWER_HINT_LOW_POWER = 0x00000005,
POWER_HINT_SUSTAINED_PERFORMANCE = 0x00000006, POWER_HINT_SUSTAINED_PERFORMANCE = 0x00000006,
POWER_HINT_VR_MODE = 0x00000007, POWER_HINT_VR_MODE = 0x00000007,
POWER_HINT_LAUNCH = 0x00000008 POWER_HINT_LAUNCH = 0x00000008,
POWER_HINT_DISABLE_TOUCH = 0x00000009
} power_hint_t; } power_hint_t;
typedef enum { typedef enum {
@ -248,6 +249,14 @@ typedef struct power_module {
* device can sustain it. The data parameter is non-zero when the mode * device can sustain it. The data parameter is non-zero when the mode
* is activated and zero when deactivated. * is activated and zero when deactivated.
* *
* POWER_HINT_DISABLE_TOUCH
*
* When device enters some special modes, e.g. theater mode in Android
* Wear, there is no touch interaction expected between device and user.
* Touch controller could be disabled in those modes to save power.
* The data parameter is non-zero when touch could be disabled, and zero
* when touch needs to be re-enabled.
*
* A particular platform may choose to ignore any hint. * A particular platform may choose to ignore any hint.
* *
* availability: version 0.2 * availability: version 0.2