mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
power: Update DT2W_PATH
* TARGET_TAP_TO_WAKE_NODE is defined in if condition. But in DT2W_PATH, TARGET_DT2W_PATH is defined. Why? * Use same flag for both, otherwise we need to define two flags for the dt2w path. * Use TARGET_TAP_TO_WAKE_NODE instead of TARGET_DT2W_PATH, for similarity with qcom powerHAL. Change-Id: I87cbdc3f2aa1a3f9f6509580f2c1f001129a0fda
This commit is contained in:
parent
fe32c93da2
commit
987dcca825
2 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ LOCAL_SRC_FILES := power.c
|
|||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
|
||||
LOCAL_CFLAGS := -DDT2W_PATH=\"$(TARGET_DT2W_PATH)\"
|
||||
LOCAL_CFLAGS := -DTARGET_TAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -507,10 +507,10 @@ static void samsung_set_feature(struct power_module *module, feature_t feature,
|
|||
struct samsung_power_module *samsung_pwr = (struct samsung_power_module *) module;
|
||||
|
||||
switch (feature) {
|
||||
#ifdef DT2W_PATH
|
||||
#ifdef TARGET_TAP_TO_WAKE_NODE
|
||||
case POWER_FEATURE_DOUBLE_TAP_TO_WAKE:
|
||||
ALOGV("%s: %s double tap to wake", __func__, state ? "enabling" : "disabling");
|
||||
sysfs_write(DT2W_PATH, state > 0 ? "1" : "0");
|
||||
sysfs_write(TARGET_TAP_TO_WAKE_NODE, state > 0 ? "1" : "0");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue