diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-12-21 02:04:13 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-07-02 15:38:59 -0400 |
commit | 140fd977dc46bc750258f082cdf1cfea79dc1d14 (patch) | |
tree | 689eedb11b8b36a2bef6d08266074168a43f7281 /drivers/pwm | |
parent | 0134b932a02f272a3137e8331e38b69eff011587 (diff) |
pwm: tegra: Add device tree support
Add auxdata to instantiate the PWFM controller from a device tree,
include the corresponding nodes in the dtsi files for Tegra 20 and
Tegra 30 and add binding documentation.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-tegra.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c index 0950142d1913..472b74e8221a 100644 --- a/drivers/pwm/pwm-tegra.c +++ b/drivers/pwm/pwm-tegra.c | |||
@@ -239,9 +239,20 @@ static int __devexit tegra_pwm_remove(struct platform_device *pdev) | |||
239 | return 0; | 239 | return 0; |
240 | } | 240 | } |
241 | 241 | ||
242 | #ifdef CONFIG_OF | ||
243 | static struct of_device_id tegra_pwm_of_match[] = { | ||
244 | { .compatible = "nvidia,tegra20-pwm" }, | ||
245 | { .compatible = "nvidia,tegra30-pwm" }, | ||
246 | { } | ||
247 | }; | ||
248 | |||
249 | MODULE_DEVICE_TABLE(of, tegra_pwm_of_match); | ||
250 | #endif | ||
251 | |||
242 | static struct platform_driver tegra_pwm_driver = { | 252 | static struct platform_driver tegra_pwm_driver = { |
243 | .driver = { | 253 | .driver = { |
244 | .name = "tegra-pwm", | 254 | .name = "tegra-pwm", |
255 | .of_match_table = of_match_ptr(tegra_pwm_of_match), | ||
245 | }, | 256 | }, |
246 | .probe = tegra_pwm_probe, | 257 | .probe = tegra_pwm_probe, |
247 | .remove = __devexit_p(tegra_pwm_remove), | 258 | .remove = __devexit_p(tegra_pwm_remove), |