From patchwork Sun Nov 25 21:18:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 10697059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B24517FE for ; Sun, 25 Nov 2018 21:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AB48298A2 for ; Sun, 25 Nov 2018 21:20:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F1E8298AC; Sun, 25 Nov 2018 21:20:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D84C298A6 for ; Sun, 25 Nov 2018 21:20:28 +0000 (UTC) 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=X9TqIbE5ZmkIlFJRQZ/7xxwZm5/8nqi50hjmk8D1NU4=; b=D0zngkOeGPu8EN T9WHA8EFaFfr5ZeRxGxc2COXAWEdyihA7xKesktsr0jCcUgW2XHc9/+C7eaUHMrfjFbE9numK/rPX OVoq2T743e4mRY6NXHf5p+C0Aop+qSGGVf9mTaC0zj6EOmkLN/oQYuV5VSATuEqIlK3/i1bhZWOvu K0/3VWWAbXPt0IxYXoSDCv4vc7jb9LoPrZRI3cFZccp4KiI9Syd377PNYL/qa/tByP0woSe2N0d5w F0VjWLM3V9p/F8wbNEcNMt6TVjcwugiFFpf72NgTeoFYkEh739qJ+rFnRU4NDjeWaboX4PqfYQ7RI pt/EVOokksCt1Fkb1mUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gR1pD-0004ZE-Pu; Sun, 25 Nov 2018 21:20:19 +0000 Received: from mail-qt1-f194.google.com ([209.85.160.194]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gR1od-00031A-BS; Sun, 25 Nov 2018 21:19:46 +0000 Received: by mail-qt1-f194.google.com with SMTP id v11so15476467qtc.2; Sun, 25 Nov 2018 13:19:32 -0800 (PST) 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:organization:content-transfer-encoding; bh=r/2+M63UuAJuJms3m/6f1vD2KKXomz0M49HpXRFfEag=; b=fGEvw9DrFblu2HzqQL5U8S9jTqlZXjnWUinkJDrDAZLwq8/IRgp2CnXkWXJ/cyCeFa n7526xKrbk0oCSFePFsOqMvJmr9DRgLSo3wFyqxRJCrTEUrf8nZjNzmp98DFdPv79Yom ny6mE9q4ZSuE9PQYRVcKVfF2O35Iji0oXu41U3GooriHvRSnl36bs6SbMQbmSaEiEv0W hV4TAicnEIKIAkhipXhkuXDVGUkoJ/dNEE+GDorsNgSTHZmkwxzadIn/Y/pXQWotKMhm kluVbz7vJDgsy+PJJwcfJxdtEbtbo3lpa/VL8cIUhaqmtTxlEA0bojc5LZm5vNzOSaYt oJjA== X-Gm-Message-State: AGRZ1gLPjS56DASpB66VzahMVot/zRqjJZOHZTeldJbXZqvsSO0ttBWH 4DjOmXoLbmItGc4u0i1vBDw= X-Google-Smtp-Source: AJdET5eAy7UACFbqLvZPY1JaT+cGFqwOyA4bFFnEFtf5vxo9xgyfsuZlU/YnGTMjE9+zyIK3aCUtCQ== X-Received: by 2002:ac8:962:: with SMTP id z31mr22630315qth.305.1543180772089; Sun, 25 Nov 2018 13:19:32 -0800 (PST) Received: from localhost.localdomain ([181.220.65.91]) by smtp.gmail.com with ESMTPSA id b188sm13642238qkc.58.2018.11.25.13.19.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 13:19:31 -0800 (PST) Received: by localhost.localdomain (sSMTP sendmail emulation); Sun, 25 Nov 2018 19:19:25 -0200 From: Otavio Salvador To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present Date: Sun, 25 Nov 2018 19:18:57 -0200 Message-Id: <20181125211907.9895-3-otavio@ossystems.com.br> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181125211907.9895-1-otavio@ossystems.com.br> References: <20181125211907.9895-1-otavio@ossystems.com.br> MIME-Version: 1.0 Organization: O.S. Systems Software LTDA. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181125_131944_437547_E4DFEBC3 X-CRM114-Status: GOOD ( 14.90 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , Otavio Salvador , netdev@vger.kernel.org, "David S. Miller" , Jose Abreu , Maxime Coquelin , Giuseppe Cavallaro , linux-stm32@st-md-mailman.stormreply.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The phy-supply is an optional regulator, so we should not treat as an error when phy-supply is not passed in the device tree. This allows the dwmac-rk driver to probe when phy-supply is not present in the dts. Signed-off-by: Otavio Salvador --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 7b923362ee55..73855622445b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1205,7 +1205,7 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable) if (!ldo) { dev_err(dev, "no regulator found\n"); - return -1; + return 0; } if (enable) {