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=-8.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 51D50C31E47 for ; Sat, 15 Jun 2019 10:10:56 +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 18D9A2184D for ; Sat, 15 Jun 2019 10:10:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q7tb9Pni"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="kS071Lzw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18D9A2184D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.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=Z6hucd6g6nC3URNZeslg1K865W5pFWDznuLNGf0t+To=; b=q7tb9PniasXatF uJ199H+J/5b08WpanvgyWNqjHBXHvgnzEo7xPDaqqXa6RCGYnnbb2hCabjZwQfvIcLoGZFpOg7fzH 16tnUGtRDf8RwEtE2xLslnl6jNh04HhPBuIShoTLR7SUKp1UaaGdfS2Jh0FSysUgi802rRQWPhbPU mzeFD8IOfnBZTZlA2FW0JRsHrSQXkJYN1nvuCBmILJjP1zHWeCwI7WNrwTWG74r/GmuQwLBM0nwVD fFDQiesXsw3LHgDQXjwlWOo5wrxtI8o1cI+km2qp6k5D1lZXsA1Nz+9G7wee1CjGXQBvIjqqYMIyd NQKOtHuA7O0ZACR2V5hQ==; 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 1hc5e8-0005eS-AZ; Sat, 15 Jun 2019 10:10:52 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hc5d4-0003Ua-J3 for linux-arm-kernel@lists.infradead.org; Sat, 15 Jun 2019 10:09:47 +0000 Received: by mail-wr1-x444.google.com with SMTP id d18so4987431wrs.5 for ; Sat, 15 Jun 2019 03:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bZFU7NFpVfVeHlWdzqsP9W+7pyjV+Qkejc+qbCNG2JI=; b=kS071LzwgDU6YqnKn98IPviy/GgCUK0RM+EhTYLxlVneNva93160H8wS+XdNcNfRoR rylBQviUW+BOLyLwgO+Y/eD1tFldIBZnj5CSu5t/lMErK7NwsGNaQFYkDMidrz5MeNJD l4e1JC0QRccodXh/5TuRuF7Y/zv8ASzHjQBdOEqDvuP0dpYy1yCCYKclsnrM15ibmpR1 SyEMoSQg/HiT0nD/lErdb0jRfRUTB3xlvwEEPPEeig+HV+a2PZSaSRdRKZ2BmGRDtp+f TCeaxMbpUGV8cSq7zugSmcBvgn35AbExvvonMeS6BE11STmktZQv9DKDCjsFYcdIi2KC uREg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bZFU7NFpVfVeHlWdzqsP9W+7pyjV+Qkejc+qbCNG2JI=; b=TGWenFRbdNcCaJiycF2Kwan5im7PHMVFyPedshxgp1N4OM5JYEU05+4YbUtwBWwPhD ZuUlvXh2Z3iBpPpRTMiuTF+Hr6kSzsgYeHgH/AOQ46WEqggVlGqOxtc8nTL5bcaoMhEu A9NpPmgrZetLMjhGjXeZhnGjiUTV3lob/bJzZl7aeL8HJbbK8viD1CybP86sYrsO+7r4 N+eq5kqabSLZhvS21jLfhKIsz6l1riggb+rI8BMK6imaDKW2GsxpIFuhvDrCSM8o+1fL zxddLRn5PszbnygmfM0ikxTuHJ5njOH4NRdUMdy81lCVY3ck59whZT97grSqAUkGl/n3 GxpA== X-Gm-Message-State: APjAAAXv4lmWC6028GbzrwOCqOmX0C6TNvoU2N/muHfOMWAABXSPpW58 6+2vcPCK9K6dTAK0dVuNEXI= X-Google-Smtp-Source: APXvYqx0/fov4P+lnmI2fLd5hg9jAgZR94PgXgj/0RSR6XIrP2w7HMaZ7iddBld9yhXqDa6274scSw== X-Received: by 2002:a5d:4001:: with SMTP id n1mr51838065wrp.293.1560593384926; Sat, 15 Jun 2019 03:09:44 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133C20E00A9A405DFDBBC0790.dip0.t-ipconnect.de. [2003:f1:33c2:e00:a9a4:5df:dbbc:790]) by smtp.googlemail.com with ESMTPSA id f2sm9270513wrq.48.2019.06.15.03.09.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 15 Jun 2019 03:09:44 -0700 (PDT) From: Martin Blumenstingl To: netdev@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, davem@davemloft.net Subject: [PATCH net-next v1 3/5] net: stmmac: drop the reset GPIO from struct stmmac_mdio_bus_data Date: Sat, 15 Jun 2019 12:09:30 +0200 Message-Id: <20190615100932.27101-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190615100932.27101-1-martin.blumenstingl@googlemail.com> References: <20190615100932.27101-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190615_030946_624533_F510F00E X-CRM114-Status: GOOD ( 13.14 ) 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: Martin Blumenstingl , andrew@lunn.ch, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, 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 No platform uses the "reset_gpio" field from stmmac_mdio_bus_data anymore. Drop it so we don't get any new consumers either. Plain GPIO numbers are being deprecated in favor of GPIO descriptors. If needed any new non-OF platform can add a GPIO descriptor lookup table. devm_gpiod_get_optional() will find the GPIO in that case. Suggested-by: Linus Walleij Signed-off-by: Martin Blumenstingl --- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 29 ++++++------------- include/linux/stmmac.h | 1 - 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index 4614f1f2bffb..459ef8afe4fb 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -253,21 +253,15 @@ int stmmac_mdio_reset(struct mii_bus *bus) if (priv->device->of_node) { struct gpio_desc *reset_gpio; - if (data->reset_gpio < 0) { - reset_gpio = devm_gpiod_get_optional(priv->device, - "snps,reset", - GPIOD_OUT_LOW); - if (IS_ERR(reset_gpio)) - return PTR_ERR(reset_gpio); - - device_property_read_u32_array(priv->device, - "snps,reset-delays-us", - data->delays, 3); - } else { - reset_gpio = gpio_to_desc(data->reset_gpio); - - gpiod_direction_output(reset_gpio, 0); - } + reset_gpio = devm_gpiod_get_optional(priv->device, + "snps,reset", + GPIOD_OUT_LOW); + if (IS_ERR(reset_gpio)) + return PTR_ERR(reset_gpio); + + device_property_read_u32_array(priv->device, + "snps,reset-delays-us", + data->delays, 3); if (data->delays[0]) msleep(DIV_ROUND_UP(data->delays[0], 1000)); @@ -323,11 +317,6 @@ int stmmac_mdio_register(struct net_device *ndev) if (mdio_bus_data->irqs) memcpy(new_bus->irq, mdio_bus_data->irqs, sizeof(new_bus->irq)); -#ifdef CONFIG_OF - if (priv->device->of_node) - mdio_bus_data->reset_gpio = -1; -#endif - new_bus->name = "stmmac"; if (priv->plat->has_xgmac) { diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 816edb545592..fe865df82e48 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -97,7 +97,6 @@ struct stmmac_mdio_bus_data { int *irqs; int probed_phy_irq; #ifdef CONFIG_OF - int reset_gpio; u32 delays[3]; #endif }; -- 2.22.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel