Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp366189ybs; Sun, 24 May 2020 07:47:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyj1I67UhIEyHuC1hnnd5znvlSKEimR6xs8mQqyfSuit08jvoAwViHAhqGvj9AYorBagtJ X-Received: by 2002:a50:d1d3:: with SMTP id i19mr11021574edg.35.1590331621257; Sun, 24 May 2020 07:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590331621; cv=none; d=google.com; s=arc-20160816; b=letcbR+inQBEvshOStEQi8aM2CmQnwhts8eTTeo8Be4d4fVKQymFQwweg315j8Qmd9 6a2WnRApfJaWhlnhRApC94AbXzwolOFcrVm+yrYTwD9plqL3S7WZXi0EaKEZUBHueaip tqv5a/CG4dX/5/y8d2aFRfz+1oCcDAYbwWX9z1ktdk4VJC3/fxxdEr0NImwlWZ3r/hYb Xhgu8sqggwvZBrFtgYKVrJGHcYO6t46RZqL/7AUPVHA04eaibC5SfrJlBx68QJpP4sgt ue3FPmASVUDuPYaChpYlEvOysWHd6r+C9XbKoTcXULM+8wJmOZfjo0Cl1JJGAvZ73Cxr Qjow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=r5lP4P/zXAC9X9cI/T0QNDk1uosk4NujHsVjZWzO95Q=; b=Mzu5wcaf8ijDrdxXk8xOqtum4kRdnPso2EsfNmZHdRXoY8cgiwxdGU2xKOVgqsMUzB awC6MGtOOOCsY25Qi+DedUkwaJv+bGOfnlVnHHbn+tV6V+HiWw/tvM25VnrQ77MqnsIl wdtwwwUCtM1br4z9pw6kX0OvmHZB6tsGmg5T2WiAUK0WP8JIa35crRsQ6+UPkBpKPMYh CA9GJ/hbkTPUGFAD22Y0C9Px0B9Yv1bWgv3SRTh9TSPPQmQ+do+QwFxXToZXFvB8twSP F17x0ZMilq+q2B5PRp8LSo443ZRs96UlziLFVQOFlpNqPDCBqL4etRntN8SX/l4DNCxr 47rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=MeBd19A0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si7852117edo.137.2020.05.24.07.46.38; Sun, 24 May 2020 07:47:01 -0700 (PDT) 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=fail header.i=@lunn.ch header.s=20171124 header.b=MeBd19A0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387594AbgEXOpA (ORCPT + 99 others); Sun, 24 May 2020 10:45:00 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46914 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727985AbgEXOpA (ORCPT ); Sun, 24 May 2020 10:45:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=r5lP4P/zXAC9X9cI/T0QNDk1uosk4NujHsVjZWzO95Q=; b=MeBd19A0+gN1tME6e05fLVAtcy n8sBeTMNhzmHBZTvAeSgIeFP5blPB74PPAJrKmYQH60kddNcsyv9QHchSENHDkhrsdv7ff6mG7cSG EsOtIxLgkNnvkKGOMVg1JM8g2Mq3ptxMRCrGTNaYtphxf9kZu7aEjwKIMuqVC7uSSv0o=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jcrrt-0037ra-Lq; Sun, 24 May 2020 16:44:49 +0200 Date: Sun, 24 May 2020 16:44:49 +0200 From: Andrew Lunn To: Jeremy Linton Cc: netdev@vger.kernel.org, davem@davemloft.net, f.fainelli@gmail.com, hkallweit1@gmail.com, linux@armlinux.org.uk, madalin.bucur@oss.nxp.com, calvin.johnson@oss.nxp.com, linux-kernel@vger.kernel.org Subject: Re: [RFC 08/11] net: phy: Allow mdio buses to auto-probe c45 devices Message-ID: <20200524144449.GP610998@lunn.ch> References: <20200522213059.1535892-1-jeremy.linton@arm.com> <20200522213059.1535892-9-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522213059.1535892-9-jeremy.linton@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +++ b/include/linux/phy.h > @@ -275,6 +275,11 @@ struct mii_bus { > int reset_delay_us; > /* RESET GPIO descriptor pointer */ > struct gpio_desc *reset_gpiod; > + /* bus capabilities, used for probing */ > + enum { > + MDIOBUS_C22_ONLY = 0, > + MDIOBUS_C45_FIRST, > + } probe_capabilities; > }; I'm not so keen on _FIRST. It suggest _LAST would also be valid. But that then suggests this is not a bus property, but a PHY property, and some PHYs might need _FIRST and other phys need _LAST, and then you have a bus which has both sorts of PHY on it, and you have a problem. So i think it would be better to have enum { MDIOBUS_UNKNOWN = 0, MDIOBUS_C22, MDIOBUS_C45, MDIOBUS_C45_C22, } bus_capabilities; Describe just what the bus master can support. Andrew