diff options
Diffstat (limited to 'board/samus')
-rw-r--r-- | board/samus/board.c | 9 | ||||
-rw-r--r-- | board/samus/board.h | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/board/samus/board.c b/board/samus/board.c index db8639acb9..d7f5b58e5f 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -4,12 +4,14 @@ */ /* EC for Samus board configuration */ +#include "als.h" #include "adc.h" #include "adc_chip.h" #include "backlight.h" #include "chipset_x86_common.h" #include "common.h" #include "driver/temp_sensor/tmp006.h" +#include "driver/als_isl29035.h" #include "extpower.h" #include "fan.h" #include "gpio.h" @@ -267,6 +269,13 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); +/* ALS instances. Must be in same order as enum als_id. */ +struct als_t als[] = { + {"ISL", isl29035_read_lux}, +}; +BUILD_ASSERT(ARRAY_SIZE(als) == ALS_COUNT); + + /* Thermal limits for each temp sensor. All temps are in degrees K. Must be in * same order as enum temp_sensor_id. To always ignore any temp, use 0. */ diff --git a/board/samus/board.h b/board/samus/board.h index e32ee8beb3..8e124b066e 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -15,6 +15,8 @@ #undef HEY_USE_BUILTIN_CLKRUN /* Optional features */ +#define CONFIG_ALS +#define CONFIG_ALS_ISL29035 #define CONFIG_BOARD_VERSION #define CONFIG_CHIPSET_X86 #define CONFIG_CHIPSET_CAN_THROTTLE @@ -215,6 +217,13 @@ enum temp_sensor_id { /* The number of TMP006 sensor chips on the board. */ #define TMP006_COUNT 6 +/* Light sensors attached to the EC. */ +enum als_id { + ALS_ISL29035 = 0, + + ALS_COUNT, +}; + /* Known board versions for system_get_board_version(). */ enum board_version { BOARD_VERSION_PROTO1 = 0, |