aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip, Avinash <avinashphilip@ti.com>2012-11-27 03:48:14 -0500
committerThierry Reding <thierry.reding@avionic-design.de>2012-11-28 09:16:18 -0500
commit98ccf49daf3bd626196814e38ec8d2460e0d4517 (patch)
treed33a3ff4606a528610d6c6a4f877b7fa64b6ac77
parent53ad9e8d37031397ee141f9bf701c0fba4257b0f (diff)
pwm: pwm-tiehrpwm: pinctrl support
Enable pinctrl for pwm-tiehrpwm 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>
-rw-r--r--drivers/pwm/pwm-tiehrpwm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index ee7a8b3dbed9..542d5f38ccf6 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -26,6 +26,7 @@
26#include <linux/clk.h> 26#include <linux/clk.h>
27#include <linux/pm_runtime.h> 27#include <linux/pm_runtime.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
@@ -415,6 +416,11 @@ static int __devinit ehrpwm_pwm_probe(struct platform_device *pdev)
415 struct clk *clk; 416 struct clk *clk;
416 struct ehrpwm_pwm_chip *pc; 417 struct ehrpwm_pwm_chip *pc;
417 u16 status; 418 u16 status;
419 struct pinctrl *pinctrl;
420
421 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
422 if (IS_ERR(pinctrl))
423 dev_warn(&pdev->dev, "unable to select pin group\n");
418 424
419 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); 425 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
420 if (!pc) { 426 if (!pc) {