[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y9lPDGUestsjdWVX@lunn.ch>
Date: Tue, 31 Jan 2023 18:25:32 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Arnd Bergmann <arnd@...nel.org>, Wei Fang <wei.fang@....com>,
Jakub Kicinski <kuba@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Shenwei Wang <shenwei.wang@....com>,
Clark Wang <xiaoning.wang@....com>,
NXP Linux Team <linux-imx@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, ore@...gutronix.de,
kernel@...gutronix.de
Subject: Re: [PATCH] [v2] fec: convert to gpio descriptor
On Tue, Jan 31, 2023 at 04:38:51PM +0100, Marc Kleine-Budde wrote:
> On 26.01.2023 22:05:59, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > The driver can be trivially converted, as it only triggers the gpio
> > pin briefly to do a reset, and it already only supports DT.
> >
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
>
> On current net-next/main 6a8ab436831d ("Merge branch
> 'add-support-for-the-the-vsc7512-internal-copper-phys'") this causes the
> riot board (arch/arm/boot/dts/imx6dl-riotboard.dts) to not probe the
> fec:
>
> | Jan 31 16:32:12 riot kernel: fec 2188000.ethernet: error -ENOENT: failed to get phy-reset-gpios
> | Jan 31 16:32:12 riot kernel: fec: probe of 2188000.ethernet failed with error -2
Hi Marc
Could you try swapping the devm_gpiod_get() for
devm_gpiod_get_optional().
It is kind of hidden, but:
- else if (!gpio_is_valid(phy_reset))
- return 0;
made the GPIO optional, since -2 is not a valid GPIO number and so it
would silently return.
The real fix will need to be a bit more complex, since we don't want
to do the sleeps etc if the GPIO is not present.
Andrew
Powered by blists - more mailing lists