devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: PWM and backlight devices
Date: Tue, 6 Dec 2011 16:07:49 +0100	[thread overview]
Message-ID: <20111206150749.GA13761@avionic-0098.adnet.avionic-design.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1282 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

             reply	other threads:[~2011-12-06 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 15:07 Thierry Reding [this message]
     [not found] ` <20111206150749.GA13761-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2011-12-06 18:20   ` PWM and backlight devices Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111206150749.GA13761@avionic-0098.adnet.avionic-design.de \
    --to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).