提交 3db9b76d 编写于 作者: P Philip, Avinash 提交者: Thierry Reding

pwm: pwm-tiecap: pinctrl support

Enable pinctrl for pwm-tiecap if pinctrl driver available, else
bail out with warning message.
Signed-off-by: NPhilip, Avinash <avinashphilip@ti.com>
Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
上级 333b08ee
......@@ -26,6 +26,7 @@
#include <linux/pm_runtime.h>
#include <linux/pwm.h>
#include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
#include "pwm-tipwmss.h"
......@@ -200,6 +201,11 @@ static int __devinit ecap_pwm_probe(struct platform_device *pdev)
struct clk *clk;
struct ecap_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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册