summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-imx.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-05-14 17:30:52 +0400
committerArnd Bergmann <arnd@arndb.de>2012-05-14 17:30:52 +0400
commit4f5a9fd341e8ffd825ecf56155df6fe6c3d732b1 (patch)
treeac23c7b80154a476db3882d92f079c50c919e2fa /drivers/spi/spi-imx.c
parentc818f97bc3266f0fbf619f2348d951272f8ac335 (diff)
parenta0f5e3631b07cabf624e7d818df76d47d9d21017 (diff)
downloadlinux-4f5a9fd341e8ffd825ecf56155df6fe6c3d732b1.tar.xz
Merge branch 'imx/pinctrl' into imx/clock
Conflicts: drivers/mmc/host/sdhci-esdhc-imx.c drivers/net/ethernet/freescale/fec.c drivers/spi/spi-imx.c drivers/tty/serial/imx.c This resolves dependencies between the pinctrl and clock changes in imx. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/spi/spi-imx.c')
-rw-r--r--drivers/spi/spi-imx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 4b6688630b9c..47877d687614 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>
@@ -759,6 +760,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) {
@@ -846,6 +848,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_ipg = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(spi_imx->clk_ipg)) {
ret = PTR_ERR(spi_imx->clk_ipg);