Private
Public Access
2
0

led: Add on board LED support

This patch adds support for using on board LED through sysfs.
Commonly available LED parameters are supported.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Manivannan Sadhasivam
2017-08-25 18:01:19 +05:30
committed by Brendan Le Foll
parent e7b51f3b66
commit e1382ad845
8 changed files with 653 additions and 1 deletions

View File

@@ -241,6 +241,20 @@ struct _iio {
};
#endif
/**
* A structure representing an LED device
*/
struct _led {
/*@{*/
int count; /**< total LED count in a platform */
char *led_name; /**< LED name */
char led_path[64]; /**< sysfs path of the LED */
int trig_fd; /**< trigger file descriptor */
int bright_fd; /**< brightness file descriptor */
int max_bright_fd; /**< maximum brightness file descriptor */
/*@}*/
};
/**
* A bitfield representing the capabilities of a pin.
*/