From a14736f5986bd39fe919bc70e6330eb1fe4e6df9 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Mon, 2 Nov 2015 19:35:35 -0800 Subject: 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 --- include/hardware/power.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.1