diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-02 19:35:35 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-03 02:04:48 -0800 |
commit | a14736f5986bd39fe919bc70e6330eb1fe4e6df9 (patch) | |
tree | 960a1dfd01aafb82adf66168aa9e2c227c4a72b4 /include | |
parent | 2236fa106394653d462ed0e0898af4bd22c3aae5 (diff) | |
download | hardware_libhardware-a14736f5986bd39fe919bc70e6330eb1fe4e6df9.zip hardware_libhardware-a14736f5986bd39fe919bc70e6330eb1fe4e6df9.tar.gz hardware_libhardware-a14736f5986bd39fe919bc70e6330eb1fe4e6df9.tar.bz2 |
hardware: Add new getFeature() function to Power HAL
* The current use case for this is to query the power HAL for
the number of supported profiles.
Change-Id: I0b4137dda8d98d167d9c6446072bdbe1245ae2f5
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/power.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/hardware/power.h b/include/hardware/power.h index c0fcba1..11ec3b8 100644 --- a/include/hardware/power.h +++ b/include/hardware/power.h @@ -56,7 +56,8 @@ typedef enum { } power_hint_t; typedef enum { - POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 0x00000001 + POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 0x00000001, + POWER_FEATURE_SUPPORTED_PROFILES = 0x00001000 } feature_t; /** @@ -159,6 +160,12 @@ typedef struct power_module { */ void (*setFeature)(struct power_module *module, feature_t feature, int state); + /* + * (*getFeature) is called to get the current value of a particular + * feature or capability from the hardware or PowerHAL + */ + int (*getFeature)(struct power_module *module, feature_t feature); + } power_module_t; |