Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3829980pxu; Tue, 20 Oct 2020 01:19:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDes1LShbK1fqLZI7LaTy403nVS2Tc88ECBXK4EgfvaBcGCLihXK3W8XHL+0C/fpoNlY0n X-Received: by 2002:a50:a452:: with SMTP id v18mr1515525edb.143.1603181990843; Tue, 20 Oct 2020 01:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603181990; cv=none; d=google.com; s=arc-20160816; b=Kvrpe52/bzRRwGHKEcBfcEyypgHK2zBIVUDy+P/2ZpX8u6mmNezzuouMFqLM63TTbh zXZMb2QGeuTYCIzcNgNx/O0KAkneQybs/SWNOw6Mv/dFP9YzsdiNrLcq0fZmfbRk7JN9 l9NRQrh365IGKhJTCZM9seW4vpCyX8sQWo7RoMaYlxJXnhlb1vJLi414ve5ePw1Knzcs HfoZstMI8dMjL+CGlzGskS5kT8BAWBfuN36IEzwSNv3zEPK7MxEtauIcX1Sdkt2QC0sR Ug2628QaltRmmCMPqqlgujr3LSJ8xKTRj6uNeMcTQpbgWgr5PQFcoPBMncXLdwxF0T5G /cJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=uXAvp5LtBdgbmLALmSSkahZ9MLe+wKaeLg7vdYQ5N7s=; b=ktqPtiapUdZAB70ivl1CMb5mWvNcsehoIBM3dLbut+4YwbrhMlq9wtbZwOSmmkYNhg WXZ67iIU1xEY6gTi8aRwvYZ2hkO2+OB1BtJgUrhYae3jTQLCjhg2eiCoV0ijeyR1PcF+ dfL0V6ajcw2xVFovm4x3W4ir07djHQzE1aDDNaCVbF2/Uou5kCkTI+D5RiDtHI4+cwsW X46iBPUehYbreESED9uTnX4nmPM2tLveVa3LUfY3rkZLl3cvKLfv1+gN5XH7AyVX1yPt 90Nmul2NcIuROvIl/49c6u0EyNMJjRPVSsce96lBhjNxYAN6szxgZFIujdz1sTRff4lw 4diA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ju9qu2KV; 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 lu17si765964ejb.24.2020.10.20.01.19.28; Tue, 20 Oct 2020 01:19:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ju9qu2KV; 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 S2388848AbgJSW7s (ORCPT + 99 others); Mon, 19 Oct 2020 18:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388777AbgJSW7e (ORCPT ); Mon, 19 Oct 2020 18:59:34 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EAF6C0613D0; Mon, 19 Oct 2020 15:59:34 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id p15so51061wmi.4; Mon, 19 Oct 2020 15:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uXAvp5LtBdgbmLALmSSkahZ9MLe+wKaeLg7vdYQ5N7s=; b=Ju9qu2KVU0kjcYhZtRrgsEZobWmPqSRsa1sUQxIaabHIlhXB/5GnDaMp18EAqaxEeA 1ITA1BoCcxRAEIvYzFwmKUjmXKkMUdqJv41Rh0/gtF6IKgPQVoMPhKPFZ2j/9sDaaHcl y8GwLmrg/PTnNzqaoEUHokTdyHxbaDksWub4pfL4FlqaYSFZ4qs0Tw1+YUS1D1AFT2vr 7B0DEukrXPppkF9zt+aUk231pLPriBkmAJasfW13ryy3Y/BT4rvNmLRB6Wr6SoRa5IEG VD0fOlWnIIoGYKtLrE8BirOcvTtYY67H+PDUQGkD89HyOU3gxdAQNM+9kluBHPl4QJMd VllA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uXAvp5LtBdgbmLALmSSkahZ9MLe+wKaeLg7vdYQ5N7s=; b=YcDGQD9f3wZMNmXkZZM8Ovy/nsg6lMvOPPFFC4Ybd6EwYuVdC1auksjsZ3f7S6Sbo2 DN/QSsdzvrqb6T/BpNIkqhOJrMeMm4KmwzC6IFlmEUaXK1REJrYrBiQnW2SCZf7Bx2AQ jIjH/le+krskLue5dh+vkgMOc27TotGaq8j9P6oZbe8GChRfPUVbJuyPABhDo6ju36Q6 0gVqi+AfuC4nS0PEGZ0JK6XGy4Ty+6AxXb86kZilJfA1ofkUyGQnq0IZ1lrOD1Lb/ToT h+8ipxcEC0A6lDYVJ5FD6pgxlNx4N4w8b0EPZQ9cz6+pI96Y0yQy/ConahY6VWGZ6GND k1Cw== X-Gm-Message-State: AOAM531nELD8eiKAgWV9jB1AwSSVZ/aN4RrCc1YQdT3T8nN+S9P+S/+2 g7sI2FGHBTPUXZ8poFlm6bcETYVNF6hdY4HR X-Received: by 2002:a1c:3285:: with SMTP id y127mr89507wmy.183.1603148372632; Mon, 19 Oct 2020 15:59:32 -0700 (PDT) Received: from djrscally-MIIX-510-12ISK.home ([2.26.187.29]) by smtp.gmail.com with ESMTPSA id u20sm76505wmm.29.2020.10.19.15.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 15:59:32 -0700 (PDT) From: Daniel Scally To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: linux.walleij@linaro.org, prabhakar.mahadev-lad.rj@bp.renesas.com, heikki.krogerus@linux.intel.com, dmitry.torokhov@gmail.com, laurent.pinchart+renesas@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, jacopo+renesas@jmondi.org, robh@kernel.org, davem@davemloft.net, linux@rasmusvillemoes.dk, andriy.shevchenko@linux.intel.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, pmladek@suse.com, mchehab@kernel.org, tian.shu.qiu@intel.com, bingbu.cao@intel.com, sakari.ailus@linux.intel.com, yong.zhi@intel.com, rafael@kernel.org, gregkh@linuxfoundation.org, kitakar@gmail.com, dan.carpenter@oracle.org Subject: [RFC PATCH v3 8/9] media: v4l2-core: v4l2-async: Check possible match in match_fwnode based on sd->fwnode->secondary Date: Mon, 19 Oct 2020 23:59:02 +0100 Message-Id: <20201019225903.14276-9-djrscally@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019225903.14276-1-djrscally@gmail.com> References: <20201019225903.14276-1-djrscally@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Where the fwnode graph is comprised of software_nodes, these will be assigned as the secondary to dev->fwnode. Check the v4l2_subdev's fwnode for a secondary and attempt to match against it during match_fwnode() to accommodate that possibility. Signed-off-by: Daniel Scally --- Changes in v3: - patch introduced drivers/media/v4l2-core/v4l2-async.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index e3ab003a6..6486dbde7 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -87,6 +87,14 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier, if (sd->fwnode == asd->match.fwnode) return true; + /* + * Check the same situation for any possible secondary assigned to the + * subdev's fwnode + */ + if ((!IS_ERR_OR_NULL(sd->fwnode->secondary)) && + sd->fwnode->secondary == asd->match.fwnode) + return true; + /* * Otherwise, check if the sd fwnode and the asd fwnode refer to an * endpoint or a device. If they're of the same type, there's no match. -- 2.17.1