Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbbLJHiF (ORCPT ); Thu, 10 Dec 2015 02:38:05 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:35195 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbbLJHiD (ORCPT ); Thu, 10 Dec 2015 02:38:03 -0500 Date: Thu, 10 Dec 2015 08:37:56 +0100 From: Sascha Hauer To: Gregory CLEMENT Cc: "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Nicolas Ferre , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Thomas Petazzoni Subject: Re: [PATCH] net/macb: add support for resetting PHY using GPIO Message-ID: <20151210073756.GA11966@pengutronix.de> References: <1449683383-5022-1-git-send-email-gregory.clement@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449683383-5022-1-git-send-email-gregory.clement@free-electrons.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:20:28 up 53 days, 15:59, 88 users, load average: 0.03, 0.09, 0.11 User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1389 Lines: 30 Hi Gregory, On Wed, Dec 09, 2015 at 06:49:43PM +0100, Gregory CLEMENT wrote: > With device tree it is no more possible to reset the PHY at board > level. Furthermore, doing in the driver allow to power down the PHY when > the network interface is no more used. > > The patch introduces a new optional property "phy-reset-gpio" inspired > from the one use for the FEC. I don't think it's a good idea to further extend the usage of this binding. The driver should use the phy-handle property and of_phy_connect() which gives you a proper device node for the phy. Then the phy device node should get the reset gpio. I know it's more work, but doing it like this gives you additional goodies like proper handling of the max-speed property, a fixed-link if necessary and picking the correct phy if there are muliple phys on the bus. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/