summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-tegra.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2011-12-21 11:04:13 +0400
committerThierry Reding <thierry.reding@avionic-design.de>2012-07-02 23:38:59 +0400
commit140fd977dc46bc750258f082cdf1cfea79dc1d14 (patch)
tree689eedb11b8b36a2bef6d08266074168a43f7281 /drivers/pwm/pwm-tegra.c
parent0134b932a02f272a3137e8331e38b69eff011587 (diff)
downloadlinux-140fd977dc46bc750258f082cdf1cfea79dc1d14.tar.xz
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/pwm-tegra.c')
-rw-r--r--drivers/pwm/pwm-tegra.c11
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)
return 0;
}
+#ifdef CONFIG_OF
+static struct of_device_id tegra_pwm_of_match[] = {
+ { .compatible = "nvidia,tegra20-pwm" },
+ { .compatible = "nvidia,tegra30-pwm" },
+ { }
+};
+
+MODULE_DEVICE_TABLE(of, tegra_pwm_of_match);
+#endif
+
static struct platform_driver tegra_pwm_driver = {
.driver = {
.name = "tegra-pwm",
+ .of_match_table = of_match_ptr(tegra_pwm_of_match),
},
.probe = tegra_pwm_probe,
.remove = __devexit_p(tegra_pwm_remove),