diff options
author | Furquan Shaikh <furquan@google.com> | 2018-11-01 14:39:25 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-15 02:16:02 -0800 |
commit | c495141798b6766ac13e73a018f736d9c4289aba (patch) | |
tree | 6b262bc7e568392e7dc394e47968e940cf25ba4d | |
parent | 6399ef86c6a15e98e54de41e3ed0a0c0f1b4f5c1 (diff) | |
download | chrome-ec-c495141798b6766ac13e73a018f736d9c4289aba.tar.gz |
soraka: Enable multi-profile DPTF
This change enables multi profile DPTF for soraka by selecting
CONFIG_DPTF_MULTI_PROFILE and setting appropriate profile numbers
based on base attach/detach state.
CQ-DEPEND=CL:1295851,CL:1295852
BUG=b:17844490
BRANCH=None
TEST=make -j buildall
Change-Id: I7b48025f8eeca9fd585099dc5dce011963780117
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1313470
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@google.com>
-rw-r--r-- | board/poppy/base_detect_poppy.c | 7 | ||||
-rw-r--r-- | board/poppy/board.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/board/poppy/base_detect_poppy.c b/board/poppy/base_detect_poppy.c index a049b41acd..dc4341d51a 100644 --- a/board/poppy/base_detect_poppy.c +++ b/board/poppy/base_detect_poppy.c @@ -5,6 +5,7 @@ /* Poppy/Soraka base detection code */ +#include "acpi.h" #include "adc.h" #include "adc_chip.h" #include "board.h" @@ -96,6 +97,12 @@ static void base_detect_change(enum base_status status) gpio_set_level(GPIO_PP3300_DX_BASE, connected); tablet_set_mode(!connected); current_base_status = status; + + if (connected) + acpi_dptf_set_profile_num(DPTF_PROFILE_BASE_ATTACHED); + else + acpi_dptf_set_profile_num(DPTF_PROFILE_BASE_DETACHED); + } /* Measure detection pin pulse duration (used to wake AP from deep S3). */ diff --git a/board/poppy/board.h b/board/poppy/board.h index 8b0a0f5944..c7beac8fcf 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -22,6 +22,9 @@ #define CONFIG_BUTTON_TRIGGERED_RECOVERY #define CONFIG_DETACHABLE_BASE #define CONFIG_DPTF +#ifndef BOARD_LUX +#define CONFIG_DPTF_MULTI_PROFILE +#endif #define CONFIG_EMULATED_SYSRQ #define CONFIG_FLASH_SIZE 0x80000 #define CONFIG_FPU |