[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <485d3df5-9d78-db48-7075-58d24b21d61d@codeaurora.org>
Date: Thu, 25 Jan 2018 08:36:02 -0600
From: Timur Tabi <timur@...eaurora.org>
To: Wang Dongsheng <dongsheng.wang@...-semitech.com>
Cc: hpuranik@...eaurora.org, yu.zheng@...-semitech.com,
netdev@...r.kernel.org
Subject: Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to
emac-adev
On 01/25/2018 12:14 AM, Wang Dongsheng wrote:
> mdiobus always try to get a GPIO "reset" consumer, based on ACPI
> the GPIO should be described in emac-adev _DSD or _CRS.
Are you talking about this:
/* de-assert bus level PHY GPIO reset */
gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(gpiod)) {
dev_err(&bus->dev, "mii_bus %s couldn't get reset GPIO\n",
bus->id);
return PTR_ERR(gpiod);
If so, I don't think we support named gpios in ACPI. Do you have an
actual test case for your patch? Our ACPI tables don't specify any
GPIOs for EMAC. I wouldn't even know what that should look like.
> diff --git a/drivers/net/ethernet/qualcomm/emac/emac-phy.c b/drivers/net/ethernet/qualcomm/emac/emac-phy.c
> index 53dbf1e..69171d5 100644
> --- a/drivers/net/ethernet/qualcomm/emac/emac-phy.c
> +++ b/drivers/net/ethernet/qualcomm/emac/emac-phy.c
> @@ -117,6 +117,10 @@ int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt)
>
> if (has_acpi_companion(&pdev->dev)) {
> u32 phy_addr;
> + struct fwnode_handle *fwnode;
> +
> + fwnode = acpi_fwnode_handle(ACPI_COMPANION(&pdev->dev));
> + mii_bus->dev.fwnode = fwnode;
You don't need fwnode:
mii_bus->dev.fwnode =
acpi_fwnode_handle(ACPI_COMPANION(&pdev->dev));
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists