lkml.org 
[lkml]   [2020]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support
> +	/* Retrieve the shared load/save GPIO. Request it as non exclusive as
> + * the same GPIO can be requested by all the PHYs of the same package.
> + * Ths GPIO must be used with the phc_lock taken (the lock is shared
> + * between all PHYs).
> + */
> + vsc8531->load_save = devm_gpiod_get_optional(&phydev->mdio.dev, "load-save",
> + GPIOD_FLAGS_BIT_NONEXCLUSIVE |
> + GPIOD_OUT_LOW);
> + if (IS_ERR(vsc8531->load_save)) {
> + phydev_err(phydev, "Can't get load-save GPIO (%ld)\n",
> + PTR_ERR(vsc8531->load_save));
> + return PTR_ERR(vsc8531->load_save);
> + }
> +

I can understand the GPIO being optional, it is only needed when PTP
is being used. But i don't see a test anywhere that when PTP is being
used the GPIO is provided. What actually happens if it is missing and
somebody tries to use the PTP? Maybe only register the PTP parts with
the core if the GPIO has been found in DT?

Andrew

\
 
 \ /
  Last update: 2020-06-20 17:23    [W:0.112 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site