diff options
author | Philip Chen <philipchen@google.com> | 2019-08-15 18:24:22 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-19 03:47:09 +0000 |
commit | 0beadf2ffd8b23e15d1e7c14de8719d0f45c9519 (patch) | |
tree | 9b531ef5087e3935542560a4bc9b7cc379c3e843 /common/motion_lid.c | |
parent | 16d2b24ac05f7a5654bddcf9cb61f0f6684d1806 (diff) | |
download | chrome-ec-0beadf2ffd8b23e15d1e7c14de8719d0f45c9519.tar.gz |
tablet_mode: Renaming for GMR sensor
GMR sensors can be used to
(1) detect clamshell/tablet mode
(2) detect lid open/closed
But hall sensors can only do (2).
Therefore the naming related to "hall sensor" for tablet mode
application is incorrect.
This patch performs the following renaming to better reflect the reality:
config:
CONFIG_HALL_SENSOR -> CONFIG_GMR_TABLET_MODE
CONFIG_HALL_SENSOR_CUSTOM -> CONFIG_GMR_TABLET_MODE_CUSTOM
CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR ->
CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR
GPIO:
HALL_SENSOR_GPIO_L -> GMR_TABLET_MODE_GPIO_L
functions:
hall_sensor_disable() -> gmr_tablet_switch_disable()
hall_sensor_isr() -> gmr_tablet_switch_isr()
hall_sensor_int() -> gmr_tablet_switch_init()
variable:
hall_sensor_at_360 -> gmr_sensor_at_360
BUG=b:139378190
BRANCH=none
TEST=make buildall
Change-Id: I28393d056ddd128d8ffafc16a1f9fefee5455ccc
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1757275
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Diffstat (limited to 'common/motion_lid.c')
-rw-r--r-- | common/motion_lid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/motion_lid.c b/common/motion_lid.c index 7354639083..bb07dcaf91 100644 --- a/common/motion_lid.c +++ b/common/motion_lid.c @@ -207,7 +207,7 @@ static int lid_angle_set_tablet_mode_threshold(int angle, int hys) #endif /* CONFIG_TABLET_MODE */ #if defined(CONFIG_DPTF_MULTI_PROFILE) && \ - defined(CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR) + defined(CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR) /* * If CONFIG_DPTF_MULTI_PROFILE is defined by a board, then lid motion driver @@ -264,7 +264,7 @@ static void motion_lid_set_dptf_profile(int reliable) debounce_cnt = DPTF_MODE_DEBOUNCE_COUNT; } -#endif /* CONFIG_DPTF_MULTI_PROFILE && CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR */ +#endif /* CONFIG_DPTF_MULTI_PROFILE && CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR */ /** * Calculate the lid angle using two acceleration vectors, one recorded in @@ -458,9 +458,9 @@ end_calculate_lid_angle: motion_lid_set_tablet_mode(reliable); #if defined(CONFIG_DPTF_MULTI_PROFILE) && \ - defined(CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR) + defined(CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR) motion_lid_set_dptf_profile(reliable); -#endif /* CONFIG_DPTF_MULTI_PROFILE && CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR */ +#endif /* CONFIG_DPTF_MULTI_PROFILE && CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR */ #else /* CONFIG_TABLET_MODE */ end_calculate_lid_angle: |