Use two-color lightbar scheme, with KB backlight for brightness

Yet another set of tweaks to the lightbar patterns:

At Startup or wake from sleep, Google colors cycle in.

While running, > 25% power level in the battery:
All blue, in a breathing effect (cycle up and down 30%).

While running, <= 25% power level in battery:
Same as above, but with red

Shutting down, or going into sleep:
Cycle out the Google colors (Note: the effect is only visible for S0->S3,
because shutting down kills power to the lightbar before we can react).

While sleeping:
Similar to now, but only using Blue and red for battery indication as above.

The EC doesn't have access to the ALS, so we use the keyboard backlight to
control the lightbar brightness instead:

If keyboard backlight is OFF (which it is when ambient is bright), use max
brightness for lightbar.

If keyboard backlight is ON, use keyboard backlight brightness.


This is an aesthetic change. Nothing to test, only artisitic criticism.

Change-Id: Ib0b98eef18984945a83e988588c225025c4e8e52
Signed-off-by: Bill Richardson <>
Reviewed-by: Randall Spangler <>
2 files changed