Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2804125rwd; Wed, 14 Jun 2023 07:33:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6f1u1yQnAAPYXaLr44+thWrWGr8BPSTvlaTQqkcOBmIQTBfC6YTmO+uMAQswe20mggXJJQ X-Received: by 2002:a17:907:728c:b0:96a:2acf:61e1 with SMTP id dt12-20020a170907728c00b0096a2acf61e1mr16369049ejc.64.1686753193510; Wed, 14 Jun 2023 07:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686753193; cv=none; d=google.com; s=arc-20160816; b=UW9OL7vt+SHQtHRhz6r2CfrXESETKjXOWInjjuINFJOIPAa18tTRcuLOy2YdjXbvFZ 4pu8YN5nX7sXYNBVePPF7V9AbrdcnQkeGioWIlRhcBr86ivufmSZPZO7Oo2ehjuKlHmB Kp0kMB5og9xsTWz9vAeZekOyi9QWAMDzk30493EPF0f42vbjUMlTindrn3B5O2hbqm6U Yc4RzYQBgLoKIFlBqxNIhsd+FwqNj7wkq7HOOr+Td/ZfNyi1k8+nP1mv/PPi6nfUtuEL TCaMwtVGyYbzOouy8mIwQgLMbgk1mt6ZzxaS5PDMK+vQ7lNX/3zd4yM6iOa0MasMqXWT jh+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OQRkWTdhNbie7Yl4fIjz8Y6us5dTHeT2K8OrGKpYQL4=; b=jbihoLq7mXJ87c1OeU0ADoC+hwRutVTCnSw6/Az38OTGwXrPqD0RMLABN/BvuXUvyy zDGzcHWmSoA3wxftOGZcpWovzIQou54PQKBDQCUHAxbYXJeoNpF6ElOdptQ7iVKWiLFx 20q+8wq97eMsoi5bbBCxtq0zsZGFJNFNW2oVWVu5qhe626WUoequa6yXzEPt6+bjiQeF lrB84EFNdqmxVTclS8IEPd4op88VbLpL0LSjmzYJN8d3mV4IdVOedf/OJXPY6TcH6Cc9 nnC3S35pcs3rbpN4gdGsJWaWwYpVF27shZizAwY4WXnDi3SYpEm49dnuzRQE5KUcQwjj uugg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aqq448jA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i26-20020a17090639da00b00977d4e6a752si8352448eje.794.2023.06.14.07.32.48; Wed, 14 Jun 2023 07:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aqq448jA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245221AbjFNNtT (ORCPT + 99 others); Wed, 14 Jun 2023 09:49:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245104AbjFNNtA (ORCPT ); Wed, 14 Jun 2023 09:49:00 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFFF62111 for ; Wed, 14 Jun 2023 06:48:54 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f8c5d0b19dso7761385e9.1 for ; Wed, 14 Jun 2023 06:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686750533; x=1689342533; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OQRkWTdhNbie7Yl4fIjz8Y6us5dTHeT2K8OrGKpYQL4=; b=Aqq448jAHiIwXH3/IJT3LEIxt4F5v8CwOyZkG1Q2UzwGPabABPECfaLNCNAvCnvDwZ gCXV5JTwBXdtzH0KS1YGyhwBHhlvfP7nRABfqJKwG28qCPlBymNOejmEy5dy6yI9MSBT beeAemXmymLJgNN/B+a+wHWIhz9AGkkGz5/jcGZrT8zrG5Q/4ePHpeePVnN4KTdzmobv 6+J+96PKFuZBdadmhKDNr/aRL9Lf9GJYRZe034YD3owARdzfN4IV8YOe3LE7qOnYKPF6 yD265lGDYe0Ywj3zxBd+JNiNcFvFwEgsOcsayk8c7FMR6GMZDuPzehgMaSvKeNZ4L2pL bSRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686750533; x=1689342533; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OQRkWTdhNbie7Yl4fIjz8Y6us5dTHeT2K8OrGKpYQL4=; b=cZTuLMwxkuvqfQYKgVNiZ7UU1xZYDd8EqGCQRDIQuJzq1d6dp3T2ORNAWyFa/6tDjo WK3qlNnaGoZ0qDps1jAXWmjFNwPHm39X7i7jDrwja4cjX706+sEv6Inx+sn4o+0+N5LS 2ciTla0o2998S5YrRkJevXjFPS+tY9e9/Tzou3cNPDDKTEvCv2seurrg5Tz1Gve3BOkU oIWX8aJZm1Sf4ritsY569125nTfd1Xl+m03PguCfjnB66SLNVLIRRBZ3lgA5OrdX8oiy tSqjM1qzS50gMb5aFL9nVU7wRHngIXwcBBiYLQdEu1ris+Ki1d2hpGEkXPRp70M78JSm W1bQ== X-Gm-Message-State: AC+VfDzYPQ8eTs5gijcnwDLtZd0IGLOqiFzT3bmU9ZPG+4YPqaLdxXNU 8OZZe3tESAQ+jMG4DKO444qxcA== X-Received: by 2002:a5d:4e85:0:b0:30a:d2e6:6a78 with SMTP id e5-20020a5d4e85000000b0030ad2e66a78mr10286179wru.24.1686750533132; Wed, 14 Jun 2023 06:48:53 -0700 (PDT) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id d17-20020a5d6dd1000000b003095bd71159sm18424339wrz.7.2023.06.14.06.48.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jun 2023 06:48:52 -0700 (PDT) Message-ID: <8f53da6d-76ec-a7e1-8308-b676930d224c@linaro.org> Date: Wed, 14 Jun 2023 14:48:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFC] media: camss: Intepret OF graph connections more sensibly Content-Language: en-US To: Konrad Dybcio , Robert Foss , Todor Tomov , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab Cc: Marijn Suijten , Yassine Oudjana , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230614-topic-camss_grpah-v1-1-5f4b516310fa@linaro.org> From: Bryan O'Donoghue In-Reply-To: <20230614-topic-camss_grpah-v1-1-5f4b516310fa@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/06/2023 14:22, Konrad Dybcio wrote: > Not all endpoints of camss have to be populated. In fact, most of the > time they shouldn't be as n-th auxilliary cameras are usually ewaste. > > Don't fail probing the entire camss even even one endpoint is not > linked and throw an error when none is found. > > Signed-off-by: Konrad Dybcio > --- > drivers/media/platform/qcom/camss/camss.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c > index 1ef26aea3eae..3aa03fbc94e2 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -1084,9 +1084,8 @@ static int camss_of_parse_ports(struct camss *camss) > > remote = of_graph_get_remote_port_parent(node); > if (!remote) { > - dev_err(dev, "Cannot get remote parent\n"); > - ret = -EINVAL; > - goto err_cleanup; > + of_node_put(node); > + continue; > } > > csd = v4l2_async_nf_add_fwnode(&camss->notifier, > @@ -1105,7 +1104,7 @@ static int camss_of_parse_ports(struct camss *camss) > num_subdevs++; > } > > - return num_subdevs; > + return num_subdevs ? num_subdevs : -EINVAL; > > err_cleanup: > of_node_put(node); > > --- > base-commit: b16049b21162bb649cdd8519642a35972b7910fe > change-id: 20230614-topic-camss_grpah-39f9a4f7420c > > Best regards, Can you give an example of the DT that is causing this ? --- bod