mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: i2c: ov5675: Use fwnode_graph_get_next_endpoint()
@ 2026-12-02 13:03 Jacek Urbanowicz
  0 siblings, 0 replies; only message in thread
From: Jacek Urbanowicz @ 2026-12-02 13:03 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab
  Cc: Antti Laakso, Hans de Goede, Daniel Scally, Hans Verkuil,
	Ricardo Ribalda, linux-media, linux-kernel, stable,
	Jacek Urbanowicz

Commit c409dea36f00 ("media: i2c: ov5675: Wait for endpoint") replaced
fwnode_graph_get_next_endpoint() with fwnode_graph_get_endpoint_by_id().
fwnode_graph_get_endpoint_by_id() requires the remote endpoint to
resolve to an available device.

On the Redrix Chromebook, the ACPI _DSD graph for OVTI5675 references
IPU0 port 1, while IPU0 defines port 2. Because port 1 does not exist,
fwnode_graph_get_endpoint_by_id() returns NULL.
v4l2_fwnode_endpoint_alloc_parse() then returns -EPROBE_DEFER on every
probe attempt, and the sensor fails to bind.

Restore fwnode_graph_get_next_endpoint() at the start of
ov5675_get_hwcfg(). On systems that use ipu-bridge,
fwnode_graph_get_next_endpoint() returns NULL until the driver attaches
the software node, so probe defers as before. This change restores
camera probing and capture on Redrix Chromebook hardware.

Fixes: c409dea36f00 ("media: i2c: ov5675: Wait for endpoint")
Cc: stable@vger.kernel.org
Signed-off-by: Jacek Urbanowicz <jurbanowicz@google.com>
---
 drivers/media/i2c/ov5675.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index a86f7af7798d..3d83a142dc7f 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -1182,8 +1182,12 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
 	if (!fwnode)
 		return -ENXIO;
 
-	ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
-					     FWNODE_GRAPH_ENDPOINT_NEXT);
+	/*
+	 * Do not use fwnode_graph_get_endpoint_by_id(). Some Chromebooks ship
+	 * broken ACPI tables where the remote-endpoint port does not match
+	 * the host port, so the remote availability check fails.
+	 */
+	ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
 	ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
 	fwnode_handle_put(ep);
 	if (ret)

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-02 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 13:03 [PATCH] media: i2c: ov5675: Use fwnode_graph_get_next_endpoint() Jacek Urbanowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®