diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-12 05:32:09 (GMT) |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-12 05:32:09 (GMT) |
commit | 844d0b5a0b42d6c73114a1dc229db751120d226f (patch) | |
tree | faf9f83e78ae24f6730d64999a89c35144da3b8a /drivers/spi | |
parent | 50260924afd4b745bfb6e5f1caee381a1875fc31 (diff) | |
parent | a0f5e3631b07cabf624e7d818df76d47d9d21017 (diff) | |
download | linux-844d0b5a0b42d6c73114a1dc229db751120d226f.tar.xz |
Merge branches 'clk/mxs' and 'imx/pinctrl/for-3.5' into mxs/dt/for-3.5
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-imx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 570f220..69c9a66 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -37,6 +37,7 @@ #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_gpio.h> +#include <linux/pinctrl/consumer.h> #include <mach/spi.h> @@ -758,6 +759,7 @@ static int __devinit spi_imx_probe(struct platform_device *pdev) struct spi_master *master; struct spi_imx_data *spi_imx; struct resource *res; + struct pinctrl *pinctrl; int i, ret, num_cs; if (!np && !mxc_platform_info) { @@ -845,6 +847,12 @@ static int __devinit spi_imx_probe(struct platform_device *pdev) goto out_iounmap; } + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) { + ret = PTR_ERR(pinctrl); + goto out_free_irq; + } + spi_imx->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(spi_imx->clk)) { dev_err(&pdev->dev, "unable to get clock\n"); |