diff options
author | Philip, Avinash <avinashphilip@ti.com> | 2012-11-27 03:48:10 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-11-28 09:16:16 -0500 |
commit | 3db9b76d7b6aa6eee1f9be83cf807e531e74bf4f (patch) | |
tree | bbb49540302d599b443c4749c4289a47d82c738c /drivers | |
parent | 333b08ee8c6e120d67118e4eb71c45f5c369c8a4 (diff) |
pwm: pwm-tiecap: pinctrl support
Enable pinctrl for pwm-tiecap if pinctrl driver available, else
bail out with warning message.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pwm/pwm-tiecap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 0f541c5cbe98..b4f9d4756d58 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/pm_runtime.h> | 26 | #include <linux/pm_runtime.h> |
27 | #include <linux/pwm.h> | 27 | #include <linux/pwm.h> |
28 | #include <linux/of_device.h> | 28 | #include <linux/of_device.h> |
29 | #include <linux/pinctrl/consumer.h> | ||
29 | 30 | ||
30 | #include "pwm-tipwmss.h" | 31 | #include "pwm-tipwmss.h" |
31 | 32 | ||
@@ -200,6 +201,11 @@ static int __devinit ecap_pwm_probe(struct platform_device *pdev) | |||
200 | struct clk *clk; | 201 | struct clk *clk; |
201 | struct ecap_pwm_chip *pc; | 202 | struct ecap_pwm_chip *pc; |
202 | u16 status; | 203 | u16 status; |
204 | struct pinctrl *pinctrl; | ||
205 | |||
206 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
207 | if (IS_ERR(pinctrl)) | ||
208 | dev_warn(&pdev->dev, "unable to select pin group\n"); | ||
203 | 209 | ||
204 | pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); | 210 | pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); |
205 | if (!pc) { | 211 | if (!pc) { |