Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376818

Re: [PATCH RFT 2/2] macb: kill PHY reset code

From Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFT 2/2] macb: kill PHY reset code
Date 2016-04-12 16:00 +0200
Message-ID <rn71h-8gZ-29@gated-at.bofh.it> (permalink)
References <rlN4B-2Mf-3@gated-at.bofh.it> <rlN4B-2Mf-1@gated-at.bofh.it> <rmzLY-6Ud-1@gated-at.bofh.it> <rn2NX-4Qf-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

> 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.

[...]
> Bye,

MBR, Sergei

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-09 00:30 +0200
  Re: [PATCH RFT 2/2] macb: kill PHY reset code Andrew Lunn <andrew@lunn.ch> - 2016-04-11 04:30 +0200
    Re: [PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-11 19:50 +0200
      Re: [PATCH RFT 2/2] macb: kill PHY reset code Andrew Lunn <andrew@lunn.ch> - 2016-04-11 20:20 +0200
        Re: [PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-11 20:40 +0200
          Re: [PATCH RFT 2/2] macb: kill PHY reset code Andrew Lunn <andrew@lunn.ch> - 2016-04-11 21:00 +0200
            Re: [PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-11 21:10 +0200
            Re: [PATCH RFT 2/2] macb: kill PHY reset code Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-12 11:30 +0200
    Re: [PATCH RFT 2/2] macb: kill PHY reset code Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-12 11:30 +0200
      Re: [PATCH RFT 2/2] macb: kill PHY reset code Andrew Lunn <andrew@lunn.ch> - 2016-04-12 15:50 +0200
        Re: [PATCH RFT 2/2] macb: kill PHY reset code Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-12 16:50 +0200
      Re: [PATCH RFT 2/2] macb: kill PHY reset code Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-12 16:00 +0200
        Re: [PATCH RFT 2/2] macb: kill PHY reset code Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-12 17:00 +0200

csiph-web