summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMengqi Guo <mqg@chromium.org>2020-01-02 13:50:44 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-03 23:39:51 +0000
commita202c79b41dc3451dc1867f799528042b93565c8 (patch)
tree7cf68df9d3a930ab7b69ef46d61d16f7652375d6
parent891aef19bb73822b5ec6c7ee088f99cf1c793253 (diff)
downloadchrome-ec-a202c79b41dc3451dc1867f799528042b93565c8.tar.gz
kohaku: tcs3400: update coeffs for als and rgb sensor
Update board files for kohaku to use new coefficients for als and rgb sensor. BUG=b:145701281, b:138754582 BRANCH=master TEST='make -j BOARD=kohaku' in EC repo, verified builds succeed. Verify on the device that ALS readings are valid. Reading in dark: in_illuminance_blue_raw:0 in_illuminance_green_raw:7 in_illuminance_raw:0 in_illuminance_red_raw:3 Cq-Depend: chromium:1986286 Change-Id: I3953adf6960db8e242e01db16bc126330d4a7d86 Signed-off-by: Mengqi Guo <mqg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984893 Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
-rw-r--r--board/kohaku/board.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/board/kohaku/board.c b/board/kohaku/board.c
index 62a36b60ae..144c316806 100644
--- a/board/kohaku/board.c
+++ b/board/kohaku/board.c
@@ -184,33 +184,33 @@ static struct als_drv_data_t g_tcs3400_data = {
static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = {
.calibration.rgb_cal[X] = {
- .offset = 92, /* 91.86488992 */
- .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.30551661),
- .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.60934973),
- .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.1675665),
- .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.30301793),
+ .offset = 3, /* 3.0350726 */
+ .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.34710205),
+ .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.72064361),
+ .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-0.95427326),
+ .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.20677441),
.scale = {
.k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kr */
.cover_scale = ALS_CHANNEL_SCALE(0.5)
}
},
.calibration.rgb_cal[Y] = {
- .offset = 89, /* 89.06144741 */
- .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.57703771),
- .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.46485215),
- .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.12901904),
- .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.43166926),
+ .offset = 7, /* 6.50411397 */
+ .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.40729596),
+ .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.82527267),
+ .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.01523751),
+ .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.20903764),
.scale = {
.k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kg */
.cover_scale = ALS_CHANNEL_SCALE(1.0)
},
},
.calibration.rgb_cal[Z] = {
- .offset = 91, /* 91.37365646 */
- .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-1.88271283),
- .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.27117152),
- .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.19261862),
- .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.95401891),
+ .offset = -4, /* -4.13932233 */
+ .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-2.35802533),
+ .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(-0.19742447),
+ .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0.13837045),
+ .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(1.07436207),
.scale = {
.k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kb */
.cover_scale = ALS_CHANNEL_SCALE(1.44)