diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2012-09-12 07:58:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-12 14:20:38 -0400 |
commit | b4dbb258b67b12fff4c9df56983934e11813c404 (patch) | |
tree | 8757317ed1476f3a8ab08f551ae5ae0a359da52c | |
parent | d142d6be231713330f9c0d7ee52f23e1b3f19ee4 (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>
-rw-r--r-- | drivers/usb/chipidea/ci13xxx_imx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index 96ac67bbd2db..0f5ca4bea17f 100644 --- a/drivers/usb/chipidea/ci13xxx_imx.c +++ b/drivers/usb/chipidea/ci13xxx_imx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/usb/chipidea.h> | 20 | #include <linux/usb/chipidea.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
23 | #include <linux/pinctrl/consumer.h> | ||
23 | 24 | ||
24 | #include "ci.h" | 25 | #include "ci.h" |
25 | #include "ci13xxx_imx.h" | 26 | #include "ci13xxx_imx.h" |
@@ -99,6 +100,7 @@ static int __devinit ci13xxx_imx_probe(struct platform_device *pdev) | |||
99 | struct device_node *phy_np; | 100 | struct device_node *phy_np; |
100 | struct resource *res; | 101 | struct resource *res; |
101 | struct regulator *reg_vbus; | 102 | struct regulator *reg_vbus; |
103 | struct pinctrl *pinctrl; | ||
102 | int ret; | 104 | int ret; |
103 | 105 | ||
104 | if (of_find_property(pdev->dev.of_node, "fsl,usbmisc", NULL) | 106 | 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) | |||
117 | return -ENOENT; | 119 | return -ENOENT; |
118 | } | 120 | } |
119 | 121 | ||
122 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
123 | if (IS_ERR(pinctrl)) | ||
124 | dev_warn(&pdev->dev, "pinctrl get/select failed, err=%ld\n", | ||
125 | PTR_ERR(pinctrl)); | ||
126 | |||
120 | data->clk = devm_clk_get(&pdev->dev, NULL); | 127 | data->clk = devm_clk_get(&pdev->dev, NULL); |
121 | if (IS_ERR(data->clk)) { | 128 | if (IS_ERR(data->clk)) { |
122 | dev_err(&pdev->dev, | 129 | dev_err(&pdev->dev, |