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=0.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 52CCAC3A59E for ; Tue, 20 Aug 2019 15:56:54 +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 291AC22CF7 for ; Tue, 20 Aug 2019 15:56:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PzwVvdDj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="QvkxWzpk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 291AC22CF7 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PfNtCxecEgYUIdhJif/eZL+Cdq8GxZKqh0CpHzwulwM=; b=PzwVvdDjdoYFgp 79W3Yg82UnoeVNT7Bj5/xH1eKXOVjto0VFvrOMeTVilf5xkXlWL3gvXTvunEXbMDV2EbMCdoNejG1 luSXHhpFvVxrEaw8Rkq2ckC7/V10p2BcFuF+rmRNwufPDC1B0jvlFA0xwocTwgyvNyaX/eR4id5MF u+ar91OHdgODe77dQz2WHlHrmf1hagr+hyD0ENnEzIOq7sKXCu5yemlztoiAIb++RebhrPTo1Otq7 SfRLurL7zgcIPWTaflqdXszAOQkM9nh7DIpZLGEUA+B+ocR2DS8bCinqmehRqph3dGnZHuiY1gT9X CBNqsQSBXqY53K2SL6Ng==; 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 1i06VB-0006rt-Qq; Tue, 20 Aug 2019 15:56:53 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i06V9-0006rQ-4d for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 15:56:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566316609; bh=bzutuiNbq00ksO2iXVNczWC4eQDfbf7nWDBun27IPTA=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=QvkxWzpkR3zBxqvUP9rNQO6X8E5gVtIfMMfz2ijXAbFX3kIjf/mrTpR7rh+3CdgeI oe+sdUivzOqXUPUin5nznYyGKPIRvPsJcUzSPOWRPWzbZBQT0sOgVdZ0jnizQrrEHz y/R5S8RhcZBWM/ByYYZn9tfxpzmBzeUBwErXr224= Date: Tue, 20 Aug 2019 17:56:48 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Andrew Lunn Subject: Re: [PATCH 3/6] net: stmmac: sun8i: Use devm_regulator_get for PHY regulator Message-ID: <20190820155648.hjr5mlmsc6krecby@core.my.home> Mail-Followup-To: Andrew Lunn , "David S. Miller" , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , 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 References: <20190820145343.29108-1-megous@megous.com> <20190820145343.29108-4-megous@megous.com> <20190820153939.GL29991@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190820153939.GL29991@lunn.ch> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_085651_354432_3C361B85 X-CRM114-Status: GOOD ( 10.68 ) 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: Mark Rutland , Jose Abreu , Alexandre Torgue , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , linux-stm32@st-md-mailman.stormreply.com, Chen-Yu Tsai , Rob Herring , Maxime Coquelin , Giuseppe Cavallaro , "David S. Miller" , 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 On Tue, Aug 20, 2019 at 05:39:39PM +0200, Andrew Lunn wrote: > On Tue, Aug 20, 2019 at 04:53:40PM +0200, megous@megous.com wrote: > > From: Ondrej Jirman > > > > Use devm_regulator_get instead of devm_regulator_get_optional and rely > > on dummy supply. This avoids NULL checks before regulator_enable/disable > > calls. > > Hi Ondrej > > What do you mean by a dummy supply? I'm just trying to make sure you > are not breaking backwards compatibility. I have tested it on Orange Pi PC 2, that uses only phy-supply, but not phy-io-supply, and the kernel now prints: [ 1.410137] dwmac-sun8i 1c30000.ethernet: 1c30000.ethernet supply phy-io not found, using dummy regulator I have also tested it on Orange Pi PC, that doesn't use external phy, and instead of: [ 1.081378] dwmac-sun8i 1c30000.ethernet: No regulator found The kernel now prints: [ 1.112752] dwmac-sun8i 1c30000.ethernet: 1c30000.ethernet supply phy not found, using dummy regulator [ 1.112814] dwmac-sun8i 1c30000.ethernet: 1c30000.ethernet supply phy-io not found, using dummy regulator Ethernet works in both cases, so that should cover all existing combinations. :) regards, Ondrej > Thanks > Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel