[PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree

Sascha Hauer s.hauer at pengutronix.de
Wed Nov 6 03:39:38 EST 2013


Hi Pavel,

On Tue, Nov 05, 2013 at 08:11:05PM +0100, Pavel Pisa wrote:
> Hello Jean-Christophe and Rosta,
> 
> On Tuesday 05 of November 2013 17:15:16 Jean-Christophe PLAGNIOL-VILLARD 
> wrote:
> > On 15:42 Tue 05 Nov     , Rostislav Lisovy wrote:
> > > Signed-off-by: Rostislav Lisovy <lisovy at gmail.com>
> > >
> > > diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
> > > index 2f31352..6f883bf 100644
> > > --- a/drivers/net/fec_imx.c
> > > +++ b/drivers/net/fec_imx.c
> > > @@ -671,6 +676,22 @@ static int fec_probe(struct device_d *dev)
> > >
> > >  	fec->regs = dev_request_mem_region(dev, 0);
> > >
> > > +#ifdef CONFIG_OFDEVICE
> >
> > use if (IS_ENABLED(CONFIG_OFDEVICE))
> >
> > so we can improve the code coverage
> >
> > > +	phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0);
> 
> I have question if the missing definition of reset pin should/must lead
> to whole ethernet interface removal/initialization abort.

Thanks for spotting. The gpio pin should indeed be optional. The driver
should only fail if the gpio is specified, but not working. It should
not fail if there's no gpio specified at all.

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 |



More information about the barebox mailing list