summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2022-03-16 12:22:32 -0700
committerCommit Bot <commit-bot@chromium.org>2022-03-16 23:56:51 +0000
commit5081c7ce7527c977b8eca37fb4a561863d91b75b (patch)
treeec234447bc8658d827dc578767bc7d1729d33ef6
parentd28900b02762ad70d884d2b6c55584d6957a5bac (diff)
downloadchrome-ec-5081c7ce7527c977b8eca37fb4a561863d91b75b.tar.gz
herobrine: Fix LED config for hoglin
Hoglin has a single blue/red LED on the right side, adjust the LED configuration to reflect that. BUG=b:223102797 TEST=ectool led right query Brightness range for LED 4: red : 0x1 green : 0x0 blue : 0x1 yellow : 0x0 white : 0x0 amber : 0x0 BRANCH=None Change-Id: Ia005a0de2c94bfbbcf8025492a57858b78888da6 Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530953 Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r--zephyr/projects/herobrine/src/led.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zephyr/projects/herobrine/src/led.c b/zephyr/projects/herobrine/src/led.c
index e1a7de8c6d..c97c26a63f 100644
--- a/zephyr/projects/herobrine/src/led.c
+++ b/zephyr/projects/herobrine/src/led.c
@@ -23,7 +23,9 @@
const enum ec_led_id supported_led_ids[] = {
EC_LED_ID_RIGHT_LED,
+#ifndef CONFIG_BOARD_HOGLIN
EC_LED_ID_LEFT_LED,
+#endif
};
const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);
@@ -49,8 +51,13 @@ static void side_led_set_color(int port, enum led_color color)
void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
{
+#ifndef CONFIG_BOARD_HOGLIN
brightness_range[EC_LED_COLOR_AMBER] = 1;
brightness_range[EC_LED_COLOR_WHITE] = 1;
+#else
+ brightness_range[EC_LED_COLOR_RED] = 1;
+ brightness_range[EC_LED_COLOR_BLUE] = 1;
+#endif
}
int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)