Thread (31 messages) 31 messages, 4 authors, 2021-07-15

Re: [PATCH v2 18/18] auxdisplay: ht16k33: Add segment display LED support

From: Marek Behun <hidden>
Date: 2021-06-25 20:39:21
Also in: linux-leds, linux-mips, lkml

On Fri, 25 Jun 2021 14:59:02 +0200
Geert Uytterhoeven [off-list ref] wrote:
Instantiate a single LED for a segment display.  This allows the user to
control display brightness and blinking through the LED class API and
triggers, and exposes the display color.
The LED will be named "auxdisplay:<color>:backlight".
What if there are multiple "auxdisplay"s ?
Doesn't this subsystem have IDs? So that you can use auxdisplayN for
device name, for example?

+	of_property_read_u32(node, "color", &color);
+	seg->led.name = devm_kasprintf(dev, GFP_KERNEL,
+			"auxdisplay:%s:" LED_FUNCTION_BACKLIGHT,
+			color < LED_COLOR_ID_MAX ? led_colors[color] : "");
If you use devm_led_classdev_register_ext and pass struct
led_init_data, LED core will generate name of the LED itself.

Marek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help