On Thu, Sep 02, 2010 at 05:34:56PM +0400, Sergei Poselenov wrote: [...] > > > + tristate "Motionpro LEDs Support" > > > + depends on LEDS_CLASS > > > + help > > > + This option enables support for status and ready LEDs > > > connected > > > + to GPIO lines on Motionpro board. > > > > Why not expose these GPIOs via GPIOLIB[1] and use generic GPIO > > LEDs[2] driver, along with the timer LED trigger[3] for blinking? > > > > Thanks, > > > > [1] Documentation/gpio.txt > > Documentation/powerpc/dts-bindings/gpio/gpio.txt > > [2] drivers/leds/leds-gpio.c > > Documentation/powerpc/dts-bindings/gpio/led.txt > > [3] drivers/leds/ledtrig-timer.c > > > > Yes, this seem possible to implement (and thanks for pointing into > this), however, the driver is already exists (actually, since 2007), > so why to not add it to save efforts?
- Faking PWM in the LEDs driver is just wrong thing to do. I don't see any other drivers doing this, and even if they were, they would need to be fixed; - This duplicates timer trigger functionality; - By writing (if there isn't any already) a generic GPIOLIB driver for the GPIO controller that you have, you could use these GPIOs not only for LEDs, but also for SPI, MDIO, I2C, MMC, and even raw NAND chips. I.e., by choosing the right methodology you save much more efforts in the long run. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev