18c2ecf20Sopenharmony_ci-*- org -*-
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci* On/off LEDs should have max_brightness of 1
48c2ecf20Sopenharmony_ci* Get rid of enum led_brightness
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciIt is really an integer, as maximum is configurable. Get rid of it, or
78c2ecf20Sopenharmony_cimake it into typedef or something.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci* Review atomicity requirements in LED subsystem
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciCalls that may and that may not block are mixed in same structure, and
128c2ecf20Sopenharmony_cisemantics is sometimes non-intuitive. (For example blink callback may
138c2ecf20Sopenharmony_cinot sleep.) Review the requirements for any bugs and document them
148c2ecf20Sopenharmony_ciclearly.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci* LED names are still a mess
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciNo two LEDs have same name, so the names are probably unusable for the
198c2ecf20Sopenharmony_ciuserland. Nudge authors into creating common LED names for common
208c2ecf20Sopenharmony_cifunctionality.
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci? Perhaps check for known LED names during boot, and warn if there are
238c2ecf20Sopenharmony_ciLEDs not on the list?
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci* Split drivers into subdirectories
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciThe number of drivers is getting big, and driver for on/off LED on a
288c2ecf20Sopenharmony_cii/o port is really quite different from camera flash LED, which is
298c2ecf20Sopenharmony_cireally different from driver for RGB color LED that can run its own
308c2ecf20Sopenharmony_cimicrocode. Split the drivers somehow.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci* Figure out what to do with RGB leds
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciMulticolor is a bit too abstract. Yes, we can have
358c2ecf20Sopenharmony_ciGreen-Magenta-Ultraviolet LED, but so far all the LEDs we support are
368c2ecf20Sopenharmony_ciRGB, and not even RGB-White or RGB-Yellow variants emerged.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciMulticolor is not a good fit for RGB LED. It does not really know
398c2ecf20Sopenharmony_ciabout LED color.  In particular, there's no way to make LED "white".
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciUserspace is interested in knowing "this LED can produce arbitrary
428c2ecf20Sopenharmony_cicolor", which not all multicolor LEDs can.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci	Proposal: let's add "rgb" to led_colors in drivers/leds/led-core.c,
458c2ecf20Sopenharmony_ci	add corresponding device tree defines, and use that, instead of
468c2ecf20Sopenharmony_ci	multicolor for RGB LEDs.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci	We really need to do that now; "white" stuff can wait.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciRGB LEDs are quite common, and it would be good to be able to turn LED
518c2ecf20Sopenharmony_ciwhite and to turn it into any arbitrary color. It is essential that
528c2ecf20Sopenharmony_ciuserspace is able to set arbitrary colors, and it might be good to
538c2ecf20Sopenharmony_cihave that ability from kernel, too... to allow full-color triggers.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci* Command line utility to manipulate the LEDs?
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci/sys interface is not really suitable to use by hand, should we have
588c2ecf20Sopenharmony_cian utility to perform LED control?
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ciIn particular, LED names are still a mess (see above) and utility
618c2ecf20Sopenharmony_cicould help there by presenting both old and new names while we clean
628c2ecf20Sopenharmony_cithem up.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciIn future, I'd like utility to accept both old and new names while we
658c2ecf20Sopenharmony_ciclean them up.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciIt would be also nice to have useful listing mode -- name, type,
688c2ecf20Sopenharmony_cicurrent brightness/trigger...
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ciIn future, it would be good to be able to set rgb led to particular
718c2ecf20Sopenharmony_cicolor.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciAnd probably user-friendly interface to access LEDs for particular
748c2ecf20Sopenharmony_ciethernet interface would be nice.
758c2ecf20Sopenharmony_ci
76