diff options
| author | Philip, Avinash <avinashphilip@ti.com> | 2012-11-27 03:48:13 -0500 |
|---|---|---|
| committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-11-28 09:16:17 -0500 |
| commit | 53ad9e8d37031397ee141f9bf701c0fba4257b0f (patch) | |
| tree | 41dda85d04ca64360a42874e6ea62a0299942de5 /Documentation/devicetree/bindings/pwm | |
| parent | d91861dafda44d808272f55758ca91d962feda6e (diff) | |
pwm: tiehrpwm: Add device-tree binding
This patch
1. Add support for device-tree binding for EHRWPM driver.
2. Set size of pwm-cells set to 3 to support PWM channel number, PWM
period & polarity configuration from device tree.
3. Add enable/disable clock gating in PWM subsystem common config space.
4. When here set .owner member in platform_driver structure to
THIS_MODULE.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'Documentation/devicetree/bindings/pwm')
| -rw-r--r-- | Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt new file mode 100644 index 000000000000..4fc7079d822e --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | TI SOC EHRPWM based PWM controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Must be "ti,am33xx-ehrpwm" | ||
| 5 | - #pwm-cells: Should be 3. Number of cells being used to specify PWM property. | ||
| 6 | First cell specifies the per-chip index of the PWM to use, the second | ||
| 7 | cell is the period in nanoseconds and bit 0 in the third cell is used to | ||
| 8 | encode the polarity of PWM output. Set bit 0 of the third in PWM specifier | ||
| 9 | to 1 for inverse polarity & set to 0 for normal polarity. | ||
| 10 | - reg: physical base address and size of the registers map. | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | - ti,hwmods: Name of the hwmod associated to the EHRPWM: | ||
| 14 | "ehrpwm<x>", <x> being the 0-based instance number from the HW spec | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | ehrpwm0: ehrpwm@0 { | ||
| 19 | compatible = "ti,am33xx-ehrpwm"; | ||
| 20 | #pwm-cells = <3>; | ||
| 21 | reg = <0x48300200 0x100>; | ||
| 22 | ti,hwmods = "ehrpwm0"; | ||
| 23 | }; | ||
