linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/9] i2c: mxs: adopt pinctrl support
Date: Sun,  6 May 2012 23:35:02 +0800	[thread overview]
Message-ID: <1336318505-27043-7-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1336318505-27043-1-git-send-email-shawn.guo@linaro.org>

Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/i2c/busses/i2c-mxs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 3d471d5..7c7711d 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -26,6 +26,7 @@
 #include <linux/platform_device.h>
 #include <linux/jiffies.h>
 #include <linux/io.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/common.h>
 
@@ -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;
-- 
1.7.5.4

  parent reply	other threads:[~2012-05-06 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
2012-05-06 15:34 ` [PATCH 1/9] ARM: mxs: enable pinctrl dummy states Shawn Guo
2012-05-06 15:34 ` [PATCH 2/9] serial: amba-pl011: adopt pinctrl support Shawn Guo
2012-05-06 15:41   ` Russell King - ARM Linux
2012-05-21 18:53   ` Linus Walleij
2012-05-06 15:34 ` [PATCH 3/9] serial: mxs-auart: " Shawn Guo
2012-05-06 15:35 ` [PATCH 4/9] mmc: mxs-mmc: " Shawn Guo
2012-05-06 16:09   ` Chris Ball
2012-05-07  1:08     ` Shawn Guo
2012-05-06 15:35 ` [PATCH 5/9] mtd: nand: gpmi: " Shawn Guo
2012-05-06 15:35 ` Shawn Guo [this message]
2012-05-06 15:35 ` [PATCH 7/9] ASoC: mxs-saif: " Shawn Guo
2012-05-06 15:35 ` [PATCH 8/9] video: mxsfb: " Shawn Guo
2012-05-06 15:35 ` [PATCH 9/9] ARM: mxs: enable " Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336318505-27043-7-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).