summaryrefslogtreecommitdiff
path: root/driver/bc12/mt6360.c
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2020-09-09 17:16:37 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-15 08:26:50 +0000
commit64013cb81d3f27908cfbca0d814008f32f7dae54 (patch)
tree7ceab5222f35b821ea3b2e16754e7037350e18fa /driver/bc12/mt6360.c
parent889b52a87e471615ba908246317ef6a502b70160 (diff)
downloadchrome-ec-64013cb81d3f27908cfbca0d814008f32f7dae54.tar.gz
asurada: rev1: update led control
Implemented manual led control according to b/167941026 comment#3. BUG=b:167941026 TEST=ectool led left/right/power/battery amber/white BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ic2bfbdc3e5c65420c96a807ba983d63a7fcebb63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2400798 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'driver/bc12/mt6360.c')
-rw-r--r--driver/bc12/mt6360.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/driver/bc12/mt6360.c b/driver/bc12/mt6360.c
index 49de200f52..a5b5ceb487 100644
--- a/driver/bc12/mt6360.c
+++ b/driver/bc12/mt6360.c
@@ -399,6 +399,13 @@ int mt6360_ldo_get_voltage(enum mt6360_ldo_id ldo_id, int *voltage_mv)
}
/* RGB LED */
+void mt6360_led_init(void)
+{
+ /* Enable LED1 software mode */
+ mt6360_set_bit(MT6360_REG_RGB_EN, MT6360_ISINK1_CHRIND_EN_SEL);
+}
+DECLARE_HOOK(HOOK_INIT, mt6360_led_init, HOOK_PRIO_DEFAULT);
+
int mt6360_led_enable(enum mt6360_led_id led_id, int enable)
{
if (!IN_RANGE(led_id, 0, MT6360_LED_COUNT))