power: Allow device specific hooks for set_interactive
* Some devices may want to implement custom hooks Change-Id: I9be8023c8134b3c262f27b43a28bec0e14c0fd7f
This commit is contained in:
committed by
Michael Bestas
parent
6b46a293df
commit
e2732b782f
@@ -77,6 +77,11 @@ ifeq ($(call is-board-platform-in-list,msmnile), true)
|
||||
LOCAL_SRC_FILES += power-msmnile.c
|
||||
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
|
||||
|
||||
@@ -137,6 +137,10 @@ int __attribute__ ((weak)) set_interactive_override(int on)
|
||||
return HINT_NONE;
|
||||
}
|
||||
|
||||
#ifdef SET_INTERACTIVE_EXT
|
||||
extern void power_set_interactive_ext(int on);
|
||||
#endif
|
||||
|
||||
void set_interactive(int on)
|
||||
{
|
||||
if (!on) {
|
||||
@@ -147,6 +151,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user