From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: devicetree-discuss@lists.ozlabs.org, ludovic.desroches@atmel.com,
nicolas.ferre@atmel.com, linux-arm-kernel@lists.infradead.org,
linux-can@vger.kernel.org
Subject: Re: [PATCH 2/3] can: at91_can: add pinctrl support
Date: Fri, 8 Mar 2013 19:46:48 +0100 [thread overview]
Message-ID: <20130308184648.GE4590@game.jcrosoft.org> (raw)
In-Reply-To: <513A21E4.6000801@pengutronix.de>
On 18:37 Fri 08 Mar , Marc Kleine-Budde wrote:
> On 03/08/2013 06:30 PM, ludovic.desroches@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.
yes this is useless
Best Regards,
J.
>
> 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 |
>
WARNING: multiple messages have this Message-ID (diff)
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] can: at91_can: add pinctrl support
Date: Fri, 8 Mar 2013 19:46:48 +0100 [thread overview]
Message-ID: <20130308184648.GE4590@game.jcrosoft.org> (raw)
In-Reply-To: <513A21E4.6000801@pengutronix.de>
On 18:37 Fri 08 Mar , Marc Kleine-Budde wrote:
> 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.
yes this is useless
Best Regards,
J.
>
> 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 prev parent reply other threads:[~2013-03-08 18:46 UTC|newest]
Thread overview: 31+ 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
2013-03-08 17:30 ` ludovic.desroches at atmel.com
2013-03-08 17:30 ` [PATCH 1/3] can: at91_can: add dt support ludovic.desroches
2013-03-08 17:30 ` ludovic.desroches at atmel.com
2013-03-08 17:44 ` Marc Kleine-Budde
2013-03-08 17:44 ` Marc Kleine-Budde
[not found] ` <513A2365.5050803-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-11 9:17 ` Ludovic Desroches
2013-03-11 9:17 ` Ludovic Desroches
2013-03-11 9:17 ` Ludovic Desroches
2013-03-11 15:12 ` Marc Kleine-Budde
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-11 15:59 ` Marc Kleine-Budde
[not found] ` <513DF46E.7000903-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-11 15:39 ` Ludovic Desroches
2013-03-11 15:39 ` Ludovic Desroches
2013-03-08 17:30 ` [PATCH 2/3] can: at91_can: add pinctrl support ludovic.desroches
2013-03-08 17:30 ` ludovic.desroches at atmel.com
2013-03-08 17:37 ` Marc Kleine-Budde
2013-03-08 17:37 ` Marc Kleine-Budde
2013-03-08 18:46 ` Jean-Christophe PLAGNIOL-VILLARD [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
2013-03-08 17:30 ` ludovic.desroches at atmel.com
2013-03-08 17:44 ` Marc Kleine-Budde
2013-03-08 17:44 ` Marc Kleine-Budde
2013-03-11 9:24 ` Ludovic Desroches
2013-03-11 9:57 ` Marc Kleine-Budde
2013-03-11 9:57 ` Marc Kleine-Budde
2013-03-11 9:24 ` Ludovic Desroches
[not found] ` <513A2396.4080508-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-11 9:24 ` Ludovic Desroches
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=20130308184648.GE4590@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=mkl@pengutronix.de \
--cc=nicolas.ferre@atmel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.