summaryrefslogtreecommitdiff
path: root/board/volteer
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2021-09-10 14:39:16 +0000
committerCommit Bot <commit-bot@chromium.org>2021-09-10 22:35:05 +0000
commit2c0c44bed1d4b866cd33abc6ed29ac6241b32476 (patch)
treed0fc27a7bc01156f959a5f24e6906d153cddf912 /board/volteer
parent8b37b17df0b8946763b1da984c64c51418a6b381 (diff)
downloadchrome-ec-2c0c44bed1d4b866cd33abc6ed29ac6241b32476.tar.gz
zephyr: shim: set pwm_led data from device tree
Set up the pwm_leds data from the device tree, gets rid of most static map defines and sets CONFIG_LED_PWM_COUNT automatically. BRANCH=none BUG=b:177452529 TEST=build and run on volteer TEST=compared the built up pwm_leds structure with gdb Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib41faf86ae018f5a1ed8a1c96c4b6ec081e175d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154256 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'board/volteer')
-rw-r--r--board/volteer/led.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/volteer/led.c b/board/volteer/led.c
index c0ad9be6b0..35bede89c5 100644
--- a/board/volteer/led.c
+++ b/board/volteer/led.c
@@ -31,6 +31,7 @@ struct pwm_led led_color_map[] = {
[EC_LED_COLOR_AMBER] = { 100, 20, 0 },
};
+#ifndef CONFIG_ZEPHYR
struct pwm_led pwm_leds[] = {
/* 2 RGB diffusers controlled by 1 set of 3 channels. */
[PWM_LED0] = {
@@ -41,6 +42,7 @@ struct pwm_led pwm_leds[] = {
.set_duty = &pwm_set_duty,
},
};
+#endif
void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
{