All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "net/macb: add pinctrl consumer support"
@ 2014-09-22 23:49 Soren Brinkmann
  2014-09-24 15:28 ` Nicolas Ferre
  2014-09-26 19:49 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Soren Brinkmann @ 2014-09-22 23:49 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-kernel, netdev, Soren Brinkmann

This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
The driver core already calls pinctrl_get() and claims the default
state. There is no need to replicate this in the driver.
---
Hi,

I might be mistaken, but I think the driver core does already take care of
calling into the pinctrl framework and the driver does not need to do it on its
own (drivers/base/dd.c:really_probe() calls 'pinctrl_bind_pins() which takes
care of the pinctrl setup).

	Thanks,
	Sören

 drivers/net/ethernet/cadence/macb.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index ca5d7798b265..e1e02fba4fcc 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -30,7 +30,6 @@
 #include <linux/of_device.h>
 #include <linux/of_mdio.h>
 #include <linux/of_net.h>
-#include <linux/pinctrl/consumer.h>
 
 #include "macb.h"
 
@@ -2071,7 +2070,6 @@ static int __init macb_probe(struct platform_device *pdev)
 	struct phy_device *phydev;
 	u32 config;
 	int err = -ENXIO;
-	struct pinctrl *pinctrl;
 	const char *mac;
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -2080,15 +2078,6 @@ static int __init macb_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		err = PTR_ERR(pinctrl);
-		if (err == -EPROBE_DEFER)
-			goto err_out;
-
-		dev_warn(&pdev->dev, "No pinctrl provided\n");
-	}
-
 	err = -ENOMEM;
 	dev = alloc_etherdev(sizeof(*bp));
 	if (!dev)
-- 
2.1.0.1.g27b9230


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net/macb: add pinctrl consumer support"
  2014-09-22 23:49 [PATCH] Revert "net/macb: add pinctrl consumer support" Soren Brinkmann
@ 2014-09-24 15:28 ` Nicolas Ferre
  2014-09-26 19:49 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2014-09-24 15:28 UTC (permalink / raw)
  To: Soren Brinkmann, David Miller; +Cc: linux-kernel, netdev

On 23/09/2014 01:49, Soren Brinkmann :
> This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
> The driver core already calls pinctrl_get() and claims the default
> state. There is no need to replicate this in the driver.
> ---
> Hi,
> 
> I might be mistaken, but I think the driver core does already take care of
> calling into the pinctrl framework and the driver does not need to do it on its
> own (drivers/base/dd.c:really_probe() calls 'pinctrl_bind_pins() which takes
> care of the pinctrl setup).

True, thanks for your patch:

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>


>  drivers/net/ethernet/cadence/macb.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index ca5d7798b265..e1e02fba4fcc 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -30,7 +30,6 @@
>  #include <linux/of_device.h>
>  #include <linux/of_mdio.h>
>  #include <linux/of_net.h>
> -#include <linux/pinctrl/consumer.h>
>  
>  #include "macb.h"
>  
> @@ -2071,7 +2070,6 @@ static int __init macb_probe(struct platform_device *pdev)
>  	struct phy_device *phydev;
>  	u32 config;
>  	int err = -ENXIO;
> -	struct pinctrl *pinctrl;
>  	const char *mac;
>  
>  	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> @@ -2080,15 +2078,6 @@ static int __init macb_probe(struct platform_device *pdev)
>  		goto err_out;
>  	}
>  
> -	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> -	if (IS_ERR(pinctrl)) {
> -		err = PTR_ERR(pinctrl);
> -		if (err == -EPROBE_DEFER)
> -			goto err_out;
> -
> -		dev_warn(&pdev->dev, "No pinctrl provided\n");
> -	}
> -
>  	err = -ENOMEM;
>  	dev = alloc_etherdev(sizeof(*bp));
>  	if (!dev)
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net/macb: add pinctrl consumer support"
  2014-09-22 23:49 [PATCH] Revert "net/macb: add pinctrl consumer support" Soren Brinkmann
  2014-09-24 15:28 ` Nicolas Ferre
@ 2014-09-26 19:49 ` David Miller
  2014-09-26 20:06   ` Sören Brinkmann
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2014-09-26 19:49 UTC (permalink / raw)
  To: soren.brinkmann; +Cc: nicolas.ferre, linux-kernel, netdev

From: Soren Brinkmann <soren.brinkmann@xilinx.com>
Date: Mon, 22 Sep 2014 16:49:08 -0700

> This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
> The driver core already calls pinctrl_get() and claims the default
> state. There is no need to replicate this in the driver.
> ---
> Hi,
> 
> I might be mistaken, but I think the driver core does already take care of
> calling into the pinctrl framework and the driver does not need to do it on its
> own (drivers/base/dd.c:really_probe() calls 'pinctrl_bind_pins() which takes
> care of the pinctrl setup).
> 

Applied and queued up for -stable, thanks.

Next time please provide a proper "Signed-off-by: " in the commit message
of your submission.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "net/macb: add pinctrl consumer support"
  2014-09-26 19:49 ` David Miller
@ 2014-09-26 20:06   ` Sören Brinkmann
  0 siblings, 0 replies; 4+ messages in thread
From: Sören Brinkmann @ 2014-09-26 20:06 UTC (permalink / raw)
  To: David Miller; +Cc: nicolas.ferre, linux-kernel, netdev

On Fri, 2014-09-26 at 03:49PM -0400, David Miller wrote:
> From: Soren Brinkmann <soren.brinkmann@xilinx.com>
> Date: Mon, 22 Sep 2014 16:49:08 -0700
> 
> > This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
> > The driver core already calls pinctrl_get() and claims the default
> > state. There is no need to replicate this in the driver.
> > ---
> > Hi,
> > 
> > I might be mistaken, but I think the driver core does already take care of
> > calling into the pinctrl framework and the driver does not need to do it on its
> > own (drivers/base/dd.c:really_probe() calls 'pinctrl_bind_pins() which takes
> > care of the pinctrl setup).
> > 
> 
> Applied and queued up for -stable, thanks.

thx

> Next time please provide a proper "Signed-off-by: " in the commit message
> of your submission.

Yeah, sorry for that. I overlooked that one. My alias for commit takes
care of this, but I don't have that for revert.

In case you need it:
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>

	Sören

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-26 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 23:49 [PATCH] Revert "net/macb: add pinctrl consumer support" Soren Brinkmann
2014-09-24 15:28 ` Nicolas Ferre
2014-09-26 19:49 ` David Miller
2014-09-26 20:06   ` Sören Brinkmann

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.