linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
Date: Mon, 02 Jul 2012 00:49:37 +0200	[thread overview]
Message-ID: <4FF0D401.4050101@pengutronix.de> (raw)
In-Reply-To: <1336352040-28447-4-git-send-email-shawn.guo@linaro.org>

On 05/07/2012 02:53 AM, Shawn Guo wrote:
> Cc: linux-can at vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/net/can/flexcan.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 1efb083..38c0690 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -35,6 +35,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> +#include <linux/pinctrl/consumer.h>
>  
>  #define DRV_NAME			"flexcan"
>  
> @@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
>  	struct flexcan_priv *priv;
>  	struct resource *mem;
>  	struct clk *clk = NULL;
> +	struct pinctrl *pinctrl;
>  	void __iomem *base;
>  	resource_size_t mem_size;
>  	int err, irq;
>  	u32 clock_freq = 0;
>  
> +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> +	if (IS_ERR(pinctrl))
> +		return PTR_ERR(pinctrl);
> +
>  	if (pdev->dev.of_node) {
>  		const u32 *clock_freq_p;

I'm on mx28 and trying to load the flexcan driver via DT, but
devm_pinctrl_get_select_default fails with -19.

What am I doing wrong? Will this fail with the same error on non DT
platforms?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120702/bf197aab/attachment.sig>

  parent reply	other threads:[~2012-07-01 22:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  0:53 [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers Shawn Guo
2012-05-07  0:53 ` [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support Shawn Guo
2012-05-08  3:43   ` Dong Aisheng
2012-05-07  0:53 ` [PATCH RESEND 2/5] net: fec: " Shawn Guo
2012-05-08  3:44   ` Dong Aisheng
2012-05-11 22:31   ` David Miller
2012-05-07  0:53 ` [PATCH RESEND 3/5] can: flexcan: " Shawn Guo
2012-05-07  8:06   ` Marc Kleine-Budde
2012-05-07  8:17     ` Shawn Guo
2012-05-07  8:29       ` Marc Kleine-Budde
2012-05-08  3:44   ` Dong Aisheng
2012-07-01 22:49   ` Marc Kleine-Budde [this message]
2012-07-02  1:52     ` Shawn Guo
2012-07-03 10:00       ` Marc Kleine-Budde
2012-05-07  0:53 ` [PATCH RESEND 4/5] i2c: imx: " Shawn Guo
2012-05-08  3:45   ` Dong Aisheng
2012-05-07  0:54 ` [PATCH RESEND 5/5] spi/imx: " Shawn Guo
2012-05-08  3:45   ` Dong Aisheng
2012-05-20  4:40     ` Grant Likely
2012-05-20  5:19       ` Shawn Guo
2012-05-07  6:50 ` [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers Dong Aisheng
2012-05-07  7:34   ` Shawn Guo
2012-05-07  7:53     ` Dong Aisheng

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=4FF0D401.4050101@pengutronix.de \
    --to=mkl@pengutronix.de \
    --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).