From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751269AbcDKC2H (ORCPT ); Sun, 10 Apr 2016 22:28:07 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:51928 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbcDKC2G (ORCPT ); Sun, 10 Apr 2016 22:28:06 -0400 Date: Mon, 11 Apr 2016 04:28:02 +0200 From: Andrew Lunn To: Sergei Shtylyov Cc: nicolas.ferre@atmel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFT 2/2] macb: kill PHY reset code Message-ID: <20160411022802.GB4307@lunn.ch> References: <81129033.NXiOLTg1so@wasted.cogentembedded.com> <2811962.eGX2i5RJbZ@wasted.cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2811962.eGX2i5RJbZ@wasted.cogentembedded.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 09, 2016 at 01:25:03AM +0300, Sergei Shtylyov 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 > > --- > 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 > @@ -2884,7 +2884,6 @@ static int macb_probe(struct platform_de > = macb_clk_init; > int (*init)(struct platform_device *) = macb_init; > struct device_node *np = pdev->dev.of_node; > - struct device_node *phy_node; > const struct macb_config *macb_config = NULL; > struct clk *pclk, *hclk = NULL, *tx_clk = NULL; > unsigned int queue_mask, num_queues; > @@ -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 property, i.e. active low. The new code in the previous patch does however take the flags into account. Did you check if there are any device trees which have flags, which were never used, but are now going to be used and thus break... Andrew