diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-imx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index dfb84b7ee550..56bce9a8bcbb 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/of.h> | 51 | #include <linux/of.h> |
52 | #include <linux/of_device.h> | 52 | #include <linux/of_device.h> |
53 | #include <linux/of_i2c.h> | 53 | #include <linux/of_i2c.h> |
54 | #include <linux/pinctrl/consumer.h> | ||
54 | 55 | ||
55 | #include <mach/irqs.h> | 56 | #include <mach/irqs.h> |
56 | #include <mach/hardware.h> | 57 | #include <mach/hardware.h> |
@@ -470,6 +471,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev) | |||
470 | struct imx_i2c_struct *i2c_imx; | 471 | struct imx_i2c_struct *i2c_imx; |
471 | struct resource *res; | 472 | struct resource *res; |
472 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; | 473 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; |
474 | struct pinctrl *pinctrl; | ||
473 | void __iomem *base; | 475 | void __iomem *base; |
474 | resource_size_t res_size; | 476 | resource_size_t res_size; |
475 | int irq, bitrate; | 477 | int irq, bitrate; |
@@ -520,6 +522,12 @@ static int __init i2c_imx_probe(struct platform_device *pdev) | |||
520 | i2c_imx->base = base; | 522 | i2c_imx->base = base; |
521 | i2c_imx->res = res; | 523 | i2c_imx->res = res; |
522 | 524 | ||
525 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
526 | if (IS_ERR(pinctrl)) { | ||
527 | ret = PTR_ERR(pinctrl); | ||
528 | goto fail3; | ||
529 | } | ||
530 | |||
523 | /* Get I2C clock */ | 531 | /* Get I2C clock */ |
524 | i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk"); | 532 | i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk"); |
525 | if (IS_ERR(i2c_imx->clk)) { | 533 | if (IS_ERR(i2c_imx->clk)) { |