From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev Date: Thu, 25 Jan 2018 08:36:02 -0600 Message-ID: <485d3df5-9d78-db48-7075-58d24b21d61d@codeaurora.org> References: <1516860879-15798-1-git-send-email-dongsheng.wang@hxt-semitech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: hpuranik@codeaurora.org, yu.zheng@hxt-semitech.com, netdev@vger.kernel.org To: Wang Dongsheng Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:53570 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbeAYOgE (ORCPT ); Thu, 25 Jan 2018 09:36:04 -0500 In-Reply-To: <1516860879-15798-1-git-send-email-dongsheng.wang@hxt-semitech.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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.