power: Allow devices to write their own platform specific bits

Using this hook, any device should be able to reuse the majority of the
powerhal and fork only power-<platform>.c if they feel that they need
the ability to provide more specific tuning of the hints/etc. for
their device.

Change-Id: I013a3ec3ddccbe6f74f3dacf456cc6e8b3ab3430
This commit is contained in:
Christopher R. Palmer
2016-04-07 06:13:45 -04:00
committed by Michael Bestas
parent e2732b782f
commit a7fabc8b44

View File

@@ -16,6 +16,10 @@ LOCAL_SRC_FILES := power-common.c metadata-parser.c utils.c list.c hint-data.c p
LOCAL_C_INCLUDES := external/libxml2/include \
external/icu/icu4c/source/common
ifneq ($(BOARD_POWER_CUSTOM_BOARD_LIB),)
LOCAL_WHOLE_STATIC_LIBRARIES += $(BOARD_POWER_CUSTOM_BOARD_LIB)
else
# Include target-specific files.
ifeq ($(call is-board-platform-in-list, msm8974), true)
LOCAL_SRC_FILES += power-8974.c
@@ -77,6 +81,8 @@ ifeq ($(call is-board-platform-in-list,msmnile), true)
LOCAL_SRC_FILES += power-msmnile.c
endif
endif # End of board specific list
ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),)
LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT
LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT)