On Mon, Oct 1, 2012 at 6:52 PM, Richard Purdie <rpurdie@xxxxxxxxx> wrote: > On Mon, 2012-10-01 at 12:28 +0200, John Crispin wrote: >> Hi Richard, >> >> i am currently pondering some ideas for allowing to drive leds that have >> more than 1 pin / colour. >> >> my current idea is to make a leds-multi-gpio.c driver. this gets passed >> in the OF / platform a list of gpios and a mapping of brightness -> gpios. >> >> lets take a simple duo led for example : >> >> gpios = 1, 2; >> >> brightness 1 (green) = 1 >> brightness 2 (orange) = 2 >> brightness 3 (yellow = 1, 2 >> >> this way the actual led sub system would not need to be modfied. >> >> i initially tried to simply bundle 2 leds into one logic led in >> userland. however the latency of setting 2 leds from userland is too >> slow even when using c code. you can clearly see the transition from one >> state to another if the 2 pins don't get set within a very short >> timeframe from eachother. >> >> let me know what your thoughts are on this, i don't want to code stuff >> that later will be rejected ;) > > Its a tricky question and your approach doesn't sound too bad to me. > Brian Wu (cc'd) is now maintaining LEDs so you really need to talk to > him though. > Thanks for forwarding this email to me, Richard. John, I bascially like this idea, but can we just modify leds-gpio.c instead of creating a new file leds-multi-gpio.c? Also please Cc our subsystem mail list for further discussion. Thanks, -- Bryan Wu <bryan.wu@xxxxxxxxxxxxx> Kernel Developer +86.186-168-78255 Mobile Canonical Ltd. www.canonical.com Ubuntu - Linux for human beings | www.ubuntu.com -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html