Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3677087ybh; Tue, 17 Mar 2020 04:37:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwJvhAHSOLHej6i+uDJDhkBLHd/iJQMnlwXzZWwVoblsMUzZB9RUg6CHZ/dqZUSTv9zVeC X-Received: by 2002:a9d:66d5:: with SMTP id t21mr3258960otm.284.1584445059454; Tue, 17 Mar 2020 04:37:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584445059; cv=pass; d=google.com; s=arc-20160816; b=m9+uoP470Er9vC9h51VPL/WlDht9pwq2c+7cKZuyDrZfm0Fz256nVlQcfFpaX21W2I ePQyJz0KTG40MUma46voRbeBAnPeRpLPMMYrjjNiytgSTPwbh0vsyhIxYXYE6jw2ANTU bHbHl9Krw/rVrCUqvDHBiV5jUcJc8U8khWdNCOEPvWqRCkIWwG0DwZQZZNsp8qoW9eVr uQyo/U9JMJjFXEKw8vP1D9aQyHmBGp7AqL3t5RO5kO90GLU2CIq7K13NG8fb/O59uqfM eleHgagDO9vaEPAECvbQa3T0DZ1n1pTWavKih8Ub7txnpmrijmHsVYZPiiO8lNzrHJmY ue9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zQQJmgoDYJbWuBxC9YO0ZQG5YzULXKJ0XyD9y0sVRVU=; b=XoGUn0QLFPU46Hx7eNes8vYeCXmPRCK21jZzPLHyHM0oARnlfRXU7zXx71WrIKocz3 +r/jBIjr78TvCa/dL+wOQlI3IIoOnJ756Ma/gryT8rHufSAr9YT9bRGcQPPooAzM3gX3 /vuLeRpyS2Dshzn5qkqIA6jHgyA/G2HST/VN63UymhZodbRP+XGFBR0gJ6MsGRxyAoTd MMQpCTpDB18ITtEcBhnhC71+Odr91iUZAZ1DmPadS9MbeK29wWwKX5LrVzo1BEPpsv+M WEtLkYZb4uxMfxpTrP/TQHlawomVPEnDPk3zt81Zr39atW7ep5AQC98DKQF8qrGhJprV sKYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=XONFGi7l; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si1588228otp.98.2020.03.17.04.37.26; Tue, 17 Mar 2020 04:37: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=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=XONFGi7l; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbgCQLhI (ORCPT + 99 others); Tue, 17 Mar 2020 07:37:08 -0400 Received: from mail-vi1eur05on2089.outbound.protection.outlook.com ([40.107.21.89]:43744 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725794AbgCQLhI (ORCPT ); Tue, 17 Mar 2020 07:37:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XnCnIkMRl3E7z0eTDUxrJsKjo3V1aiBHX0UWxDz1NxGosum1xyruWOX3fwSRJga7XiDOexl9z6yOc8G5D6Edbq3sK5qqZGwBzdxdLiztyxsKm7F0B+ufJcSPXGC21flhk4/nrI8wno9eHIq7asuhCvbPGR2kQ0vCBA/f+RMUUBJq31TDfVnSqdOk63ckXVHcXJc2luRkmj+GUx7eHC4QWPbh7xnjgwX8m6dkobZbG3l53i/ac0P/kAl0s1ePnCTNZxe/+7uNe8YVwp0GxpNuboCZt0T43kGG9ua4mg8KQoRi+b8XFDsFQrh8c1hJH8yHalkrI8G86t/j36FGLCuStA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zQQJmgoDYJbWuBxC9YO0ZQG5YzULXKJ0XyD9y0sVRVU=; b=hMxuwYNgjTov2hISfgskotussrnNwXV+TWptSPslwQvU3Vu/2jV3BNVzplsybQH8zXnx37ol1GGwu66zsjImSRwSvCjC7Y9waJ4XmG3+MteFAM5Dqv5vJ2R09UOl/e/RMmrC5w2Z5P4trVUELGCE8M/Zfe1OKh2Xf7+xOzjLUrLYcoEp8TuHP+OW5QgfW8uQ4IZn4ty6cwyr8xT5fHWlSx+s7VzHHD9j7qjI0tYA91bIkOdZab6DRs8gk0tX4/Ho/WejJ0XYHDabJJMa7cv27ZvfgOjl5vIGnelIEgaJD/AVF3gGIJ0i1yaIxc9fIYbF16qWg91n8AJ8rzptmc7c/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zQQJmgoDYJbWuBxC9YO0ZQG5YzULXKJ0XyD9y0sVRVU=; b=XONFGi7lU465OsxyURNJYVKi0WBJPuqnTUoOJQOOG6Ozkjog+2s+ieoyehSQu7FisOtaOrm+cHwovQB2Ngdhp4csNUebYKeiC/Hn4FPJAZbimyhlPSIZuamjfLBNwk90uni9O8HeqtJYts5O7cE0+fyr4R5PEOoQ03dw0AB3CnI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=calvin.johnson@oss.nxp.com; Received: from AM0PR04MB5636.eurprd04.prod.outlook.com (20.178.202.86) by AM0PR04MB7153.eurprd04.prod.outlook.com (10.186.131.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.14; Tue, 17 Mar 2020 11:37:02 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::1b4:31d2:1485:6e07]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::1b4:31d2:1485:6e07%7]) with mapi id 15.20.2814.021; Tue, 17 Mar 2020 11:37:02 +0000 Date: Tue, 17 Mar 2020 17:06:50 +0530 From: Calvin Johnson To: Jeremy Linton Cc: 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 , Andrew Lunn , "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: <20200317113650.GA6016@lsv03152.swis.in-blr01.nxp.com> References: <20200131153440.20870-1-calvin.johnson@nxp.com> <20200131153440.20870-2-calvin.johnson@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200131153440.20870-2-calvin.johnson@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: SG2PR06CA0189.apcprd06.prod.outlook.com (2603:1096:4:1::21) To AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR06CA0189.apcprd06.prod.outlook.com (2603:1096:4:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15 via Frontend Transport; Tue, 17 Mar 2020 11:36:57 +0000 X-Originating-IP: [14.142.151.118] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 06da80fb-3b50-4769-bd85-08d7ca6782d6 X-MS-TrafficTypeDiagnostic: AM0PR04MB7153:|AM0PR04MB7153: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(136003)(376002)(396003)(39860400002)(346002)(199004)(186003)(16526019)(5660300002)(316002)(44832011)(86362001)(54906003)(956004)(66946007)(66556008)(66476007)(478600001)(33656002)(4326008)(1076003)(8676002)(9686003)(81156014)(81166006)(8936002)(55016002)(6666004)(1006002)(7696005)(52116002)(6506007)(2906002)(7416002)(6916009)(26005)(55236004)(110426005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB7153;H:AM0PR04MB5636.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0; Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Agx+6WwlUZMvMwY5+xvkIOeHOd/QHNIWUm+eoeWxHNsmNmSwjCLVOmG3PUsv0F8XkMaRe7CtERUUBC9OPi1sCv6+zFFtD/midMlERCSSjySuAHHF09le2QUSLxNM0UWOcEcEbY5jhlMYVX1aKZeuIoO1oV4G3K8IrSZ2CQ5jxDjCpUfdPpyE6rSvQ7SI61N0L4vGP+9DYQQDfxUkOf9uuJQPOR1k2ZgqOlyj4nWt98MA4RUXQNwCyCzi2cqOD/aFTjhI61B4QrBDtKF4Py+zWh2gz5TetW8WclWgR99DQt/VAR1jANCPjpWHUsBd+4472BFZdjRbH8gq2o4fTsKvwHNsYy5XlHw5tkNi3T4QL0AKyzRS6fJogEHZDv+wp8tPdlvCXELkIscUc8e7mAYzLjpITGMPH6EdQ1+P1MPtF8fYBmfcy7U/4CZ4lhyZBbQ8LS0AQtyVHGwjdNwS1XEKzkVrYfHhBIyK8Zm6gI+ityPMH0+z9Z00uZo0rALv9djd X-MS-Exchange-AntiSpam-MessageData: 3rfCOvF5xfeRXsvW2FnBpwFnosPqguOSzFU2zW8bBpdIEJ2/d1ZnA9IJIBUICQPyFGdsR9KC1cluct24VpLwx8EHcBUfsKsapC+w2+n04Pzm2T+RyZWWDrEzmIr9o4ISnz9bRlppuR58tMyEA+xA1g== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06da80fb-3b50-4769-bd85-08d7ca6782d6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2020 11:37:02.6285 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WqnHT2gOro7JKPiaWFCyl9vhpJB1JR82GWkXCLX5eDnn5DyBo/ihJu5i2pcePJ7fSHpNYFjAhXWZSux+GkebXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks Calvin