]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pwm: pxa: Add device tree support
authorMike Dunn <mikedunn@newsguy.com>
Sat, 21 Sep 2013 19:19:33 +0000 (12:19 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 4 Dec 2013 09:18:52 +0000 (10:18 +0100)
commitb52fa7bc5dc9697fb5983727d276dd565d85a8d0
tree834180da5e34ac663df68a57a64e5608fc004e6b
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae
pwm: pxa: Add device tree support

This patch adds device tree support to the PXA's PWM driver.  Nothing
needs to be extracted from the device tree node by the PWM device.
Client devices need only specify the period; the per-chip index is
implicitly zero because one device node must be present for each PWM
output in use.  This approach is more convenient due to the wide
variability in the number of PWM channels present across the various PXA
variants, and is made possible by the fact that the register sets for
each PWM channel are segregated from each other.  An of_xlate() method
is added to parse this single-cell node.  The existing ID table is
reused for the match table data.

Tested on a Palm Treo 680 (both platform data and DT cases).

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Documentation/devicetree/bindings/pwm/pxa-pwm.txt [new file with mode: 0644]
drivers/pwm/pwm-pxa.c