The patch titled Subject: drivers/leds/leds-lp5521.c: add 'name' in the lp5521_led_config has been added to the -mm tree. Its filename is leds-lp5521-add-name-in-the-lp5521_led_config.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Kim, Milo" <Milo.Kim@xxxxxx> Subject: drivers/leds/leds-lp5521.c: add 'name' in the lp5521_led_config The name of each led channel can be configurable. For the compatibility, the name is set to default value(xx:channelN) when 'name' is not defined. Signed-off-by: Milo(Woogyom) Kim <milo.kim@xxxxxx> Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Cc: Arun MURTHY <arun.murthy@xxxxxxxxxxxxxx> Cc: Srinidhi Kasagar <srinidhi.kasagar@xxxxxxxxxxxxxx> Cc: Richard Purdie <rpurdie@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/leds/leds-lp5521.txt | 6 ++++++ drivers/leds/leds-lp5521.c | 11 ++++++++--- include/linux/leds-lp5521.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff -puN Documentation/leds/leds-lp5521.txt~leds-lp5521-add-name-in-the-lp5521_led_config Documentation/leds/leds-lp5521.txt --- a/Documentation/leds/leds-lp5521.txt~leds-lp5521-add-name-in-the-lp5521_led_config +++ a/Documentation/leds/leds-lp5521.txt @@ -43,17 +43,23 @@ Format: 10x mA i.e 10 means 1.0 mA example platform data: Note: chan_nr can have values between 0 and 2. +The name of each channel can be configurable. +If the name field is not defined, the default name will be set to 'xxxx:channelN' +(XXXX : pdata->label or i2c client name, N : channel number) static struct lp5521_led_config lp5521_led_config[] = { { + .name = "red", .chan_nr = 0, .led_current = 50, .max_current = 130, }, { + .name = "green", .chan_nr = 1, .led_current = 0, .max_current = 130, }, { + .name = "blue", .chan_nr = 2, .led_current = 0, .max_current = 130, diff -puN drivers/leds/leds-lp5521.c~leds-lp5521-add-name-in-the-lp5521_led_config drivers/leds/leds-lp5521.c --- a/drivers/leds/leds-lp5521.c~leds-lp5521-add-name-in-the-lp5521_led_config +++ a/drivers/leds/leds-lp5521.c @@ -620,10 +620,15 @@ static int __devinit lp5521_init_led(str return -EINVAL; } - snprintf(name, sizeof(name), "%s:channel%d", - pdata->label ?: client->name, chan); led->cdev.brightness_set = lp5521_set_brightness; - led->cdev.name = name; + if (pdata->led_config[chan].name) { + led->cdev.name = pdata->led_config[chan].name; + } else { + snprintf(name, sizeof(name), "%s:channel%d", + pdata->label ?: client->name, chan); + led->cdev.name = name; + } + res = led_classdev_register(dev, &led->cdev); if (res < 0) { dev_err(dev, "couldn't register led on channel %d\n", chan); diff -puN include/linux/leds-lp5521.h~leds-lp5521-add-name-in-the-lp5521_led_config include/linux/leds-lp5521.h --- a/include/linux/leds-lp5521.h~leds-lp5521-add-name-in-the-lp5521_led_config +++ a/include/linux/leds-lp5521.h @@ -26,6 +26,7 @@ /* See Documentation/leds/leds-lp5521.txt */ struct lp5521_led_config { + char *name; u8 chan_nr; u8 led_current; /* mA x10, 0 if led is not connected */ u8 max_current; _ Subject: Subject: drivers/leds/leds-lp5521.c: add 'name' in the lp5521_led_config Patches currently in -mm which might be from Milo.Kim@xxxxxx are backlight-new-backlight-driver-for-lp855x-devices.patch leds-lp5521-add-name-in-the-lp5521_led_config.patch leds-lp5521-add-update_config-in-the-lp5521_platform_data.patch leds-lp5521-support-led-pattern-data.patch leds-lp5521-redefinition-of-register-bits.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html