From d98d033c15b77d51ed723ba10c49fa13233e59c1 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 6 May 2012 22:59:45 +0800 Subject: [PATCH] i2c: mxs: adopt pinctrl support Cc: linux-i2c@vger.kernel.org Cc: Wolfram Sang Signed-off-by: Shawn Guo --- drivers/i2c/busses/i2c-mxs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 3d471d56bf15..7c7711dc19d1 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -323,10 +324,15 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct mxs_i2c_dev *i2c; struct i2c_adapter *adap; + struct pinctrl *pinctrl; struct resource *res; resource_size_t res_size; int err, irq; + pinctrl = devm_pinctrl_get_select_default(dev); + if (IS_ERR(pinctrl)) + return PTR_ERR(pinctrl); + i2c = devm_kzalloc(dev, sizeof(struct mxs_i2c_dev), GFP_KERNEL); if (!i2c) return -ENOMEM; -- 2.39.5