[PATCH] media: i2c: ov5675: Use fwnode_graph_get_next_endpoint()

From: Jacek Urbanowicz

Date: Wed Dec 02 2026 - 08:04:00 EST


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@xxxxxxxxxxxxxxx
Signed-off-by: Jacek Urbanowicz <jurbanowicz@xxxxxxxxxx>
---
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