OSDN Git Service

greybus: lights: add lights implementation
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 14 Aug 2015 12:58:19 +0000 (13:58 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 14 Aug 2015 21:47:07 +0000 (14:47 -0700)
commit2870b52bae4c81823ffcb3ed2b0626fb39d64f48
treec49f4e2bf727dc76a4b71a23b1894ff14f648a5c
parent13fcfbb6c5bbd7aee7e9980313dc29469357c5cd
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>
drivers/staging/greybus/Makefile
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/kernel_ver.h
drivers/staging/greybus/light.c [new file with mode: 0644]