summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorZick Wei <zick.wei@quanta.corp-partner.google.com>2021-03-08 09:17:52 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-08 10:56:41 +0000
commit0d8575e5901a4b4e701c285d6b5a0694184587c4 (patch)
treedc69a9fdbb1d9007643906e55ac5535930f6729f /include/driver
parente2ddc99972bdcfb7a5a7bb80d2cef6631828e598 (diff)
downloadchrome-ec-0d8575e5901a4b4e701c285d6b5a0694184587c4.tar.gz
driver/tcs3400: code cleanups for custom equation
This patch make tcs3400_translate_to_xyz() to overridable, let board could custom their own equation. BUG=b:176671564 BRANCH=None TEST=make BOARD=dooly Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ia475e03b995223575f9e3ff106bc12a406062c9b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738582 Tested-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/als_tcs3400_public.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/driver/als_tcs3400_public.h b/include/driver/als_tcs3400_public.h
index 9a9225bfc6..812aeda8d3 100644
--- a/include/driver/als_tcs3400_public.h
+++ b/include/driver/als_tcs3400_public.h
@@ -32,6 +32,7 @@
#define TCS_CALIBRATION_AGAIN 0x02 /* 16x gain */
#define TCS_DEFAULT_AGAIN TCS_CALIBRATION_AGAIN
+#define TCS_MAX_INTEGRATION_TIME 2780 /* 2780us */
#define TCS_ATIME_DEC_STEP 5
#define TCS_ATIME_INC_STEP TCS_GAIN_UPSHIFT_ATIME
@@ -69,5 +70,6 @@ extern const struct accelgyro_drv tcs3400_drv;
extern const struct accelgyro_drv tcs3400_rgb_drv;
void tcs3400_interrupt(enum gpio_signal signal);
+int tcs3400_get_integration_time(int atime);
#endif /* __CROS_EC_DRIVER_ALS_TCS3400_PUBLIC_H */