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>
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 3006ede..5c29b63 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -30,6 +30,7 @@
gb-vibrator-y := vibrator.o
gb-battery-y := battery.o
gb-loopback-y := loopback.o
+gb-light-y := light.o
gb-raw-y := raw.o
gb-es1-y := es1.o
gb-es2-y := es2.o
@@ -39,6 +40,7 @@
obj-m += gb-vibrator.o
obj-m += gb-battery.o
obj-m += gb-loopback.o
+obj-m += gb-light.o
obj-m += gb-raw.o
obj-m += gb-es1.o
obj-m += gb-es2.o