netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Sven Van Asbroeck <thesven73@gmail.com>,
	Fugang Duan <fugang.duan@nxp.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: fec: generate warning when using deprecated phy reset
Date: Thu, 18 Jul 2019 18:47:51 +0200	[thread overview]
Message-ID: <1563468471.2676.36.camel@pengutronix.de> (raw)
In-Reply-To: <20190718143428.2392-1-TheSven73@gmail.com>

Am Donnerstag, den 18.07.2019, 10:34 -0400 schrieb Sven Van Asbroeck:
> Allowing the fec to reset its PHY via the phy-reset-gpios
> devicetree property is deprecated. To improve developer
> awareness, generate a warning whenever the deprecated
> property is used.

Not really a fan of this. This will cause existing DTs, which are
provided by the firmware in an ideal world and may not change at the
same rate as the kernel, to generate a warning with new kernels. Not
really helpful from the user experience point of view.

Regards,
Lucas

> Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 38f10f7dcbc3..00e1b5e4ef71 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3244,6 +3244,12 @@ static int fec_reset_phy(struct platform_device *pdev)
> >  	else if (!gpio_is_valid(phy_reset))
> >  		return 0;
>  
> > +	/* Recommended way to provide a PHY reset:
> > +	 * - create a phy devicetree node, and link it to its fec (phy-handle)
> > +	 * - add your reset gpio to the phy devicetree node
> > +	 */
> > +	dev_warn(&pdev->dev, "devicetree: phy-reset-gpios is deprecated\n");
> +
> >  	err = of_property_read_u32(np, "phy-reset-post-delay", &phy_post_delay);
> >  	/* valid reset duration should be less than 1s */
> >  	if (!err && phy_post_delay > 1000)

  reply	other threads:[~2019-07-18 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 14:34 [PATCH] net: fec: generate warning when using deprecated phy reset Sven Van Asbroeck
2019-07-18 16:47 ` Lucas Stach [this message]
2019-07-18 16:52   ` Fabio Estevam
2019-07-18 17:21     ` Sven Van Asbroeck
2019-07-18 19:41       ` Andrew Lunn
2019-07-18 19:52         ` Sven Van Asbroeck
2019-07-18 19:59           ` Andrew Lunn
2019-07-18 19:06 ` David Miller
2019-07-18 19:26   ` Sven Van Asbroeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1563468471.2676.36.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=fugang.duan@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thesven73@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).