aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilip, Avinash2012-11-27 14:18:14 +0530
committerThierry Reding2012-11-28 15:16:18 +0100
commit98ccf49daf3bd626196814e38ec8d2460e0d4517 (patch)
treed33a3ff4606a528610d6c6a4f877b7fa64b6ac77 /drivers
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>
Diffstat (limited to 'drivers')
-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 @@
#include <linux/clk.h>
#include <linux/pm_runtime.h>
#include <linux/of_device.h>
+#include <linux/pinctrl/consumer.h>
#include "pwm-tipwmss.h"
@@ -415,6 +416,11 @@ static int __devinit ehrpwm_pwm_probe(struct platform_device *pdev)
struct clk *clk;
struct ehrpwm_pwm_chip *pc;
u16 status;
+ struct pinctrl *pinctrl;
+
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl))
+ dev_warn(&pdev->dev, "unable to select pin group\n");
pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
if (!pc) {