From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50BB3C3A589 for ; Tue, 20 Aug 2019 14:54:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23CA722DCC for ; Tue, 20 Aug 2019 14:54:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MaOFkP5A"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="OUSQL0xW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23CA722DCC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=btTTzfSxdZcsC2we6DOZgR3GsDecG3IAY+diYn9hNpM=; b=MaOFkP5AmgwivZ 0bs09gf8LSleN09NNceZgS2B1GNyjK67+5Egce3GTmO92/J6DHfYX2+SC2puBdqYKs6uHVDv+wjMc gNwzWGj5sRK8ZjWjOwpuraNc7ih2nlgvMNygIaG2BkLsYiNwvKfylnpDrJpeA/ce3GS/b1DvV1Vkq 4HcacLEG7OJEdi0BqfH4M/od1FnxaWTWEbY1w68JrZl00fCQDGYzfnMtuR7j04cM6db3X5/TMOTWA fV5jlOUNGcmaAwIv2GCXZQx+v9OR3IGnrxbhaChAZ8TEPjccDg3YrUvMWrc9CxoXbPAxFrQ6+U+mu nq2iwnnxsHgyJ1JYEyOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i05Wx-0001lS-CT; Tue, 20 Aug 2019 14:54:39 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i05W7-00013T-TK for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 14:53:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566312826; bh=fJp1/iHxqT8rIRrQhM5u30ZJqn3FLJCfRTqKNHdiDpk=; h=From:To:Cc:Subject:Date:References:From; b=OUSQL0xWoyyXiFXG3/LwHN+ZkRJ0/NRPLbNEZ28F4MzGzDOMyvlvwINEM5mFJYNBR be7A368YMVBuW/BTSfCfJpd3WPAJFNcr60QlNdWdrKPxhUsesiBpVmvMoqsy48u2/Q a46vrrjCQAzAMqZWEPxmeFnRIKmjGU0LoyfmSZ0s= From: megous@megous.com To: "David S. Miller" , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin Subject: [PATCH 4/6] net: stmmac: sun8i: Rename PHY regulator variable to regulator_phy Date: Tue, 20 Aug 2019 16:53:41 +0200 Message-Id: <20190820145343.29108-5-megous@megous.com> In-Reply-To: <20190820145343.29108-1-megous@megous.com> References: <20190820145343.29108-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_075348_274500_BEAA9494 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ondrej Jirman We'll be adding further optional regulators, and this makes it clearer what the regulator is for. Signed-off-by: Ondrej Jirman --- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 3e951a11aec3..e7df30d3cab1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -57,19 +57,21 @@ struct emac_variant { }; /* struct sunxi_priv_data - hold all sunxi private data - * @tx_clk: reference to MAC TX clock - * @ephy_clk: reference to the optional EPHY clock for the internal PHY - * @regulator: reference to the optional regulator - * @rst_ephy: reference to the optional EPHY reset for the internal PHY - * @variant: reference to the current board variant - * @regmap: regmap for using the syscon - * @internal_phy_powered: Does the internal PHY is enabled - * @mux_handle: Internal pointer used by mdio-mux lib + * @tx_clk: reference to MAC TX clock + * @ephy_clk: reference to the optional EPHY clock for + * the internal PHY + * @regulator_phy: reference to the optional regulator + * @rst_ephy: reference to the optional EPHY reset for + * the internal PHY + * @variant: reference to the current board variant + * @regmap: regmap for using the syscon + * @internal_phy_powered: Does the internal PHY is enabled + * @mux_handle: Internal pointer used by mdio-mux lib */ struct sunxi_priv_data { struct clk *tx_clk; struct clk *ephy_clk; - struct regulator *regulator; + struct regulator *regulator_phy; struct reset_control *rst_ephy; const struct emac_variant *variant; struct regmap_field *regmap_field; @@ -528,9 +530,9 @@ static int sun8i_dwmac_init(struct platform_device *pdev, void *priv) struct sunxi_priv_data *gmac = priv; int ret; - ret = regulator_enable(gmac->regulator); + ret = regulator_enable(gmac->regulator_phy); if (ret) { - dev_err(&pdev->dev, "Fail to enable regulator\n"); + dev_err(&pdev->dev, "Fail to enable PHY regulator\n"); return ret; } @@ -990,7 +992,7 @@ static void sun8i_dwmac_exit(struct platform_device *pdev, void *priv) clk_disable_unprepare(gmac->tx_clk); - regulator_disable(gmac->regulator); + regulator_disable(gmac->regulator_phy); } static void sun8i_dwmac_set_mac_loopback(void __iomem *ioaddr, bool enable) @@ -1126,9 +1128,9 @@ static int sun8i_dwmac_probe(struct platform_device *pdev) } /* Optional regulator for PHY */ - gmac->regulator = devm_regulator_get(dev, "phy"); - if (IS_ERR(gmac->regulator)) { - ret = PTR_ERR(gmac->regulator); + gmac->regulator_phy = devm_regulator_get(dev, "phy"); + if (IS_ERR(gmac->regulator_phy)) { + ret = PTR_ERR(gmac->regulator_phy); if (ret != -EPROBE_DEFER) dev_err(dev, "Failed to get PHY regulator (%d)\n", ret); return ret; -- 2.22.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel