[PATCH net-next v4 4/5] stmmac: intel: add phy-mode and fixed-link ACPI _DSD setting support
Andrew Lunn
andrew at lunn.ch
Tue Jun 14 11:57:53 PDT 2022
> + /* For fixed-link setup, we allow phy-mode setting */
> + fwnode = dev_fwnode(&pdev->dev);
> + if (fwnode) {
> + const char *phy_mode;
> +
> + if (!fwnode_property_read_string(fwnode, "phy-mode",
> + &phy_mode)) {
> + if (!strcmp(phy_mode, "sgmii"))
> + plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
> + if (!strcmp(phy_mode, "1000base-x"))
> + plat->phy_interface = PHY_INTERFACE_MODE_1000BASEX;
> + }
fwnode_get_phy_mode() and then validate the value afterwards.
Andrew
More information about the linux-arm-kernel
mailing list