Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2189182pxb; Fri, 5 Feb 2021 11:04:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwOGGp55nnaVJFJ2EIujEnplvwhQOjgFycEHeuSX5hOLjx+LB/7he/bP7dyJqFCW7Yu3rY X-Received: by 2002:a17:906:c0cd:: with SMTP id bn13mr5158759ejb.368.1612551842410; Fri, 05 Feb 2021 11:04:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612551842; cv=none; d=google.com; s=arc-20160816; b=oqMRzl9tcYnHInYrVND7Qaite0R8q9mKUPuo5u6Pzug3mRQ0Xw/gkbaKi0fYB/YTqB D/oJ4w4AqDiWfjrbaoFU0V1RUYxVeoIpXDV7Cq4uuyU+UfIk4jLCTnuVArdpJGs8ZMgm MjZYN/jTh7Bi7pGdaoyXDRfxycAIv95nsZgeypAn2rybVmuZyCqJ9s1Py0KWGEjQzdU7 s45eQ9Uj92rBevU4huZNg1CaAP724tH0i19hxYsZTV6PgLQiDDtmqh0GMg37wzDwfLIU gij2BMLdCf7AlvOW4gDpCgcFpzlLzgmxzbRFGOqeBrMp1ST8PReMyARO+lr27YY9eVvA zKPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oStFooJPSyUUPaehiSFgmVTUpU7SYl2th8Aozvagcww=; b=J9qxtbnteZ6goeln5lzQH0wjC7Xdlf9or5GT6Po1iwUR2uzBUxj7MjGgW9YTekMUaK zEJUK1Mx541ROny+QCYGRfQyGab09Bt5SY/RdKFdltbMYgQl53/nG7Kn5BHqmYYebhw7 96chJApk7fnWWvC/0RVfhAkHHSwpH2EAPFHneq3C1lT3ZLi5idTxPRIuHudSfysEZkV6 Ne6MMo8DJzcTVrPKGPJogFBttEmqn6ozey0GfgCIh/sjcEba4Bz1haHgQZCMVWVt0NF0 Xf6ozk5uokmeeBfGDKJNB5ASmk7mLHn3TZZDSN1AGVLG3HeqNC7qsPklFSW6YqUaJV5b LZ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ItJfVIaS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si5478430edd.589.2021.02.05.11.03.37; Fri, 05 Feb 2021 11:04:02 -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=@gmail.com header.s=20161025 header.b=ItJfVIaS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbhBERTF (ORCPT + 99 others); Fri, 5 Feb 2021 12:19:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233041AbhBERQl (ORCPT ); Fri, 5 Feb 2021 12:16:41 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DEA4C061756; Fri, 5 Feb 2021 10:58:23 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id g15so4343804pjd.2; Fri, 05 Feb 2021 10:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oStFooJPSyUUPaehiSFgmVTUpU7SYl2th8Aozvagcww=; b=ItJfVIaS/zVvcDySM5ApBDGERunskRhZ3z4O5TXYHyiSpMzUgrJX6WwfClue2kx3Lb Iwr2Q2pLa4Dza8Uff/8DLU0E9nIaoLYGSNRAD6FYdZ4sd3NHC1SQFU8Grb4KQLGlvB3N UxXj1L1A45RefWcslfKPfH43PVjvpsmHbAz4mTKH4qqdvKYjSKaAi8qv4F0QtyMFIN0n R0CGBO0eYcSNT3f5V5UhdBA8hs+yhJ9swzpWm3eeuGg5ydqUZ0rVzlPiqwcg7T9/1itn 3QiK73GGY+pvbVp7V3Q+keN6lvy1aaceeB1fOAgFlVVkMp6wYIYe5YqedV7Bs0I2uYUg t0dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oStFooJPSyUUPaehiSFgmVTUpU7SYl2th8Aozvagcww=; b=KvjP0cIMNOKvbRMjGMQ2fjIGwMnLlME2lZk43HOzVP9RJlosiN2OASU40BUiVzk7Y5 jKhypH4CIfgqe7wEgOfascObAj0GPn9JiXrp6Aua999LlKKi7db4Zu/HTSp6PaxcDHVi 2mnbA4VgZk3UnuXTvHd5hP93/ekaY0HoyCv9kkby1sx2nL9fmj8o4qh5M/tMYQ4TXEdi +74LWe0x7cj1GQAc7PfWnGRNU6UdwMP25z41ABZXMRB23jSonMzB/hix+VCqVoMMBtgW JS8rW7dItlBETOlqTsySX+Kjnw0KCpXTWsl4UMIcZP+ElRibExDtnSY5ClANloTR0VB6 qK8Q== X-Gm-Message-State: AOAM531Urc7UEDbA1VQfQ4Dhzr9s7xD7BntXMn57F76KhrOFuW3sgxiA Iq9RGy6iBvRjv3CVZlpdFM+lH66sCFNd17OfKcU= X-Received: by 2002:a17:902:b190:b029:df:fff2:c345 with SMTP id s16-20020a170902b190b02900dffff2c345mr5119652plr.17.1612551503103; Fri, 05 Feb 2021 10:58:23 -0800 (PST) MIME-Version: 1.0 References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-8-calvin.johnson@oss.nxp.com> <20210205172518.GA18214@lsv03152.swis.in-blr01.nxp.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 5 Feb 2021 20:58:06 +0200 Message-ID: Subject: Re: [net-next PATCH v4 07/15] net: mdiobus: Introduce fwnode_mdiobus_register_phy() To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , "linux.cj" , Diana Madalina Craciun , ACPI Devel Maling List , linux-arm Mailing List , Linux Kernel Mailing List , netdev , Laurentiu Tudor , "David S. Miller" , Frank Rowand , Heiner Kallweit , Jakub Kicinski , Rob Herring , devicetree Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 5, 2021 at 8:41 PM Andy Shevchenko wrote: > On Fri, Feb 5, 2021 at 8:25 PM Andy Shevchenko > wrote: > > On Fri, Feb 5, 2021 at 7:25 PM Calvin Johnson > > wrote: > > > On Fri, Jan 22, 2021 at 09:12:52PM +0530, Calvin Johnson wrote: > > > > ... > > > > > > + rc = fwnode_property_match_string(child, "compatible", "ethernet-phy-ieee802.3-c45"); > > > With ACPI, I'm facing some problem with fwnode_property_match_string(). It is > > > unable to detect the compatible string and returns -EPROTO. > > > > > > ACPI node for PHY4 is as below: > > > > > > Device(PHY4) { > > > Name (_ADR, 0x4) > > > Name(_CRS, ResourceTemplate() { > > > Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) > > > { > > > AQR_PHY4_IT > > > } > > > }) // end of _CRS for PHY4 > > > Name (_DSD, Package () { > > > ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > > > Package () { > > > > Package () {"compatible", "ethernet-phy-ieee802.3-c45"} > > I guess converting this to > Package () {"compatible", Package() {"ethernet-phy-ieee802.3-c45"}} > will solve it. For the record, it doesn't mean there is no bug in the code. DT treats a single string as an array, but ACPI doesn't. And this is specific to _match_string() because it has two passes. And the first one fails. While reading a single string as an array of 1 element will work I believe. > > > } > > > > }) > > > } // end of PHY4 > > > > > > What is see is that in acpi_data_get_property(), > > > propvalue->type = 0x2(ACPI_TYPE_STRING) and type = 0x4(ACPI_TYPE_PACKAGE). > > > > > > Any help please? > > > > > > fwnode_property_match_string() works fine for DT. > > > > Can you show the DT node which works and also input for the > > )match_string() (i.o.w what exactly you are trying to match with)? -- With Best Regards, Andy Shevchenko