From 0748d4efa8951e2d61e9a13e7f7526aab8086c9c Mon Sep 17 00:00:00 2001 From: Nick Vaccaro Date: Wed, 23 Oct 2019 20:12:13 -0700 Subject: drivers/tcs3400: update fields for new irt scale factor A new irt scaling factor was added to the tcs3400 driver to further improve the sensor CCT accuracy, requiring a structure definition to change. This change fixes existing boards that use the tcs3400 to use this new structure definition. Boards modified include flapjack, hatch, kohaku, kukui, and stryke. BUG=b:143246741 BRANCH=master TEST=execute "make -j BOARD=" for kukui, kohaku, flapjack, and hatch and make sure they build without error. Cq-Depend: chromium:1879188 Change-Id: Icad96877b5cd9966e927e4dd150335c988725f0c Signed-off-by: Nick Vaccaro Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879189 Tested-by: Mengqi Guo Reviewed-by: Mengqi Guo Reviewed-by: Scott Collyer --- board/kukui/board.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'board/kukui') diff --git a/board/kukui/board.c b/board/kukui/board.c index 21d77589fe..c3fc1fc9ce 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -368,7 +368,7 @@ static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { * TODO(b:139366662): calculates the actual coefficients and scaling * factors */ - .rgb_cal[X] = { + .calibration.rgb_cal[X] = { .offset = 0, .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kr */ @@ -379,7 +379,7 @@ static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0), }, - .rgb_cal[Y] = { + .calibration.rgb_cal[Y] = { .offset = 0, .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kg */ @@ -390,7 +390,7 @@ static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.1), }, - .rgb_cal[Z] = { + .calibration.rgb_cal[Z] = { .offset = 0, .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kb */ @@ -401,6 +401,7 @@ static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0), .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0), }, + .calibration.irt = INT_TO_FP(1), .saturation.again = TCS_DEFAULT_AGAIN, .saturation.atime = TCS_DEFAULT_ATIME, }; -- cgit v1.2.1