lkml.org 
[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/7] mdio_bus: Introduce fwnode MDIO helpers
Hi,

On Fri, Jan 31, 2020 at 09:04:34PM +0530, Calvin Johnson wrote:

<snip>

> +/**
> + * fwnode_mdiobus_child_is_phy - Return true if the child is a PHY node.
> + * It must either:
> + * o Compatible string of "ethernet-phy-ieee802.3-c45"
> + * o Compatible string of "ethernet-phy-ieee802.3-c22"
> + * Checking "compatible" property is done, in order to follow the DT binding.
> + */
> +static bool fwnode_mdiobus_child_is_phy(struct fwnode_handle *child)
> +{
> + int ret;
> +
> + ret = fwnode_property_match_string(child, "compatible",
> + "ethernet-phy-ieee802.3-c45");
> + if (!ret)
> + return true;
> +
> + ret = fwnode_property_match_string(child, "compatible",
> + "ethernet-phy-ieee802.3-c22");
> + if (!ret)
> + return true;
> +
> + if (!fwnode_property_present(child, "compatible"))
> + return true;
> +
> + return false;
> +}

Can we use _CID in ACPI to get the compatible string? Is there any other method
to handle this kind of situation where we would like to pass C45 or C22 info to
the mdiobus driver?

Thanks
Calvin

\
 
 \ /
  Last update: 2020-03-17 12:38    [W:0.280 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site