summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2012-09-12 14:58:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-12 11:20:38 -0700
commitb4dbb258b67b12fff4c9df56983934e11813c404 (patch)
tree8757317ed1476f3a8ab08f551ae5ae0a359da52c /drivers/usb/chipidea
parentd142d6be231713330f9c0d7ee52f23e1b3f19ee4 (diff)
USB: chipidea: imx: add pinctrl support
Some controllers may not need to setup pinctrl, so we don't fail the probe if pinctrl get/select failed. Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Tested-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 96ac67bbd2d..0f5ca4bea17 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -20,6 +20,7 @@
#include <linux/usb/chipidea.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
+#include <linux/pinctrl/consumer.h>
#include "ci.h"
#include "ci13xxx_imx.h"
@@ -99,6 +100,7 @@ static int __devinit ci13xxx_imx_probe(struct platform_device *pdev)
struct device_node *phy_np;
struct resource *res;
struct regulator *reg_vbus;
+ struct pinctrl *pinctrl;
int ret;
if (of_find_property(pdev->dev.of_node, "fsl,usbmisc", NULL)
@@ -117,6 +119,11 @@ static int __devinit ci13xxx_imx_probe(struct platform_device *pdev)
return -ENOENT;
}
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl))
+ dev_warn(&pdev->dev, "pinctrl get/select failed, err=%ld\n",
+ PTR_ERR(pinctrl));
+
data->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(data->clk)) {
dev_err(&pdev->dev,