mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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>
This commit is contained in:
parent
57fa2de1e5
commit
811b1f5861
2 changed files with 0 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue