lkml.org 
[lkml]   [2019]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: fec: generate warning when using deprecated phy reset
From
Date
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)

\
 
 \ /
  Last update: 2019-07-18 18:48    [W:0.080 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site