xref: /openbmc/linux/drivers/leds/TODO (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1*364682d1SPavel Machek-*- org -*-
2*364682d1SPavel Machek
3*364682d1SPavel Machek* On/off LEDs should have max_brightness of 1
4*364682d1SPavel Machek* Get rid of enum led_brightness
5*364682d1SPavel Machek
6*364682d1SPavel MachekIt is really an integer, as maximum is configurable. Get rid of it, or
7*364682d1SPavel Machekmake it into typedef or something.
8*364682d1SPavel Machek
9*364682d1SPavel Machek* Review atomicity requirements in LED subsystem
10*364682d1SPavel Machek
11*364682d1SPavel MachekCalls that may and that may not block are mixed in same structure, and
12*364682d1SPavel Macheksemantics is sometimes non-intuitive. (For example blink callback may
13*364682d1SPavel Macheknot sleep.) Review the requirements for any bugs and document them
14*364682d1SPavel Machekclearly.
15*364682d1SPavel Machek
16*364682d1SPavel Machek* LED names are still a mess
17*364682d1SPavel Machek
18*364682d1SPavel MachekNo two LEDs have same name, so the names are probably unusable for the
19*364682d1SPavel Machekuserland. Nudge authors into creating common LED names for common
20*364682d1SPavel Machekfunctionality.
21*364682d1SPavel Machek
22*364682d1SPavel Machek? Perhaps check for known LED names during boot, and warn if there are
23*364682d1SPavel MachekLEDs not on the list?
24*364682d1SPavel Machek
25*364682d1SPavel Machek* Split drivers into subdirectories
26*364682d1SPavel Machek
27*364682d1SPavel MachekThe number of drivers is getting big, and driver for on/off LED on a
28*364682d1SPavel Macheki/o port is really quite different from camera flash LED, which is
29*364682d1SPavel Machekreally different from driver for RGB color LED that can run its own
30*364682d1SPavel Machekmicrocode. Split the drivers somehow.
31*364682d1SPavel Machek
32*364682d1SPavel Machek* Figure out what to do with RGB leds
33*364682d1SPavel Machek
34*364682d1SPavel MachekMulticolor is a bit too abstract. Yes, we can have
35*364682d1SPavel MachekGreen-Magenta-Ultraviolet LED, but so far all the LEDs we support are
36*364682d1SPavel MachekRGB, and not even RGB-White or RGB-Yellow variants emerged.
37*364682d1SPavel Machek
38*364682d1SPavel MachekMulticolor is not a good fit for RGB LED. It does not really know
39*364682d1SPavel Machekabout LED color.  In particular, there's no way to make LED "white".
40*364682d1SPavel Machek
41*364682d1SPavel MachekUserspace is interested in knowing "this LED can produce arbitrary
42*364682d1SPavel Machekcolor", which not all multicolor LEDs can.
43*364682d1SPavel Machek
44*364682d1SPavel Machek	Proposal: let's add "rgb" to led_colors in drivers/leds/led-core.c,
45*364682d1SPavel Machek	add corresponding device tree defines, and use that, instead of
46*364682d1SPavel Machek	multicolor for RGB LEDs.
47*364682d1SPavel Machek
48*364682d1SPavel Machek	We really need to do that now; "white" stuff can wait.
49*364682d1SPavel Machek
50*364682d1SPavel MachekRGB LEDs are quite common, and it would be good to be able to turn LED
51*364682d1SPavel Machekwhite and to turn it into any arbitrary color. It is essential that
52*364682d1SPavel Machekuserspace is able to set arbitrary colors, and it might be good to
53*364682d1SPavel Machekhave that ability from kernel, too... to allow full-color triggers.
54*364682d1SPavel Machek
55*364682d1SPavel Machek* Command line utility to manipulate the LEDs?
56*364682d1SPavel Machek
57*364682d1SPavel Machek/sys interface is not really suitable to use by hand, should we have
58*364682d1SPavel Machekan utility to perform LED control?
59*364682d1SPavel Machek
60*364682d1SPavel MachekIn particular, LED names are still a mess (see above) and utility
61*364682d1SPavel Machekcould help there by presenting both old and new names while we clean
62*364682d1SPavel Machekthem up.
63*364682d1SPavel Machek
64*364682d1SPavel MachekIn future, I'd like utility to accept both old and new names while we
65*364682d1SPavel Machekclean them up.
66*364682d1SPavel Machek
67*364682d1SPavel MachekIt would be also nice to have useful listing mode -- name, type,
68*364682d1SPavel Machekcurrent brightness/trigger...
69*364682d1SPavel Machek
70*364682d1SPavel MachekIn future, it would be good to be able to set rgb led to particular
71*364682d1SPavel Machekcolor.
72*364682d1SPavel Machek
73*364682d1SPavel MachekAnd probably user-friendly interface to access LEDs for particular
74*364682d1SPavel Machekethernet interface would be nice.
75*364682d1SPavel Machek
76