diff options
author | Josh Tsai <josh_tsai@compal.corp-partner.google.com> | 2022-03-22 14:57:02 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-06 01:39:01 +0000 |
commit | e3ffea79e9d069ef9217e5e198bdccfc88b06311 (patch) | |
tree | 188aab4e210a6db11cffcf081cdd1fd99de80ab6 /board/banshee/sensors.c | |
parent | 065e1007ea67905926076fd0365cfe34ebf823cb (diff) | |
download | chrome-ec-e3ffea79e9d069ef9217e5e198bdccfc88b06311.tar.gz |
Banshee: modified the als calibration value
Modified the ALS coefficient to 3.8 into EC
BUG=b:219424210
BRANCH=none
TEST=use ectool motionsense to check the value
Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
Change-Id: I838c4f7e23d13087fe06a72101b2e76fd6c29024
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3538157
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Diffstat (limited to 'board/banshee/sensors.c')
-rw-r--r-- | board/banshee/sensors.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/board/banshee/sensors.c b/board/banshee/sensors.c index eb5167b26d..b4b6360984 100644 --- a/board/banshee/sensors.c +++ b/board/banshee/sensors.c @@ -43,8 +43,12 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); /* CM32183 private data */ static struct als_drv_data_t g_cm32183_data = { - .als_cal.scale = 1, - .als_cal.uscale = 0, + /** + * adjusted_value = raw_value * scale + raw_value * uscale / 10000 + * the coeficient we need is 3.8 + */ + .als_cal.scale = 3, + .als_cal.uscale = 8000, .als_cal.offset = 0, .als_cal.channel_scale = { /* TODO(b/219424210): Calibrate ALS CM32183A3OP */ |