From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] can: at91_can: add pinctrl support
Date: Fri, 08 Mar 2013 18:37:40 +0100 [thread overview]
Message-ID: <513A21E4.6000801@pengutronix.de> (raw)
In-Reply-To: <1362763842-14924-3-git-send-email-ludovic.desroches@atmel.com>
On 03/08/2013 06:30 PM, ludovic.desroches at atmel.com wrote:
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
> drivers/net/can/at91_can.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
> index c7f70d4..56fb2aa 100644
> --- a/drivers/net/can/at91_can.c
> +++ b/drivers/net/can/at91_can.c
> @@ -28,6 +28,7 @@
> #include <linux/module.h>
> #include <linux/netdevice.h>
> #include <linux/of.h>
> +#include <linux/pinctrl/consumer.h>
> #include <linux/platform_device.h>
> #include <linux/rtnetlink.h>
> #include <linux/skbuff.h>
> @@ -1292,6 +1293,7 @@ static int at91_can_probe(struct platform_device *pdev)
> struct clk *clk;
> void __iomem *addr;
> int err, irq;
> + struct pinctrl *pinctrl;
>
> devtype_data = at91_can_get_driver_data(pdev);
> if (!devtype_data) {
> @@ -1314,6 +1316,13 @@ static int at91_can_probe(struct platform_device *pdev)
> goto exit_put;
> }
>
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
Is this still needed? I think the pinctrl framework automatically
enables the default pinctrl for a device if available.
Marc
> + if (IS_ERR(pinctrl)) {
> + dev_err(&pdev->dev, "Failed to request pinctrl\n");
> + err = PTR_ERR(pinctrl);
> + goto exit_put;
> + }
> +
> if (!request_mem_region(res->start,
> resource_size(res),
> pdev->name)) {
>
--
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: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130308/43b96b2f/attachment.sig>
next prev parent reply other threads:[~2013-03-08 17:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 17:30 [PATCH 0/3] dt and pinctrl support for at91_can ludovic.desroches at atmel.com
2013-03-08 17:30 ` [PATCH 1/3] can: at91_can: add dt support ludovic.desroches at atmel.com
2013-03-08 17:44 ` Marc Kleine-Budde
2013-03-11 9:17 ` Ludovic Desroches
2013-03-11 15:12 ` Marc Kleine-Budde
2013-03-11 15:39 ` Ludovic Desroches
2013-03-11 15:59 ` Marc Kleine-Budde
2013-03-08 17:30 ` [PATCH 2/3] can: at91_can: add pinctrl support ludovic.desroches at atmel.com
2013-03-08 17:37 ` Marc Kleine-Budde [this message]
2013-03-08 18:46 ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-08 17:30 ` [PATCH 3/3] can: Kconfig: CAN_AT91 depends on ARCH_AT91 ludovic.desroches at atmel.com
2013-03-08 17:44 ` Marc Kleine-Budde
2013-03-11 9:24 ` Ludovic Desroches
2013-03-11 9:57 ` Marc Kleine-Budde
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=513A21E4.6000801@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).