1
0
Fork 0

greybus: lights: enable multi color LED support

A backport (commit 79c4de08c0e5a26b04a4ac9e6543dad6379f0b40) was
applied in kernel which adding attribute-group support in led-class.
Remove the LED_HAVE_GROUPS flag check entirely that allow led
drivers to create custom attributes like color/fade_in/fade_out.

Testing Done: Compiled and verified on EVT2 and gpbridge-test module
              with device class daughter board.

Signed-off-by: Kris Huang <huang_kris@projectara.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
hifive-unleashed-5.1
Kris Huang 2016-08-09 11:28:37 +08:00 committed by Greg Kroah-Hartman
parent 57fa2de1e5
commit 811b1f5861
2 changed files with 0 additions and 15 deletions

View File

@ -252,13 +252,6 @@ static inline size_t sg_pcopy_from_buffer(struct scatterlist *sgl,
list_entry((ptr)->prev, type, member)
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
/*
* Before this version the led classdev did not support groups
*/
#define LED_HAVE_GROUPS
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
/*
* At this time the internal API for the set brightness was changed to the async

View File

@ -172,7 +172,6 @@ static int __gb_lights_flash_brightness_set(struct gb_channel *channel)
}
#endif /* !LED_HAVE_FLASH */
#ifdef LED_HAVE_GROUPS
static int gb_lights_color_set(struct gb_channel *channel, u32 color);
static int gb_lights_fade_set(struct gb_channel *channel);
@ -378,13 +377,6 @@ static int gb_lights_color_set(struct gb_channel *channel, u32 color)
return ret;
}
#else /* LED_HAVE_GROUPS */
static int channel_attr_groups_set(struct gb_channel *channel,
struct led_classdev *cdev)
{
return 0;
}
#endif /* !LED_HAVE_GROUPS */
static int __gb_lights_led_brightness_set(struct gb_channel *channel)
{