162306a36Sopenharmony_ci-*- org -*-
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci* On/off LEDs should have max_brightness of 1
462306a36Sopenharmony_ci* Get rid of enum led_brightness
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciIt is really an integer, as maximum is configurable. Get rid of it, or
762306a36Sopenharmony_cimake it into typedef or something.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci* Review atomicity requirements in LED subsystem
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciCalls that may and that may not block are mixed in same structure, and
1262306a36Sopenharmony_cisemantics is sometimes non-intuitive. (For example blink callback may
1362306a36Sopenharmony_cinot sleep.) Review the requirements for any bugs and document them
1462306a36Sopenharmony_ciclearly.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci* LED names are still a mess
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciNo two LEDs have same name, so the names are probably unusable for the
1962306a36Sopenharmony_ciuserland. Nudge authors into creating common LED names for common
2062306a36Sopenharmony_cifunctionality.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci? Perhaps check for known LED names during boot, and warn if there are
2362306a36Sopenharmony_ciLEDs not on the list?
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci* Split drivers into subdirectories
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciThe number of drivers is getting big, and driver for on/off LED on a
2862306a36Sopenharmony_cii/o port is really quite different from camera flash LED, which is
2962306a36Sopenharmony_cireally different from driver for RGB color LED that can run its own
3062306a36Sopenharmony_cimicrocode. Split the drivers somehow.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci* Figure out what to do with RGB leds
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciMulticolor is a bit too abstract. Yes, we can have
3562306a36Sopenharmony_ciGreen-Magenta-Ultraviolet LED, but so far all the LEDs we support are
3662306a36Sopenharmony_ciRGB, and not even RGB-White or RGB-Yellow variants emerged.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciMulticolor is not a good fit for RGB LED. It does not really know
3962306a36Sopenharmony_ciabout LED color.  In particular, there's no way to make LED "white".
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ciUserspace is interested in knowing "this LED can produce arbitrary
4262306a36Sopenharmony_cicolor", which not all multicolor LEDs can.
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci	Proposal: let's add "rgb" to led_colors in drivers/leds/led-core.c,
4562306a36Sopenharmony_ci	add corresponding device tree defines, and use that, instead of
4662306a36Sopenharmony_ci	multicolor for RGB LEDs.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	We really need to do that now; "white" stuff can wait.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciRGB LEDs are quite common, and it would be good to be able to turn LED
5162306a36Sopenharmony_ciwhite and to turn it into any arbitrary color. It is essential that
5262306a36Sopenharmony_ciuserspace is able to set arbitrary colors, and it might be good to
5362306a36Sopenharmony_cihave that ability from kernel, too... to allow full-color triggers.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci* Command line utility to manipulate the LEDs?
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci/sys interface is not really suitable to use by hand, should we have
5862306a36Sopenharmony_cian utility to perform LED control?
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciIn particular, LED names are still a mess (see above) and utility
6162306a36Sopenharmony_cicould help there by presenting both old and new names while we clean
6262306a36Sopenharmony_cithem up.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ciIn future, I'd like utility to accept both old and new names while we
6562306a36Sopenharmony_ciclean them up.
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciIt would be also nice to have useful listing mode -- name, type,
6862306a36Sopenharmony_cicurrent brightness/trigger...
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciIn future, it would be good to be able to set rgb led to particular
7162306a36Sopenharmony_cicolor.
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ciAnd probably user-friendly interface to access LEDs for particular
7462306a36Sopenharmony_ciethernet interface would be nice.
7562306a36Sopenharmony_ci
76