From 7d50aacabde1df476dca52d43e4cdf87cc5d6abf Mon Sep 17 00:00:00 2001 From: toobest54 Date: Thu, 12 Apr 2018 19:52:05 +0800 Subject: [PATCH] Nami: Disable ALS for Pantheon Use OEM ID to update motion_sensor_count to disable ALS for Pantheon. BUG=b:77937854 BRANCH=none TEST=Change oem id for Pantheon then to check the ALS was disabled. Change-Id: I4cb2ad16f3413a65b6f2df84eae2d1ced37b72f6 Signed-off-by: Raymond Chou Reviewed-on: https://chromium-review.googlesource.com/1010182 Reviewed-by: Daisuke Nojiri Reviewed-by: Carter Sung --- board/nami/board.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/board/nami/board.c b/board/nami/board.c index 378a761d58..5878515149 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -676,14 +676,15 @@ DECLARE_HOOK(HOOK_LID_CHANGE, lm3509_kblight_lid_change, HOOK_PRIO_DEFAULT); static void board_set_motion_sensor_count(void) { /* There are two possible sensor configurations. - * Vayne(Dell) is without ALS sensor + * Vayne/Sona/Pantheon are without ALS sensor * Nami is with ALS sensor * Use the oem id to different them. */ uint32_t oem_id; if (cbi_get_oem_id(&oem_id) == EC_SUCCESS) { - if (oem_id == PROJECT_VAYNE || oem_id == PROJECT_SONA) + if (oem_id == PROJECT_VAYNE || oem_id == PROJECT_SONA + || oem_id == PROJECT_PANTHEON) motion_sensor_count = ARRAY_SIZE(motion_sensors) - 1; } }