Re: [PATCH 2/3] phy: core: Add common helper for get phy phandle by index
From: Andy Shevchenko
Date: Mon Aug 31 2026 - 05:43:29 EST
On Mon, Aug 31, 2026 at 10:55:04AM +0800, Inochi Amaoto wrote:
> Several phy helper use index to get phy phandle of a device node,
> add a common function for the future reuse.
...
> +/**
> + * of_phy_get_by_index() - lookup and obtain a reference to a phy using a
> + * device_node by index.
> + * @np: device_node for which to get the phy
> + * @index: index of the phy from device's point of view
> + * Returns the phy driver, after getting a refcount to it; or
> + * -ENODEV if there is no such phy. The caller is responsible for
> + * calling of_phy_put() to release that count.
Use proper syntax for Return: section, with the above kernel-doc will warn.
> + */
--
With Best Regards,
Andy Shevchenko