mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 14:52:05 +00:00
b52fa7bc5d
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>
31 lines
823 B
Plaintext
31 lines
823 B
Plaintext
Marvell PWM controller
|
|
|
|
Required properties:
|
|
- compatible: should be one or more of:
|
|
- "marvell,pxa250-pwm"
|
|
- "marvell,pxa270-pwm"
|
|
- "marvell,pxa168-pwm"
|
|
- "marvell,pxa910-pwm"
|
|
- reg: Physical base address and length of the registers used by the PWM channel
|
|
Note that one device instance must be created for each PWM that is used, so the
|
|
length covers only the register window for one PWM output, not that of the
|
|
entire PWM controller. Currently length is 0x10 for all supported devices.
|
|
- #pwm-cells: Should be 1. This cell is used to specify the period in
|
|
nanoseconds.
|
|
|
|
Example PWM device node:
|
|
|
|
pwm0: pwm@40b00000 {
|
|
compatible = "marvell,pxa250-pwm";
|
|
reg = <0x40b00000 0x10>;
|
|
#pwm-cells = <1>;
|
|
};
|
|
|
|
Example PWM client node:
|
|
|
|
backlight {
|
|
compatible = "pwm-backlight";
|
|
pwms = <&pwm0 5000000>;
|
|
...
|
|
}
|