Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1155315pxv; Fri, 23 Jul 2021 00:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUg8xbPdN7CN1dqnqR3KSjToHIh4YZIJxJMq8POjjRVHUfXge7OLq2RiwPJpAiGyFjuvPB X-Received: by 2002:a5e:d508:: with SMTP id e8mr3075374iom.101.1627026616138; Fri, 23 Jul 2021 00:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627026616; cv=none; d=google.com; s=arc-20160816; b=ByGpR5CtzHlPjxUsc0Gu3+SOVA9cvo6qbqriZ+P4MRHhqJ2EQyuhJdBKPmGiNuMltL Hc3+3a9bC4eHTriLM+tsrGhCOkVIvxZY99Jdp9kpHUgeL8dCECC/NE9v68rf3h3ti+TN 0m3B+WyOa7jFoJZiuetOox4ysIEToEHHsgrYOWDUpS4LDrpPd89+NWmvGncuTBM3Ku0S IDFSpPC/8K+fIGq3Bum05WHzTF/tC9gp9qWDivRIdvAQmPCWxlMYVNXucFP+/f5XMtnO mfRD0NY0NoR34lwrWY/+6EnbkMwALX52j1/hqcyc83WxZ4kMeM/pR2P7RP73m5CYdQyo dgqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vH4NN1JKdnmJNe3OgTydWLGZ+QLLJqk8h9IK+FZUAds=; b=ak+qMsLY36w/vCOy3xC378zSW7+BOveh3/EZnaikRHf3pXekoyIRTvy27b9VU9uXiT s4g3cGYzXAw90nBJk2A1eBZnZIKfmXfoSUZKbxsqHQLVXSMub6yWCh5/s4dargCLzYXK akUfAL+ihNJSfg1+wvHeyVNzxn2/6hY+6iR9eieAIlTnzulkp7oMzdKaXAKT/DX0iO7b 4oIb1bAqKoRGqK5CubfVByjg5ZcH2aVA4LFCubZT8LwARnekgsJfHkdjMzKbV9zWfDZP fJuf24Wz54pDEdJ2eaDAkh6Qq08n2hCl1kZocCVFbjHpmoHitHc9wj1x1MLr4aonQQ44 X6bw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si33342819ile.21.2021.07.23.00.50.04; Fri, 23 Jul 2021 00:50:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233934AbhGWHIm (ORCPT + 99 others); Fri, 23 Jul 2021 03:08:42 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60759 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233470AbhGWHIm (ORCPT ); Fri, 23 Jul 2021 03:08:42 -0400 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id CB6EE1BF205; Fri, 23 Jul 2021 07:49:12 +0000 (UTC) Date: Fri, 23 Jul 2021 09:49:12 +0200 From: Paul Kocialkowski To: Daniel Scally Cc: Mauro Carvalho Chehab , Sakari Ailus , Ezequiel Garcia , Hans Verkuil , Yang Li , "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" , open list , Yong Zhi , Bingbu Cao , Tianshu Qiu , Colin Ian King , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH 03/13] media: i2c: Defer probe if not endpoint found Message-ID: References: <20210722203407.3588046-1-djrscally@gmail.com> <20210722203407.3588046-4-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="slgiAgGpNAwPPDiS" Content-Disposition: inline In-Reply-To: <20210722203407.3588046-4-djrscally@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --slgiAgGpNAwPPDiS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Daniel, On Thu 22 Jul 21, 21:33, Daniel Scally wrote: > The ov8865 driver is one of those that can be connected to a CIO2 > device by the cio2-bridge code. This means that the absence of an > endpoint for this device is not necessarily fatal, as one might be > built by the cio2-bridge when it probes. Return -EPROBE_DEFER if no > endpoint is found rather than a fatal error. Is this an error that you have actually seen in practice? My understanding is that this function should return the handle to the *loc= al* fwnode graph endpoint, which relates to the static device-tree description and should be unrelated to another driver probing. So as far as I can see, this should not be needed (but correct me if I'm wr= ong). Cheers, Paul > Signed-off-by: Daniel Scally > --- > drivers/media/i2c/ov8865.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c > index 2ef146e7e7ef..66182142c28b 100644 > --- a/drivers/media/i2c/ov8865.c > +++ b/drivers/media/i2c/ov8865.c > @@ -2796,10 +2796,8 @@ static int ov8865_probe(struct i2c_client *client) > /* Graph Endpoint */ > =20 > handle =3D fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); > - if (!handle) { > - dev_err(dev, "unable to find endpoint node\n"); > - return -EINVAL; > - } > + if (!handle) > + return -EPROBE_DEFER; > =20 > sensor->endpoint.bus_type =3D V4L2_MBUS_CSI2_DPHY; > =20 > --=20 > 2.25.1 >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --slgiAgGpNAwPPDiS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmD6dHMACgkQ3cLmz3+f v9G1Jgf9GNDyXph0+194du9GMYzYfiE9uT6e9UZGa+J8ExQNITtcudiCoYVdJYYz /yql25CDVUtWdR2S8pt/bdwTtIX7hiAmeAMn/66fL+TGXf/FWwSevt29wg9xGhto 4j6VhX0YLIBmdfItPtajAYjC0YyCk6Ifkib/yOClgzwTTBXdRymHE8jTw8++sOfb FxN+7OtFLN+g4u/re5CYe3FDH347Q05eBBssILwaAfnsuxbSGLVq3EclGxHqmMf6 92j2vCSe9euuGjbeNTrC05rGKJEos3bcmdCnAMby8Fs+N4s2CuAs+Hq9OKs89/L1 e1Qp6Bdm7m08m7dCE4MvNAoCQ8e6wg== =IGHw -----END PGP SIGNATURE----- --slgiAgGpNAwPPDiS--