Re: [PATCH net-next v3 6/8] net: phy: add calibration callbacks to phy_driver

Andrew Lunn
2023-11-14T19:14:56Z

> +static inline
> +int phy_start_calibration(struct phy_device *phydev)
> +{
> + if (!(phydev->drv &&
> + phydev->drv->calibration_start &&
> + phydev->drv->calibration_stop))
> + return -EOPNOTSUPP;
> +
> + return phydev->drv->calibration_start(phydev);
> +}
> +
> +static inline
> +int phy_stop_calibration(struct phy_device *phydev)
> +{
> + if (!(phydev->drv &&
> + phydev->drv->calibration_stop))
> + return -EOPNOTSUPP;
> +
> + return phydev->drv->calibration_stop(phydev);
> +}
> +

What is the locking model?

Andrew