diff options
author | Leila Lin <leilacy_lin@compal.corp-partner.google.com> | 2022-10-21 17:36:29 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-22 14:14:30 +0000 |
commit | 8d889f297cb1d230e92042bfe8dce63135d8e14b (patch) | |
tree | 626212e3af58c0e714ebadc28a2af3eeebdb2dfe /driver/led/tlc59116f.c | |
parent | 05cb6efaf9482eb5962bce9f864ac575364722fe (diff) | |
download | chrome-ec-8d889f297cb1d230e92042bfe8dce63135d8e14b.tar.gz |
led/tlc59116f: Set brightness before driver disablestabilize-15208.B-mainstabilize-15207.B-main
Set brightness to 0 before disable rgbkb backlight to make sure
keyboard backlight is off.
BUG=b:251332820
BRANCH=brya
TEST=mithrax can close rgbkb backlight when lid close
Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com>
Change-Id: I3fc1e2139608c2db142c52dc82d96a111d2f3bc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3971237
Reviewed-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com>
Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com>
Diffstat (limited to 'driver/led/tlc59116f.c')
-rw-r--r-- | driver/led/tlc59116f.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/driver/led/tlc59116f.c b/driver/led/tlc59116f.c index 3debdb3cfb..1350602f6f 100644 --- a/driver/led/tlc59116f.c +++ b/driver/led/tlc59116f.c @@ -70,6 +70,15 @@ static int tlc59116f_enable(struct rgbkbd *ctx, bool enable) return rv; } + if (!enable) { + for (int i = TLC59116F_LEDOUT0; i <= TLC59116F_LEDOUT3; i++) { + rv = tlc59116f_write(ctx, i, TLC59116_LEDOUT_OFF); + if (rv) { + return rv; + } + } + } + WRITE_BIT(cfg, TLC59116_MODE_BIT_SLEEP, !enable); return tlc59116f_write(ctx, TLC59116F_MODE1, cfg); } |