Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289400
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net/macb: add support for resetting PHY using GPIO |
| Date | 2015-12-11 11:40 +0100 |
| Message-ID | <qEthf-311-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qE3Zw-31E-17@gated-at.bofh.it> <qEb11-7RF-33@gated-at.bofh.it> <qEryN-1NQ-3@gated-at.bofh.it> <qEsuR-2qB-7@gated-at.bofh.it> <qEt7A-2X2-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 11, 2015 at 11:21:30AM +0100, Sascha Hauer wrote: > On Fri, Dec 11, 2015 at 10:40:22AM +0100, Gregory CLEMENT wrote: > > So I see 2 options: > > > > - leaving the phy-reset-gpios property in the ethernet node. Thanks to > > this we can use the gpiod functions, and it is still possible to use > > manage the power management. > > > > - using a reset-gpios property inside the phy node. But then the only > > solution to get a reference on it, will be to use > > of_get_named_gpio. All the gpiod functions need a reference to the > > device that we won't have at this point. Also we will only be able to > > power up the reset, but we won't have any reference to it latter. > > Have you seen fwnode_get_named_gpiod()? This seems to be the right > function for the job. Except: 1. You don't have a dev->fwnode pointer setup. 2. Using &dev->of_node->fwnode is really going underneath the covers. I've pointed this problem out several times with the fwnode code, which seems to be a half-baked and incomplete design when it comes to DT. I'd suggest using of_get_named_gpio_flags() et.al. and converting the resulting gpio number to a gpio descriptor - or trying to push DT and fwnode people to initialise dev->fwnode so that a proper transition to fwnode for DT can be made. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-09 19:00 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Andrew Lunn <andrew@lunn.ch> - 2015-12-09 19:20 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Moritz Fischer <moritz.fischer@ettus.com> - 2015-12-09 19:30 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO kbuild test robot <lkp@intel.com> - 2015-12-09 20:20 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-10 08:40 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-10 16:10 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-11 09:50 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-11 10:50 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-11 11:30 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-12-11 11:40 +0100
csiph-web