Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4943096imu; Sun, 25 Nov 2018 13:20:40 -0800 (PST) X-Google-Smtp-Source: AJdET5dOAgp+7xWMMnkrcOq7J7lFyIrUSZ97kLQSZXLtjD5ttub1e0FDt1jTdg7eb6ajlpGqQqKS X-Received: by 2002:a62:6143:: with SMTP id v64mr25041239pfb.142.1543180840472; Sun, 25 Nov 2018 13:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543180840; cv=none; d=google.com; s=arc-20160816; b=ppn24a9QGn5fSFAkOX4bKn7yWcTj37tgsULLC/fFcvBciVgtxloYF1bfjspcMOZYXK LHFL8y6I4QCkTfUjSDOX7iuSDd/PxvOk/QS7kZvGC+v8KW9K5xPIC01YCfz2eha+E3J4 6w6Ak3HU3FCDnkvTZ/2WldSUA32LeZii6JSFPYY9llVXoBonSqelJU03T5n8fxNZ2A49 0LfsGqpk4PbSma+zkDIhd9LJBjSHih3CKCqCBGq7GVY3iWjlfTb2HFTh7MFzJXAr5RPE hvd9yQTrPR9bNsZmoRi1euMXEJdTJ3dKIPWvN4fidZ3fefkEJ9Zlq2cAGyGbzl+NnVtz ycJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=r/2+M63UuAJuJms3m/6f1vD2KKXomz0M49HpXRFfEag=; b=TY9Om5yrlst70hVURSbSxPwk+Rw6bhjgNPJdHcjOZlRzDcpamvLSSt1W9n6s5xPB/g wHzfzvUPDruqhZymmuAMesh7iSXtL6bgQ2lSqGECLotPJgC3IiDWHW0F0ws6uq9m2lwO +bFor0tRLH+tETaB/wD7PYrwoXs7kXvQNGhjHlwpNMIkUegyW2u/UBpV/+zKPtM+1T3D msg7jzoic1SoQw6V81cdGmKcf4UfBJFNoCYRNnS2xQ/odc5p+hmWo+GGNZuH+jye+YQ+ yGjiRvD6pF5OqyzK3jmVCd12LCOsgvE3ye9lR5IttICy2lTf3sDawi/leyUw2LfWEvAz Gf3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si14982555plz.344.2018.11.25.13.20.25; Sun, 25 Nov 2018 13:20:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726208AbeKZILc (ORCPT + 99 others); Mon, 26 Nov 2018 03:11:32 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36562 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbeKZILc (ORCPT ); Mon, 26 Nov 2018 03:11:32 -0500 Received: by mail-qt1-f196.google.com with SMTP id t13so15481417qtn.3; 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=pciXTj9p2DX8/hYggkJsf1TR1ydebLSCmvjxYhdQDgZXBsW4hBG7PNteaRH9Qe3KgQ iqc1HeGVxrlJ3SCthZVTFVO9ns6C1PVRDkI5A0Ux12Gvf7szPclKchDF+L/n598FqO8W /a5uCAwTNEWrgHWzMaioi4hZsLlrf27aT1b6yj1MsWucg416U1V/PqN6iRjcEVb3Tv8v oBdTolIorRunADfCld+LJWPd/h2LO/vceoZnQN3u1/lRJN2rMu1dz/vHD8nv7B6HAdbu PUWLN6Pnudxu0vn53HQsSLjUGaF94uuFBJWKD6oMDOxHrIIKxeNCJgXMhMiPb0VEzpTa BnqQ== X-Gm-Message-State: AGRZ1gK+vNMPgDm2c5EY44O0EhMIBwchmt5dd0gj9CYoU66xDyj7z8v9 0dNxqSx8t3G7xbtUX4YVH9z6QmX7 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 Cc: Otavio Salvador , Jose Abreu , Giuseppe Cavallaro , netdev@vger.kernel.org, Alexandre Torgue , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, "David S. Miller" 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. Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { -- 2.19.1