summaryrefslogtreecommitdiff
path: root/board/fleex
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2019-08-15 18:24:22 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-19 03:47:09 +0000
commit0beadf2ffd8b23e15d1e7c14de8719d0f45c9519 (patch)
tree9b531ef5087e3935542560a4bc9b7cc379c3e843 /board/fleex
parent16d2b24ac05f7a5654bddcf9cb61f0f6684d1806 (diff)
downloadchrome-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 'board/fleex')
-rw-r--r--board/fleex/analyzestack.yaml2
-rw-r--r--board/fleex/board.c2
-rw-r--r--board/fleex/gpio.inc2
3 files changed, 3 insertions, 3 deletions
diff --git a/board/fleex/analyzestack.yaml b/board/fleex/analyzestack.yaml
index c0095c34f8..08c8ba93a9 100644
--- a/board/fleex/analyzestack.yaml
+++ b/board/fleex/analyzestack.yaml
@@ -267,7 +267,7 @@ remove:
# Remove nonesense hook paths that come from the general hook_notify above (Note: these are not a comprehensive list, but a list of
# paths that came up as longest during analysis
# These functions do not call HOOK_INIT
-- [ [ s0ix_transition, charger_task, power_button_change_deferred, jump_to_image, tablet_set_mode, pd_set_suspend, set_state, extpower_deferred, lid_switch_open, lid_switch_close, espi_chipset_reset, lpc_chipset_reset ], hook_notify, [ usb_charger_init, baseboard_tcpc_init, motion_sense_startup, hall_sensor_init, powerbtn_x86_init, cbi_init ] ]
+- [ [ s0ix_transition, charger_task, power_button_change_deferred, jump_to_image, tablet_set_mode, pd_set_suspend, set_state, extpower_deferred, lid_switch_open, lid_switch_close, espi_chipset_reset, lpc_chipset_reset ], hook_notify, [ usb_charger_init, baseboard_tcpc_init, motion_sense_startup, gmr_tablet_switch_init, powerbtn_x86_init, cbi_init ] ]
# These functions do not call HOOK_CHIPSET_SHUTDOWN
- [ [ s0ix_transition, charger_task, power_button_change_deferred, jump_to_image, tablet_set_mode, pd_set_suspend, set_state, extpower_deferred, lid_switch_open, lid_switch_close, hook_task, espi_chipset_reset, lpc_chipset_reset ], hook_notify, [ system_common_shutdown, motion_sense_shutdown, board_disable_a1_redriver ] ]
# These functions do not call HOOK_LID_CHANGE
diff --git a/board/fleex/board.c b/board/fleex/board.c
index 2e3557c6b7..57f13b5e49 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -220,7 +220,7 @@ static void board_update_sensor_config_from_sku(void)
gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L);
} else {
motion_sensor_count = 0;
- hall_sensor_disable();
+ gmr_tablet_switch_disable();
/* Base accel is not stuffed, don't allow line to float */
gpio_set_flags(GPIO_BASE_SIXAXIS_INT_L,
GPIO_INPUT | GPIO_PULL_DOWN);
diff --git a/board/fleex/gpio.inc b/board/fleex/gpio.inc
index 987a02674b..99870a844f 100644
--- a/board/fleex/gpio.inc
+++ b/board/fleex/gpio.inc
@@ -37,7 +37,7 @@ GPIO_INT(ALL_SYS_PGOOD, PIN(F, 4), GPIO_INT_BOTH, power_signal_interrupt) /* PM
/* Other interrupts */
GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) /* EC_WP_ODL */
-GPIO_INT(TABLET_MODE_L, PIN(8, 6), GPIO_INT_BOTH, hall_sensor_isr)
+GPIO_INT(TABLET_MODE_L, PIN(8, 6), GPIO_INT_BOTH, gmr_tablet_switch_isr)
GPIO_INT(BASE_SIXAXIS_INT_L, PIN(5, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, lsm6dsm_interrupt)
GPIO(LID_ACCEL_INT_L, PIN(5, 0), GPIO_INPUT | GPIO_SEL_1P8V)