Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Steve Kondik | 1fd0069 | 2014-03-28 11:57:33 -0700 | [diff] [blame] | 3 | # Hey Mr. Make Author, DIAF PLX |
| 4 | ifeq ($(TARGET_POWERHAL_VARIANT),qcom) |
| 5 | USE_ME := true |
| 6 | endif |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 7 | |
Steve Kondik | 1fd0069 | 2014-03-28 11:57:33 -0700 | [diff] [blame] | 8 | ifneq (,$(filter true,$(USE_ME) $(WITH_QC_PERF))) |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 9 | |
| 10 | # HAL module implemenation stored in |
| 11 | # hw/<POWERS_HARDWARE_MODULE_ID>.<ro.hardware>.so |
| 12 | include $(CLEAR_VARS) |
| 13 | |
Ricardo Cerqueira | 352ecbb | 2014-12-23 00:42:32 +0000 | [diff] [blame] | 14 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 15 | LOCAL_PROPRIETARY_MODULE := true |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 16 | LOCAL_SHARED_LIBRARIES := liblog libcutils libdl |
| 17 | LOCAL_SRC_FILES := power.c metadata-parser.c utils.c list.c hint-data.c |
| 18 | |
Christopher R. Palmer | ff29d08 | 2016-04-07 06:13:45 -0400 | [diff] [blame] | 19 | ifneq ($(BOARD_POWER_CUSTOM_BOARD_LIB),) |
| 20 | LOCAL_WHOLE_STATIC_LIBRARIES += $(BOARD_POWER_CUSTOM_BOARD_LIB) |
| 21 | else |
| 22 | |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 23 | # Include target-specific files. |
| 24 | ifeq ($(call is-board-platform-in-list, msm8974), true) |
| 25 | LOCAL_SRC_FILES += power-8974.c |
| 26 | endif |
| 27 | |
| 28 | ifeq ($(call is-board-platform-in-list, msm8960), true) |
| 29 | LOCAL_SRC_FILES += power-8960.c |
| 30 | endif |
| 31 | |
| 32 | ifeq ($(call is-board-platform-in-list, msm8226), true) |
| 33 | LOCAL_SRC_FILES += power-8226.c |
| 34 | endif |
| 35 | |
| 36 | ifeq ($(call is-board-platform-in-list, msm8610), true) |
| 37 | LOCAL_SRC_FILES += power-8610.c |
| 38 | endif |
| 39 | |
vaibhav bhalla | ec19782 | 2015-02-23 11:57:38 +0530 | [diff] [blame] | 40 | ifeq ($(call is-board-platform-in-list, msm8909), true) |
| 41 | LOCAL_SRC_FILES += power-8909.c |
| 42 | endif |
| 43 | |
Steve Kondik | 3bcff47 | 2014-10-30 02:31:05 -0700 | [diff] [blame] | 44 | ifeq ($(call is-board-platform-in-list, msm8916), true) |
| 45 | LOCAL_SRC_FILES += power-8916.c |
| 46 | endif |
| 47 | |
Ethan Chen | 542ac97 | 2016-01-03 14:52:58 -0800 | [diff] [blame] | 48 | ifeq ($(call is-board-platform-in-list, msm8952), true) |
| 49 | LOCAL_SRC_FILES += power-8952.c |
| 50 | endif |
| 51 | |
Sravan Kumar Ambapuram | 1cd9b49 | 2016-01-07 14:47:37 +0530 | [diff] [blame] | 52 | ifeq ($(call is-board-platform-in-list,msm8937), true) |
Ricardo Cerqueira | c1deb0b | 2016-07-16 02:13:02 +0100 | [diff] [blame] | 53 | LOCAL_SRC_FILES += power-8937.c |
Ricardo Cerqueira | bf4ce35 | 2016-07-15 19:43:13 +0100 | [diff] [blame] | 54 | LOCAL_CFLAGS += -DMPCTLV3 |
Sravan Kumar Ambapuram | 1cd9b49 | 2016-01-07 14:47:37 +0530 | [diff] [blame] | 55 | endif |
| 56 | |
Dilip Gudlur | 85eedf8 | 2014-01-15 14:24:45 -0800 | [diff] [blame] | 57 | ifeq ($(call is-board-platform-in-list, apq8084), true) |
| 58 | LOCAL_SRC_FILES += power-8084.c |
| 59 | endif |
| 60 | |
Dilip Gudlur | b0eb8ec | 2015-01-28 15:17:45 -0800 | [diff] [blame] | 61 | ifeq ($(call is-board-platform-in-list, msm8992), true) |
| 62 | LOCAL_SRC_FILES += power-8992.c |
| 63 | endif |
| 64 | |
Dilip Gudlur | f9cefe7 | 2014-11-02 17:25:52 -0800 | [diff] [blame] | 65 | ifeq ($(call is-board-platform-in-list, msm8994), true) |
| 66 | LOCAL_SRC_FILES += power-8994.c |
| 67 | endif |
| 68 | |
Dilip Gudlur | c798dcf | 2015-07-01 14:13:43 -0700 | [diff] [blame] | 69 | ifeq ($(call is-board-platform-in-list, msm8996), true) |
| 70 | LOCAL_SRC_FILES += power-8996.c |
Steve Kondik | 25f4364 | 2016-06-26 07:42:10 -1000 | [diff] [blame] | 71 | LOCAL_CFLAGS += -DMPCTLV3 |
Dilip Gudlur | c798dcf | 2015-07-01 14:13:43 -0700 | [diff] [blame] | 72 | endif |
| 73 | |
Christopher R. Palmer | ff29d08 | 2016-04-07 06:13:45 -0400 | [diff] [blame] | 74 | endif # End of board specific list |
| 75 | |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 76 | ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),) |
| 77 | LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT |
| 78 | LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT) |
| 79 | endif |
| 80 | |
Steve Kondik | 9d7c82c | 2015-10-19 14:43:39 -0700 | [diff] [blame] | 81 | ifneq ($(TARGET_TAP_TO_WAKE_NODE),) |
Keith Mok | 5a4e49d | 2015-11-13 09:46:14 -0800 | [diff] [blame] | 82 | LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\" |
| 83 | endif |
| 84 | |
| 85 | ifeq ($(TARGET_POWER_SET_FEATURE_LIB),) |
| 86 | LOCAL_SRC_FILES += power-feature-default.c |
| 87 | else |
| 88 | LOCAL_STATIC_LIBRARIES += $(TARGET_POWER_SET_FEATURE_LIB) |
Steve Kondik | 9d7c82c | 2015-10-19 14:43:39 -0700 | [diff] [blame] | 89 | endif |
| 90 | |
Giulio Cervera | 66bdbc2 | 2014-03-28 21:11:17 +0100 | [diff] [blame] | 91 | ifneq ($(CM_POWERHAL_EXTENSION),) |
| 92 | LOCAL_MODULE := power.$(CM_POWERHAL_EXTENSION) |
| 93 | else |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 94 | LOCAL_MODULE := power.$(TARGET_BOARD_PLATFORM) |
Giulio Cervera | 66bdbc2 | 2014-03-28 21:11:17 +0100 | [diff] [blame] | 95 | endif |
Steve Kondik | 40ea4d6 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 96 | LOCAL_MODULE_TAGS := optional |
| 97 | include $(BUILD_SHARED_LIBRARY) |
| 98 | |
Steve Kondik | 1fd0069 | 2014-03-28 11:57:33 -0700 | [diff] [blame] | 99 | endif # TARGET_POWERHAL_VARIANT == qcom || WITH_QC_PERF |