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 <raymond_chou@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/1010182
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Carter Sung <carter_sung@compal.corp-partner.google.com>
This commit is contained in:
toobest54
2018-04-12 19:52:05 +08:00
committed by chrome-bot
parent f6a6b7ad89
commit 7d50aacabd

View File

@@ -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;
}
}