common: export global gestures node as well

Change-Id: Ib6f81e17202da81f1455ab7d2685132c7aa34ab2
Signed-off-by: Carlo Savignano <carlosavignano@aospa.co>
This commit is contained in:
Carlo Savignano 2016-04-24 16:04:14 +08:00
parent 2f18635486
commit b3df3fbe2f
2 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,10 @@ ifeq ($(call is-board-platform-in-list, msm8996), true)
LOCAL_SRC_FILES += power-8996.c
endif
ifneq ($(TARGET_GESTURES_NODE),)
LOCAL_CFLAGS += -DGESTURES_NODE=\"$(TARGET_GESTURES_NODE)\"
endif
ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
endif

View File

@ -28,6 +28,13 @@ void set_device_specific_feature(struct power_module *module __unused,
char tmp_str[NODE_MAX];
snprintf(tmp_str, NODE_MAX, "%d", state);
#ifdef GESTURES_NODE
if (feature == POWER_FEATURE_GESTURES) {
sysfs_write(GESTURES_NODE, tmp_str);
return;
}
#endif
#ifdef TAP_TO_WAKE_NODE
if (feature == POWER_FEATURE_DOUBLE_TAP_TO_WAKE) {
sysfs_write(TAP_TO_WAKE_NODE, tmp_str);