Re: [PATCH 2/3] phy: core: Add common helper for get phy phandle by index

From: Inochi Amaoto

Date: Mon Aug 31 2026 - 05:54:30 EST


On Mon, Aug 31, 2026 at 12:13:54PM +0300, Andy Shevchenko wrote:
> 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.
>

Thanks, I just copy the wrony syntax. I will fix them in all the patches.

Regards,
Inochi

> > + */
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
>
> --
> linux-phy mailing list
> linux-phy@xxxxxxxxxxxxxxxxxxx
> https://lists.infradead.org/mailman/listinfo/linux-phy