summaryrefslogtreecommitdiff
path: root/board/pazquel/board.c
diff options
context:
space:
mode:
authorTang Qijun <qijun.tang@ecs.corp-partner.google.com>2021-08-24 22:49:28 -0400
committerCommit Bot <commit-bot@chromium.org>2021-09-08 20:34:34 +0000
commit026fce8e3ae374c78abf0c88e8b75bcd6d35d540 (patch)
treeb031d2cb0a5eddbff09f6e8025e41c28036f9762 /board/pazquel/board.c
parentc8e071566ceb60190120dbc7c0c0a681364cc5d9 (diff)
downloadchrome-ec-026fce8e3ae374c78abf0c88e8b75bcd6d35d540.tar.gz
pazquel: Support clamshell SKUs
Configure the sensor count to 0, disable the tablet mode switch, and disable the interrupt line for the clamshell SKUs. BRANCH=trogdor BUG=b:187249927 TEST=>accelinfo Motion sensors count = 0 Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: I3e3a07762f137b44d71207fff46d4b4df263dcb5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115931 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
Diffstat (limited to 'board/pazquel/board.c')
-rw-r--r--board/pazquel/board.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/board/pazquel/board.c b/board/pazquel/board.c
index 8415e59f36..190432bdfd 100644
--- a/board/pazquel/board.c
+++ b/board/pazquel/board.c
@@ -270,6 +270,18 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = {
},
};
+static void board_update_sensor_config_clamshell(void)
+{
+ motion_sensor_count = 0;
+ gmr_tablet_switch_disable();
+ /* The sensors are not stuffed; don't allow lines to float */
+ gpio_set_flags(GPIO_ACCEL_GYRO_INT_L,
+ GPIO_INPUT | GPIO_PULL_DOWN);
+ gpio_set_flags(GPIO_LID_ACCEL_INT_L,
+ GPIO_INPUT | GPIO_PULL_DOWN);
+}
+DECLARE_HOOK(HOOK_INIT, board_update_sensor_config_clamshell,
+ HOOK_PRIO_INIT_I2C + 2);
/* Initialize board. */
static void board_init(void)
{
@@ -600,4 +612,4 @@ struct motion_sensor_t motion_sensors[] = {
.max_frequency = BMI_GYRO_MAX_FREQ,
},
};
-const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
+unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);