From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] spi/imx: adopt pinctrl API
Date: Sun, 6 May 2012 20:58:14 +0800 [thread overview]
Message-ID: <1336309094-18517-6-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1336309094-18517-1-git-send-email-shawn.guo@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
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");
--
1.7.5.4
next prev parent reply other threads:[~2012-05-06 12:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 12:58 [PATCH 0/5] Adopt pinctrl API for a few outstanding imx drivers Shawn Guo
2012-05-06 12:58 ` [PATCH 1/5] tty: serial: imx: adopt pinctrl API Shawn Guo
2012-05-06 13:47 ` Shawn Guo
2012-05-06 12:58 ` [PATCH 2/5] net: fec: " Shawn Guo
2012-05-06 16:46 ` David Miller
2012-05-07 0:41 ` Shawn Guo
2012-05-06 17:26 ` Steven King
2012-05-07 0:46 ` Shawn Guo
2012-05-06 12:58 ` [PATCH 3/5] can: flexcan: " Shawn Guo
2012-05-06 12:58 ` [PATCH 4/5] i2c: imx: " Shawn Guo
2012-05-06 12:58 ` Shawn Guo [this message]
2012-05-06 13:45 ` [PATCH 0/5] Adopt pinctrl API for a few outstanding imx drivers 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=1336309094-18517-6-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).