summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2014-03-27 22:00:00 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commitc332b13bb90469c179546484abfc8ea2204e4eea (patch)
tree60f8d381dbb96c64fcd62dc8836c0eb557cfd759
parente9c7fcc763ff005ed91de23a05db7c87cc836b58 (diff)
downloadvendor_qcom_opensource_power-c332b13bb90469c179546484abfc8ea2204e4eea.tar.gz
vendor_qcom_opensource_power-c332b13bb90469c179546484abfc8ea2204e4eea.tar.bz2
vendor_qcom_opensource_power-c332b13bb90469c179546484abfc8ea2204e4eea.zip
power: Allow device specific hooks for set_interactive
* Some devices may want to implement custom hooks Change-Id: I9be8023c8134b3c262f27b43a28bec0e14c0fd7f
-rw-r--r--Android.mk5
-rw-r--r--power-common.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 9d00f89..eca6089 100644
--- a/Android.mk
+++ b/Android.mk
@@ -76,6 +76,11 @@ ifneq ($(TARGET_POWER_SET_FEATURE_LIB),)
LOCAL_STATIC_LIBRARIES += $(TARGET_POWER_SET_FEATURE_LIB)
endif
+ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),)
+ LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT
+ LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT)
+endif
+
ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
endif
diff --git a/power-common.c b/power-common.c
index e52881f..30ea135 100644
--- a/power-common.c
+++ b/power-common.c
@@ -119,6 +119,10 @@ int __attribute__ ((weak)) set_interactive_override(int UNUSED(on))
return HINT_NONE;
}
+#ifdef SET_INTERACTIVE_EXT
+extern void power_set_interactive_ext(int on);
+#endif
+
void set_interactive(int on)
{
if (!on) {
@@ -129,6 +133,10 @@ void set_interactive(int on)
perf_hint_enable(VENDOR_HINT_DISPLAY_ON, 0);
}
+#ifdef SET_INTERACTIVE_EXT
+ power_set_interactive_ext(on);
+#endif
+
if (set_interactive_override(on) == HINT_HANDLED) {
return;
}