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