greybus: lights: add lights implementation
This patch adds lights implementation for Greybus Lights class, it
allows multiplexing of lights devices using the same connection. Also
adds two sysfs entries to led class (color, fade) which are commonly
used in several existing LED devices.
It support 2 major class of devices (normal LED and flash type), for
the first it registers to led_classdev, for the latest it registers in
the led_classdev_flash and v4l2_flash, depending on the support of the
kernel version.
Each Module can have N light devices attach and each light can have
multiple channel associated:
glights
|->light0
| |->channel0
| |->channel1
| | ....
| |->channeln
|->...
|->lightn
|->channel0
|->channel1
| ....
|->channeln
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>