aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorPhilip, Avinash <avinashphilip@ti.com>2012-11-27 03:48:10 -0500
committerThierry Reding <thierry.reding@avionic-design.de>2012-11-28 09:16:16 -0500
commit3db9b76d7b6aa6eee1f9be83cf807e531e74bf4f (patch)
treebbb49540302d599b443c4749c4289a47d82c738c /drivers/pwm
parent333b08ee8c6e120d67118e4eb71c45f5c369c8a4 (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/pwm')
-rw-r--r--drivers/pwm/pwm-tiecap.c6
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) {