liblights: LED HAL for AS3668 LED

To turn LED OFF:
Set flashOnMS to 0
OR set the ARGB color input with A = 0
OR set the ARGB color input with R=G=B = 0

To turn LED ON:
Set flashOnMS > 0 and flashOffMS to 0

To make LED BLINK:
Set flashOnMS > 0 and flashOffMS > 0

ARGB is converted to RGBW: W = min(R,G,B). {R,G,B} = {R,G,B} - W
flashOnMS & flashOffMS must be positive values

AS3668 LED is controlled through sysfs as follows:
Slope up/down are written every time.
To turn LED OFF, 0 is written to brightness.
To turn LED ON, a RGBW color value is written to color, then 255 is written to
brightness
To make LED BLINK, "timer" is written to trigger. Then color, brightness, and delay on/off are written.

Change-Id: Id5cff5db8bcb4a3ad43796ec1f239c7b530ad2c5
Signed-off-by: Veeren Mandalia <v.mandalia@sta.samsung.com>
1 file changed