Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4085533pxb; Tue, 17 Nov 2020 10:52:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrt37Fxocw6g9C2b9jZoT4VTKwXgL7NfIQnTn8SQJg/4cFLO2+HPpHhrmJ+DX2a5zXwNCB X-Received: by 2002:a17:906:3191:: with SMTP id 17mr20529023ejy.396.1605639120921; Tue, 17 Nov 2020 10:52:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605639120; cv=none; d=google.com; s=arc-20160816; b=MUBCGL6zEpvbs2TI8gVl3HkgfLJxf4kSBse+TrEdpw4UA3s9E/vKHPBwzvcgOZWaBw MQGWOfALgC/YOgkbVeu1ORij/6JoSB58k/1plT+cxwcZkMJoWesIZGdcSizp3sZZU09r Tv03MOscNiYDPTueW/1D27TgfbsFxH3X+BxnV7/KR0AT6NsxQoqMwg0Es/JlGjseugIX tFAwmyu1wYI8z2Zb280O6jBWdUxtlyXAvqlrK02dgEatEw53FFMztRCZE+C2oLfY58Cs JvEAw718WHYiCxA5B0nmyCMmmQ6q2PlBohu6p//IBstpLn2PXMx17AinQwCMmnz5agj2 OODA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rN+FKSSu08+DHPw8CrkteZtuqnyHsyWWICaqP0gDStY=; b=W5rJuKlZeUpIWsqgxzrt0gPwIrcMZtq/mbpQqUmo1XeM5jXX+vzz7Srhtj3ODqWETr jcXr99Ps0whYzYqMlv9FDY5NMSBlW+WoEQgccFNztpVhio6RU1A99JfzJrVrcaRgluCz V/ke/vYTDDHgtWGe77EAKNk91uqQJzooAw7yBhWwXfLpSDY0xbVUhwL5ud6XTo1bVkxn wX7xLLT1k0Ai6bXMGy5uYed5iTPDNW8pMVz8l6ghYh5vOtVlPaGxv3AidQe1Bxk50X/K FxTlsjG5A/ej2nHRaO5NJzdWLU7POcsjsOR9+fLIfPfKvwzR5DYnSvfrKn8elZNaN1uu vdOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="A/Q5vri9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si14582782eda.182.2020.11.17.10.51.37; Tue, 17 Nov 2020 10:52:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="A/Q5vri9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729683AbgKQSr7 (ORCPT + 99 others); Tue, 17 Nov 2020 13:47:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:43800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbgKQSr6 (ORCPT ); Tue, 17 Nov 2020 13:47:58 -0500 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (c-67-180-217-166.hsd1.ca.comcast.net [67.180.217.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C86BA238E6; Tue, 17 Nov 2020 18:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605638878; bh=0VPlLayVfnfP0kTDkgW/nx8/bnKhdiVjBpAwu/nEopc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A/Q5vri9xkq2Bn9JVhWHfott0RbPFvzFKSPZRgfZeVvCGwjjha2etXI6WqikvM7Zc PTrigx6P1WYm3gskVDaNr7DZYurqHWsqccgrVlVbXtnFzr8awtSd17ITtD/q/B283T 85a8uKDGHaH1LI755RhU6gkAqqHElLypnsHSrxDk= Date: Tue, 17 Nov 2020 10:47:56 -0800 From: Jakub Kicinski To: Andrew Lunn Cc: Sven Van Asbroeck , Bryan Whitehead , David S Miller , Microchip Linux Driver Support , Roelof Berg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1] lan743x: replace devicetree phy parse code with library function Message-ID: <20201117104756.766b5953@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201117020956.GF1752213@lunn.ch> References: <20201116170155.26967-1-TheSven73@gmail.com> <20201117020956.GF1752213@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Nov 2020 03:09:56 +0100 Andrew Lunn wrote: > On Mon, Nov 16, 2020 at 12:01:55PM -0500, Sven Van Asbroeck wrote: > > From: Sven Van Asbroeck > > > > The code in this driver which parses the devicetree to determine > > the phy/fixed link setup, can be replaced by a single library > > function: of_phy_get_and_connect(). > > > > Behaviour is identical, except that the library function will > > complain when 'phy-connection-type' is omitted, instead of > > blindly using PHY_INTERFACE_MODE_NA, which would result in an > > invalid phy configuration. > > > > The library function no longer brings out the exact phy_mode, > > but the driver doesn't need this, because phy_interface_is_rgmii() > > queries the phydev directly. Remove 'phy_mode' from the private > > adapter struct. > > > > While we're here, log info about the attached phy on connect, > > this is useful because the phy type and connection method is now > > fully configurable via the devicetree. > > > > Tested on a lan7430 chip with built-in phy. Verified that adding > > fixed-link/phy-connection-type in the devicetree results in a > > fixed-link setup. Used ethtool to verify that the devicetree > > settings are used. > > > > Tested-by: Sven Van Asbroeck # lan7430 > > Signed-off-by: Sven Van Asbroeck > > Reviewed-by: Andrew Lunn Applied, thanks!