Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3813204ybh; Tue, 17 Mar 2020 07:05:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs7s2KHvskk6s1r9TtONy/hvJcm1CDXT4ABW1Qg0XLF0q6AsygfmtRZ9wj2Lsbj9vxWKjvA X-Received: by 2002:aca:c552:: with SMTP id v79mr3514388oif.156.1584453939955; Tue, 17 Mar 2020 07:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584453939; cv=none; d=google.com; s=arc-20160816; b=ydymLG6iv3fwgYzq/45D179Kwt6SP9WUF/wC4ySh8TLn/5uEvV7pB8mlIISDTK/Z3T i1LXkFESd4aYpGIRMWbeHzRnPvazgG3CnFqg1m1vzxzGx9tJprxe0uHUR31JE3H7Q/2/ 3PUMyVjOcT1kWO+zlHXrx4SYFuiXI9T5uWw7VZIDyPS9XecqE1uCKvHTDIFFeeVlcCJF yYysO0hvLdUIQQ7Hcot+/kun5LlqQ0X6GuW5OT8Jq7oMliKUM3KlRNF2GYMKLQJ5JSdv 8AmX+DYEo5F2xih6yNvR4cBcLGStx6bH5H3ctXDAD1ruYl/CifqNxIuh/LY9fJPPwtjw J3ig== 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=ULONFoFy52YeIq0i+dbx5LG9OZ6+gxXYBBy7AX4SKfw=; b=DZZ0mFiBDv5HE96bfEKvdmOY5N7N4Lob+xgt/cXCMLATdqHSJ1pn7uTxmZnKo0MlgY pZ43LcZNMvBvfmfOV0bwrnDGjK3lM5V2ed71UoDqJZacmlnpdK9x+wrcpJgh8MgwhFlb xxy9Yo5m6qrrj/ma5JoKVbwT37E/msPyqSLDlH/qGNHPvpigsY0sAX7u7XR2jT12syDB +h7ytxoaghkPlygzSRssYtIe6c0crf5yK8NOu4F+dI1izt+efIoho1zPTPm805gsLQ69 k8VwYmbharSshjIl+6Nze9R39XTfCKaAg/Xk67HrM6XGNk+1NUwUz11evbK2KFt2K0O+ n9CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tGznDHFI; 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 n62si1731541oig.196.2020.03.17.07.05.13; Tue, 17 Mar 2020 07:05:39 -0700 (PDT) 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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tGznDHFI; 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 S1726388AbgCQOEh (ORCPT + 99 others); Tue, 17 Mar 2020 10:04:37 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40840 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgCQOEh (ORCPT ); Tue, 17 Mar 2020 10:04:37 -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=ULONFoFy52YeIq0i+dbx5LG9OZ6+gxXYBBy7AX4SKfw=; b=tGznDHFIeW8VhzIHSfbLqJ1+wr j2UUnERSAtKsQ4z8PekGZm1l89ill9A6WnaQUchaxwOhvzjLQWojgtb7kBcTm0JiZYHGnqBcu9hju k00Pg7Am1r5+MhG/nB9MazCvE2TrOadbXhR+F54Bj52E3WDPRBhs3fmS8YxuuSj2rgQU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jECpW-0006lI-Pw; Tue, 17 Mar 2020 15:04:26 +0100 Date: Tue, 17 Mar 2020 15:04:26 +0100 From: Andrew Lunn To: Calvin Johnson Cc: Jeremy Linton , linux.cj@gmail.com, Jon Nettleton , linux@armlinux.org.uk, Makarand Pawagi , cristian.sovaiala@nxp.com, laurentiu.tudor@nxp.com, ioana.ciornei@nxp.com, V.Sethi@nxp.com, pankaj.bansal@nxp.com, "Rajesh V . Bikkina" , Marcin Wojtas , "David S. Miller" , Florian Fainelli , Heiner Kallweit , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v1 1/7] mdio_bus: Introduce fwnode MDIO helpers Message-ID: <20200317140426.GR24270@lunn.ch> References: <20200131153440.20870-1-calvin.johnson@nxp.com> <20200131153440.20870-2-calvin.johnson@nxp.com> <20200317113650.GA6016@lsv03152.swis.in-blr01.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200317113650.GA6016@lsv03152.swis.in-blr01.nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 05:06:50PM +0530, Calvin Johnson wrote: > Hi, > > On Fri, Jan 31, 2020 at 09:04:34PM +0530, Calvin Johnson wrote: > > > > > +/** > > + * fwnode_mdiobus_child_is_phy - Return true if the child is a PHY node. > > + * It must either: > > + * o Compatible string of "ethernet-phy-ieee802.3-c45" > > + * o Compatible string of "ethernet-phy-ieee802.3-c22" > > + * Checking "compatible" property is done, in order to follow the DT binding. > > + */ > > +static bool fwnode_mdiobus_child_is_phy(struct fwnode_handle *child) > > +{ > > + int ret; > > + > > + ret = fwnode_property_match_string(child, "compatible", > > + "ethernet-phy-ieee802.3-c45"); > > + if (!ret) > > + return true; > > + > > + ret = fwnode_property_match_string(child, "compatible", > > + "ethernet-phy-ieee802.3-c22"); > > + if (!ret) > > + return true; > > + > > + if (!fwnode_property_present(child, "compatible")) > > + return true; > > + > > + return false; > > +} > > Can we use _CID in ACPI to get the compatible string? Is there any other method > to handle this kind of situation where we would like to pass C45 or C22 info to > the mdiobus driver? Hi Calvin Is there any defacto standardised way to stuff this device tree property into ACPI? It is one of the key properties, so either there is one standard way, or lots of variants because nobody can be bothered to go to the ACPI standardisation body and get it formalised. Andrew