From: Alexander Patrakov <patrakov@gmail.com>
To: johannes.goede@oss.qualcomm.com
Cc: adee.sahan@gmail.com, andy@kernel.org,
antti.laakso@linux.intel.com, dan.scally@ideasonboard.com,
diamondback@cohunt.app, ilpo.jarvinen@linux.intel.com,
linux-media@vger.kernel.org, platform-driver-x86@vger.kernel.org,
sakari.ailus@linux.intel.com,
Alexander Patrakov <patrakov@gmail.com>
Subject: [PATCH 2/3] media: i2c: ov5675: Defer the probe until the endpoint exists
Date: Tue, 20 Oct 2026 09:50:00 +0800 [thread overview]
Message-ID: <20261020015001.15672-2-patrakov@gmail.com> (raw)
In-Reply-To: <20261020015001.15672-1-patrakov@gmail.com>
On ACPI systems the sensor's endpoint is a software node which ipu-bridge
creates when the IPU probes. Nothing orders that before the probe of the
sensor. If the sensor is first, there is no endpoint yet, parsing it
fails, and the probe fails for good: the camera is missing until the
next boot.
Return -EPROBE_DEFER when there is no endpoint, as ov2740, ov13b10 and,
since commit 437e1f6a9600 ("media: mt9m114: Return -EPROBE_DEFER if no
endpoint is found"), mt9m114 do.
This failure mode was seen once on a Lenovo Yoga Duet 7 13ITL6.
Reproduction efforts did not succeed.
Signed-off-by: Alexander Patrakov <patrakov@gmail.com>
---
drivers/media/i2c/ov5675.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index c5eb07576129..9cf600c9c94a 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -1182,8 +1182,16 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
if (!fwnode)
return -ENXIO;
+ /*
+ * On ACPI systems the endpoint is a software node which ipu-bridge
+ * creates when the IPU probes, which may be after this probe.
+ */
ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
FWNODE_GRAPH_ENDPOINT_NEXT);
+ if (!ep)
+ return dev_err_probe(dev, -EPROBE_DEFER,
+ "waiting for fwnode graph endpoint\n");
+
ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
--
2.56.0
next prev parent reply other threads:[~2026-10-20 1:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 14:17 [PATCH 0/5] platform/x86: int3472: Fix AVDD and add DOVDD + DVDD mappings Hans de Goede
2026-10-16 14:17 ` [PATCH 1/5] media: ov05c10: Support full range of power rails Hans de Goede
2026-10-17 7:20 ` Andy Shevchenko
2026-10-19 10:27 ` Dan Scally
2026-10-16 14:17 ` [PATCH 2/5] platform/x86: int3472: Rename DOVDD GPIO type to AVDD Hans de Goede
2026-10-19 7:32 ` Andy Shevchenko
2026-10-19 10:54 ` Dan Scally
2026-10-16 14:17 ` [PATCH 3/5] platform/x86: int3472: Add support for DOVDD and DVDD GPIO types Hans de Goede
2026-10-19 9:01 ` Andy Shevchenko
2026-10-19 11:02 ` Dan Scally
2026-10-16 14:17 ` [PATCH 4/5] platform/x86: int3472: Rename avdd_second_sensor to power_enable_second_sensor Hans de Goede
2026-10-19 10:52 ` Andy Shevchenko
2026-10-19 10:54 ` Dan Scally
2026-10-16 14:17 ` [PATCH 5/5] platform/x86: int3472: Properly map the AVDD GPIO type to a "avdd" regulator Hans de Goede
2026-10-19 11:01 ` Andy Shevchenko
2026-10-19 11:02 ` Dan Scally
2026-10-20 1:41 ` [PATCH 0/5] platform/x86: int3472: Fix AVDD and add DOVDD + DVDD mappings Alexander Patrakov
2026-10-20 1:49 ` [PATCH 1/3] media: ipu-bridge: Add sensor configuration for OV5675 (OVTI5678) Alexander Patrakov
2026-10-20 1:50 ` Alexander Patrakov [this message]
2026-10-20 6:34 ` [PATCH 2/3] media: i2c: ov5675: Defer the probe until the endpoint exists Andy Shevchenko
2026-10-20 8:39 ` Sakari Ailus
2026-10-20 1:50 ` [PATCH 3/3] media: i2c: ov5675: Add the OVTI5678 RGB-IR variant Alexander Patrakov
2026-10-20 6:42 ` Andy Shevchenko
2026-10-20 6:46 ` Alexander Patrakov
2026-10-20 8:42 ` Sakari Ailus
2026-10-20 8:57 ` Andy Shevchenko
2026-10-20 12:13 ` Uwe Kleine-König
2026-10-21 5:57 ` Andy Shevchenko
2026-10-21 7:57 ` Uwe Kleine-König
2026-10-20 6:07 ` [PATCH 1/3] media: ipu-bridge: Add sensor configuration for OV5675 (OVTI5678) Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020015001.15672-2-patrakov@gmail.com \
--to=patrakov@gmail.com \
--cc=adee.sahan@gmail.com \
--cc=andy@kernel.org \
--cc=antti.laakso@linux.intel.com \
--cc=dan.scally@ideasonboard.com \
--cc=diamondback@cohunt.app \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-media@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox