summaryrefslogtreecommitdiff
path: root/board/boten/board.c
diff options
context:
space:
mode:
authorxiong.huang <xiong.huang@bitland.corp-partner.google.com>2020-07-07 13:23:20 +0800
committerCommit Bot <commit-bot@chromium.org>2020-07-15 05:41:33 +0000
commitd3a2090e1e0061ec664f914f10d1220395100635 (patch)
tree6cfed1454e67a289db322b5b09fcd73a3d7f4f4c /board/boten/board.c
parent234286a32f62067e06679faff0cc6c8f238fa877 (diff)
downloadchrome-ec-d3a2090e1e0061ec664f914f10d1220395100635.tar.gz
boten: define power and battery led behavior
Boten uses two types LED, battery LED and power LED. Battery LED uses dual-color LED, green and red. Power LED uses monochrome LED, white. BUG=b:160664441 BRANCH=none TEST=`ectool led battery red/amber/green/off` and `ectool led power white/off` work well. Cq-Depend: chromium:2296544 Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: I6fb87d841ce837ebdc256154dc4b8557f6ed0401 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282740 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/boten/board.c')
-rw-r--r--board/boten/board.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/boten/board.c b/board/boten/board.c
index 44670d2041..520d69d1bb 100644
--- a/board/boten/board.c
+++ b/board/boten/board.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Waddledee board-specific configuration */
+/* Boten board-specific configuration */
#include "adc_chip.h"
#include "button.h"
@@ -148,6 +148,11 @@ void board_init(void)
gpio_enable_interrupt(GPIO_HDMI_HPD_SUB_ODL);
gpio_set_level(GPIO_HDMI_EN_SUB_ODL, 0);
+
+ /* Set LEDs luminance */
+ pwm_set_duty(PWM_CH_LED_RED, 70);
+ pwm_set_duty(PWM_CH_LED_GREEN, 70);
+ pwm_set_duty(PWM_CH_LED_WHITE, 70);
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -260,7 +265,7 @@ const struct pwm_t pwm_channels[] = {
.freq_hz = 2400,
},
- [PWM_CH_LED_BLUE] = {
+ [PWM_CH_LED_WHITE] = {
.channel = 3,
.flags = PWM_CONFIG_DSLEEP | PWM_CONFIG_ACTIVE_LOW,
.freq_hz = 2400,