public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel•com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>,
	Andrew Lunn <andrew@lunn•ch>
Cc: <netdev@vger•kernel.org>, <linux-kernel@vger•kernel.org>,
	Gregory CLEMENT <gregory.clement@free-electrons•com>
Subject: Re: [PATCH RFT 2/2] macb: kill PHY reset code
Date: Tue, 12 Apr 2016 16:57:21 +0200	[thread overview]
Message-ID: <570D0CD1.6070304@atmel.com> (raw)
In-Reply-To: <570CFE13.3040100@cogentembedded.com>

Le 12/04/2016 15:54, Sergei Shtylyov a écrit :
> Hello.
> 
> On 4/12/2016 12:22 PM, Nicolas Ferre wrote:
> 
>>>> With  the 'phylib' now  being aware of  the "reset-gpios" PHY node property,
>>>> there should be no need to frob the PHY reset in this  driver anymore...
>>>>
>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
>>>>
>>>> ---
>>>>   drivers/net/ethernet/cadence/macb.c |   17 -----------------
>>>>   drivers/net/ethernet/cadence/macb.h |    1 -
>>>>   2 files changed, 18 deletions(-)
>>>>
>>>> Index: net-next/drivers/net/ethernet/cadence/macb.c
>>>> ===================================================================
>>>> --- net-next.orig/drivers/net/ethernet/cadence/macb.c
>>>> +++ net-next/drivers/net/ethernet/cadence/macb.c
> [...]
>>>> @@ -2977,18 +2976,6 @@ static int macb_probe(struct platform_de
>>>>   	else
>>>>   		macb_get_hwaddr(bp);
>>>>
>>>> -	/* Power up the PHY if there is a GPIO reset */
>>>> -	phy_node =  of_get_next_available_child(np, NULL);
>>>> -	if (phy_node) {
>>>> -		int gpio = of_get_named_gpio(phy_node, "reset-gpios", 0);
>>>> -
>>>> -		if (gpio_is_valid(gpio)) {
>>>> -			bp->reset_gpio = gpio_to_desc(gpio);
>>>> -			gpiod_direction_output(bp->reset_gpio, 1);
>>>
>>> Hi Sergei
>>>
>>> The code you are deleting would of ignored the flags in the gpio
>>
>> I don't parse this.
> 
>> The code deleted does take the flag into account.
> 
>     Not really -- you need to call of_get_named_gpio_flags() (with a valid 
> last argument) for that.

Yep,

>> And the DT property
>> associated to it seems correct to me (I mean, with proper flag
>> specification).
> 
>     It apparently is not as it have GPIO_ACTIVE_HIGH and the driver assumes 
> active-low reset signal.

Yes, logic was inverted and... anyway, the flag never used for real...
Thanks Sergei.

No problem for me accepting a patch for the at91-vinco.dts.

Bye,
-- 
Nicolas Ferre

  reply	other threads:[~2016-04-12 14:57 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08 22:21 [PATCH RFT 0/2] Teach phylib hard-resetting devices Sergei Shtylyov
2016-04-08 22:22 ` [PATCH RFT 1/2] phylib: add device reset GPIO support Sergei Shtylyov
2016-04-11 19:25   ` Rob Herring
2016-04-11 19:28     ` Sergei Shtylyov
2016-04-11 22:46       ` Rob Herring
2016-04-08 22:25 ` [PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov
2016-04-11  2:28   ` Andrew Lunn
2016-04-11 17:41     ` Sergei Shtylyov
2016-04-11 18:19       ` Andrew Lunn
2016-04-11 18:39         ` Sergei Shtylyov
     [not found]           ` <570BEF46.7060105-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-04-11 18:51             ` Andrew Lunn
     [not found]               ` <20160411185115.GA30623-g2DYL2Zd6BY@public.gmane.org>
2016-04-11 19:01                 ` Sergei Shtylyov
2016-04-26 10:24                   ` [PATCH] ARM: dts: at91: VInCo: fix phy reset gpio flag Nicolas Ferre
2016-04-26 17:17                     ` David Miller
2016-04-26 18:27                       ` Sergei Shtylyov
2016-04-27  7:15                         ` Nicolas Ferre
2016-04-26 18:25                     ` Sergei Shtylyov
2016-04-12  9:23                 ` [PATCH RFT 2/2] macb: kill PHY reset code Nicolas Ferre
2016-04-12  9:22     ` Nicolas Ferre
2016-04-12 13:40       ` Andrew Lunn
2016-04-12 14:45         ` Nicolas Ferre
2016-04-12 13:54       ` Sergei Shtylyov
2016-04-12 14:57         ` Nicolas Ferre [this message]
2016-04-28 22:12 ` [PATCH RFT 1/2] phylib: add device reset GPIO support Sergei Shtylyov
2016-05-03 17:03   ` Rob Herring
2016-05-10 18:32   ` Florian Fainelli
     [not found]     ` <5732294F.3060606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-10 19:11       ` Sergei Shtylyov
     [not found]         ` <5732327A.6080203-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-05-10 19:13           ` Florian Fainelli
     [not found]   ` <3641492.klKRrvS8tr-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-05-12 18:42     ` Uwe Kleine-König
2016-05-12 21:35       ` Sergei Shtylyov
2016-05-13  4:06         ` Andrew Lunn
2016-05-13 21:16           ` Sergei Shtylyov
2016-05-13  7:06         ` Uwe Kleine-König
2016-05-13 21:49           ` Sergei Shtylyov
2016-05-13 19:18         ` Sergei Shtylyov
2016-05-14 21:14           ` Sergei Shtylyov
2016-05-13  9:07       ` Roger Quadros
2016-05-13 19:36         ` Sergei Shtylyov
2016-05-13 20:44           ` Andrew Lunn
2016-05-13 20:56             ` Sergei Shtylyov
2016-05-13 23:44               ` Andrew Lunn
2016-05-14 19:36                 ` Sergei Shtylyov
2016-05-14 19:50                   ` Andrew Lunn
2016-05-14 21:46                     ` Sergei Shtylyov
     [not found]                       ` <34922ff9-e566-4829-a631-54ce07cbb325-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-05-15 15:23                         ` Andrew Lunn
     [not found]                           ` <20160515152339.GA9021-g2DYL2Zd6BY@public.gmane.org>
2016-05-19 13:40                             ` Sergei Shtylyov
2016-05-16  8:51           ` Roger Quadros
2016-05-26  9:00       ` Linus Walleij
2016-05-26 19:00         ` Uwe Kleine-König
2016-05-30 14:57           ` Linus Walleij

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=570D0CD1.6070304@atmel.com \
    --to=nicolas.ferre@atmel$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=gregory.clement@free-electrons$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sergei.shtylyov@cogentembedded$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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