Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1235979pxb; Fri, 22 Jan 2021 10:12:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnsKuxBDoaTH8q/zTlo/qf90BeZjCI3ewxst99PcTGVT9WoxwSUs5DYkTeSc50B0FM5/CA X-Received: by 2002:a17:906:b41:: with SMTP id v1mr3768292ejg.277.1611339173920; Fri, 22 Jan 2021 10:12:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611339173; cv=none; d=google.com; s=arc-20160816; b=oSaOU3AQIIC4B/W7ZB7mBuUDo6CzHSJmBMSL+lhxhNQ1cLyyhEYyK3ouegqZywb6tY QO0XpCmVWJSDgBDoolNugYsQpv7upt6d/Y05LDT+jbKK2N87d4EsgHjImWez4a5/NM44 VYZosF/S613MVSIrYFhEIbW1WcLA80DoPMdu3Dd7Xvey0logUoP0QFHgGBjXPX+bX9l+ 7TQEhbfuZq0PZ2WhxaqYi0NDmIVm0BIpi19tsXfWz2sTlU2kmP1RgeqB6QMuDmrD7ig6 6fhKuvipCJ7BGrGz3S8+1iklggA1yWZ33hX4TnRtSS95AP1E7ePRzmGL7BCAewD7Ytr2 D3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=lC4TqP4+l4yJK1qEdp6Y/iXzbpaZnQZXQM0HqLwJF8E=; b=cfcsnl510QoI3B7m98VzQE3gb9Ly9/7/ld7UzUlsQDwGiRUr2JHRe5oPURcQ7oqgxm OdStkFDkgbtKCzC/T0HvWn09sUamkOSKbzoxf9wO6+UVwOToT4anIRE6QTQjEoM7WnyO TT5ZQNDiEJHmCrrSgOcZw1h40UxaGhMaKv9JJBGMwS+ON/5+mJATpnobxK0n1F4Cbyxx zMchbMx/qTVE4TtEOM9H30PgTaLuUxeW2KVW56WMDsNJEZdbAvJRyKX0u0nrdCtLlMR1 EsxDGyOtJ6op5hABzgQpRbMUKiLs9VQBT2AMyqd5wb6zGo5iJxpieQcOwIi/i7bXfMXq 3jkQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 l14si3982318edv.597.2021.01.22.10.12.29; Fri, 22 Jan 2021 10:12:53 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729114AbhAVR0g (ORCPT + 99 others); Fri, 22 Jan 2021 12:26:36 -0500 Received: from mga01.intel.com ([192.55.52.88]:29322 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729805AbhAVRNF (ORCPT ); Fri, 22 Jan 2021 12:13:05 -0500 IronPort-SDR: avJ7zOLMX10DdlUu09FWHPMf29Mapoe8xdie2xT8q6sX1OTz4qg8azh3t1/XAT3hwps+wr40U6 oyHDcnYWOV8A== X-IronPort-AV: E=McAfee;i="6000,8403,9872"; a="198233178" X-IronPort-AV: E=Sophos;i="5.79,367,1602572400"; d="scan'208";a="198233178" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.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" Cc: Calvin Johnson , Grant Likely , 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 , Linux Kernel Mailing List , netdev , Laurentiu Tudor , Bartosz Golaszewski , Greg Kroah-Hartman , Kieran Bingham , Laurent Pinchart 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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