From: Shawn Guo Date: Tue, 26 Jun 2012 08:58:11 +0000 (+0800) Subject: pwm: pwm-mxs: add pinctrl support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1112fe88d4ebbb5f46750726b87fb0beb1396835;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git pwm: pwm-mxs: add pinctrl support Call pinctrl subsystem to set up pwm pin. Signed-off-by: Shawn Guo Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index 3b7f3ab116e3..269d7c2a87d6 100644 --- a/drivers/pwm/pwm-mxs.c +++ b/drivers/pwm/pwm-mxs.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -130,6 +131,7 @@ static int mxs_pwm_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct mxs_pwm_chip *mxs; struct resource *res; + struct pinctrl *pinctrl; int ret; mxs = devm_kzalloc(&pdev->dev, sizeof(*mxs), GFP_KERNEL); @@ -141,6 +143,10 @@ static int mxs_pwm_probe(struct platform_device *pdev) if (!mxs->base) return -EADDRNOTAVAIL; + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + return PTR_ERR(pinctrl); + mxs->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(mxs->clk)) return PTR_ERR(mxs->clk);