Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1D18C433E0 for ; Fri, 22 Jan 2021 17:13:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF202233FA for ; Fri, 22 Jan 2021 17:13:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF202233FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UT58IzMe2L/G4f8UTQhoGaLIBZmjhHkYn5UTJ15xDW4=; b=aKiU1Ek0gwbEReGYxj4BhAUp7 c3tYHbqGDalAqOPkwoRE17RUawUuXkaRWX+SCBhmuLOzsdq9VOuOxg7JwFy45zIuGMksLH/4xLNMR MI/KwcDNUXiy2m+SLJpeeEVzwfIE3/02i7AlyQ8BSBf01WqJSf6RbL8CTlF7cHiZD7naH+EOD7eDK og5TzhatmO5el/NQ6Fsckpl6TdJlq/CfoMwMmzADpqt7hixtHrZs4ZwdFuifgO3T6EFxTeSeEBcbb jgXv2y5vYGHZbHr3Qq7dsLuOSrbru3GBkzG4L5RwPPqOiXOHQsS5XMYcTBtpoDcRvqm6Aq2tGFWor Wz2ei8nFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2zz0-0001lC-3v; Fri, 22 Jan 2021 17:12:26 +0000 Received: from mga12.intel.com ([192.55.52.136]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2zyx-0001k2-Ih for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 17:12:24 +0000 IronPort-SDR: RYdUoEP6+PS16/Qur47bNG4LnOgsLzO0NJZXOKmCDhZPshKJRnJknoyV63jdAfxR3pfSEcZS5b FlW1v5dSpFyw== X-IronPort-AV: E=McAfee;i="6000,8403,9872"; a="158655015" X-IronPort-AV: E=Sophos;i="5.79,367,1602572400"; d="scan'208";a="158655015" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2021 09:12:20 -0800 IronPort-SDR: yqnk3jB27YouuRgleyQwzREUrl8c55y4GP7bS5wDjn5bCM+PbC1W/kJLjfowYeSQPfjqW48Wr7 9v4ATfdIQ8WA== X-IronPort-AV: E=Sophos;i="5.79,367,1602572400"; d="scan'208";a="571191463" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2021 09:12:13 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l2zzm-009DzL-8d; Fri, 22 Jan 2021 19:13:14 +0200 Date: Fri, 22 Jan 2021 19:13:14 +0200 From: Andy Shevchenko To: "Rafael J. Wysocki" Subject: Re: [net-next PATCH v4 09/15] device property: Introduce fwnode_get_id() Message-ID: References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-10-calvin.johnson@oss.nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_121223_761293_B12F745C X-CRM114-Status: GOOD ( 18.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Heikki Krogerus , Grant Likely , Calvin Johnson , Ioana Ciornei , Florian Fainelli , Saravana Kannan , Bartosz Golaszewski , Jon , Russell King - ARM Linux admin , Diana Madalina Craciun , ACPI Devel Maling List , Kieran Bingham , Laurentiu Tudor , Madalin Bucur , Pieter Jansen Van Vuuren , Laurent Pinchart , Marcin Wojtas , Linux ARM , Florin Laurentiu Chiculita , netdev , Randy Dunlap , Linux Kernel Mailing List , Jeremy Linton , Cristi Sovaiala , "linux.cj" , Greg Kroah-Hartman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 22, 2021 at 05:40:41PM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 22, 2021 at 4:46 PM Calvin Johnson > wrote: > > > > Using fwnode_get_id(), get the reg property value for DT node > > or get the _ADR object value for ACPI node. > > So I'm not really sure if this is going to be generically useful. > > First of all, the meaning of the _ADR return value is specific to a > given bus type (e.g. the PCI encoding of it is different from the I2C > encoding of it) and it just happens to be matching the definition of > the "reg" property for this particular binding. > IOW, not everyone may expect the "reg" property and the _ADR return > value to have the same encoding and belong to the same set of values, I have counted three or even four attempts to open code exact this scenario in the past couple of years. And I have no idea where to put a common base for them so they will not duplicate this in each case. > so maybe put this function somewhere closer to the code that's going > to use it, because it seems to be kind of specific to this particular > use case? -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel