aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/pwm.c')
-rw-r--r--arch/arm/plat-mxc/pwm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 2b8c0c3c0bb..6b78490c632 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -157,6 +157,9 @@ struct pwm_device *pwm_request(int pwm_id, const char *label)
if (pwm->pwm_id == pwm_id) {
found = 1;
break;
+ } else if ((int)pwm->pdev->dev.of_node == pwm_id) {
+ found = 1;
+ break;
}
}
@@ -274,9 +277,15 @@ static int __devexit mxc_pwm_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id mxc_pwm_dt_ids[] = {
+ { .compatible = "fsl,imx6q-pwm", },
+ { /* sentinel */ }
+};
+
static struct platform_driver mxc_pwm_driver = {
.driver = {
.name = "mxc_pwm",
+ .of_match_table = mxc_pwm_dt_ids,
},
.probe = mxc_pwm_probe,
.remove = __devexit_p(mxc_pwm_remove),