Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1168590pxk; Fri, 18 Sep 2020 05:46:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytTtMiHko9RgPUo+kZsAJeh+Ri05l5vV4E2VLj4+36WYMzgeGY45JWTTE9qySgBzK2IVbO X-Received: by 2002:aa7:d296:: with SMTP id w22mr38615578edq.327.1600433165079; Fri, 18 Sep 2020 05:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600433165; cv=none; d=google.com; s=arc-20160816; b=dASVgRUAtW2zbXSm8YgRPlVyo7RhoQ11X5H0KiTaV1YtVgtH9l4VgJ061LGkn2ovuf Ggo2qJT3pvgdna4+u1tueuekvetWw3MqYAGUAY6rfGULsMmMS6rOPm5aQF5qK+h11TQi xVp6lOLWmLpd662YEOE4zRjGN8Egg7R/Uwbw4Ax5VPabZ5tSTGr20GcNVYOl5f4A7PzB OLRrGImuII3SmuxKk/JaJDUe+7R6RQ/SNZEKcRh1M0Bt5PmL1CE6G/r2Ylfr0eCIRJRy q0Sz9DAPprc2ggK9Ak8j9+1wI8zQS//TCygYV0qbNGFrq+RyWjh2Y9m3TYiwdqnjw5jP o2uw== 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=wHiwCas2Flt6ljdBW3Rggor+qOEvHW+YeNAPaEY7FEQ=; b=f38WWtPhrPLFKxFRLt0v4HAYeU93T8YqlFJOayj0j9JnMrSJTDpcsEGtW/0pG4WV/R pi1TGo7//ckOtx7V+BuXdOmDe5rC/ULwYBxWyvWpnC4Xt10nuQ0u713JCCZAVhR8NcsK nwX3ztgGNJL31oSS/cJWdnKLovYFeeWfx8IoUjDJDC5o4aL4EkWR7li5dNwuFn9k+FZ3 SX1YMltxcn3gDefTrZSTZXKOLcj1l6K9V8pj8Qr/XoTQFi2J+98QIYs7dv7i97w/iEQD CUJpaGiq19CW0yDnwrHQ+fOUgtWPl//WxVN5mhDitLgePwPJaTyN372TGUJf03LiMXDB hHgg== 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si2154475ejq.375.2020.09.18.05.45.41; Fri, 18 Sep 2020 05:46:05 -0700 (PDT) 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726392AbgIRMmH (ORCPT + 99 others); Fri, 18 Sep 2020 08:42:07 -0400 Received: from mga06.intel.com ([134.134.136.31]:51066 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgIRMmH (ORCPT ); Fri, 18 Sep 2020 08:42:07 -0400 IronPort-SDR: P+R7o6vUiPwg2ztVB4Bl6NGA1altU1K4ufd19k764z0BTSq5RXNEj036NRSmvJfZw4PqTbyfBE r7nMbT3qxQSA== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="221483497" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="221483497" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 05:42:06 -0700 IronPort-SDR: GSuMos98CwJ7VIRQPmMN9n0J29vwQjETsA+YfVUC259OSN1ws9GfxVs0zQXKoV08he8PFS9gMr BY7EboO4nZQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="336791627" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 18 Sep 2020 05:42:03 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kJFiC-00Ha71-8X; Fri, 18 Sep 2020 15:42:00 +0300 Date: Fri, 18 Sep 2020 15:42:00 +0300 From: Andy Shevchenko To: Sakari Ailus Cc: Dan Scally , gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, heikki.krogerus@linux.intel.com, kieran.bingham@ideasonboard.com, jorhand@linux.microsoft.com, kitakar@gmail.com Subject: Re: [PATCH v2] software_node: Add support for fwnode_graph*() family of functions Message-ID: <20200918124200.GY3956970@smile.fi.intel.com> References: <20200915232827.3416-1-djrscally@gmail.com> <20200916091707.GL834@valkosipuli.retiisi.org.uk> <7b81d743-736d-62d1-7072-d08759a0d5d7@gmail.com> <20200918062237.GP834@valkosipuli.retiisi.org.uk> <294db5cf-4c95-d56c-0a42-60ca95393c06@gmail.com> <20200918073433.GR834@valkosipuli.retiisi.org.uk> <9cdd8073-430b-773a-6aa7-4698110a5416@gmail.com> <20200918075741.GS834@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200918075741.GS834@valkosipuli.retiisi.org.uk> 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, Sep 18, 2020 at 10:57:41AM +0300, Sakari Ailus wrote: > On Fri, Sep 18, 2020 at 08:46:52AM +0100, Dan Scally wrote: > > On 18/09/2020 08:34, Sakari Ailus wrote: > > > On Fri, Sep 18, 2020 at 07:49:31AM +0100, Dan Scally wrote: ... > > > The secondary field is there for this purpose. But it may be not all fwnode > > > interface functions operate on fwnode->secondary? > > Let me test it; it might just require some changes to > > software_node_graph_get_port_parent() to check if the parent fwnode is a > > secondary, and if it is to return the primary instead. > > Ah, indeed. I forgot this part. I wonder if it'd cause issues to return the > primary if you've got the secondary swnode. > > Heikki, any idea? > > Code elsewhere (e.g. V4L2 fwnode framework + drivers) assume a device is > identified by a single fwnode, not two --- currently the swnode graph > function returning port parent returns the secondary so there's no match > with the primary fwnode. At least recently I made a patch (114dbb4fa7c4) to support secondary in device_get_next_child_node(). I'm not sure how we can do it on fwnode level. And now I'm thinking that above mentioned change is just particular case, but doesn't really move entire device property API to that. -- With Best Regards, Andy Shevchenko