PWM and backlight devices

Thierry Reding thierry.reding at avionic-design.de
Wed Dec 7 02:07:49 EST 2011


Hi,

I'm working on adding support for a device which is booted from a device tree
only. Currently this gets me to a login prompt on a serial console and the
device is basically functional. However, the device also has a display with a
backlight that is controlled via a PWM (supplied by the SoC). If this was a
regular board it would be simple to implement this via the pwm-backlight
driver.

Unfortunately, the pwm-backlight driver doesn't have device tree support yet
and I'm not sure how to best implement it. As far as I can see, I would first
need to have some way of representing a PWM device in the DT that I could
reference in the pwm-backlight device node and I would need to add actual DT
support to pwm-backlight. Implementing support for the data passed in the
platform data should be rather straightforward, but I don't see how the
callback functions could be represented in the DT.

For some setups it would probably be enough to just specify the used PWM, but
other boards fiddle with some GPIOs in the callbacks and I guess that could
be represented by adding a "gpios" property with a list of pins that need to
be toggled for example when the backlight power is enabled/disabled.

Has anyone done something similar yet? Am I even on the right track here?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20111206/7fe3b321/attachment.pgp>


More information about the devicetree-discuss mailing list