mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacek Urbanowicz <jurbanowicz@google.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Antti Laakso <antti.laakso@linux.intel.com>,
	 Hans de Goede <johannes.goede@oss.qualcomm.com>,
	 Daniel Scally <dan.scally@ideasonboard.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	 Ricardo Ribalda <ribalda@chromium.org>,
	linux-media@vger.kernel.org,  linux-kernel@vger.kernel.org,
	stable@vger.kernel.org,
	 Jacek Urbanowicz <jurbanowicz@google.com>
Subject: [PATCH] media: i2c: ov5675: Use fwnode_graph_get_next_endpoint()
Date: Wed,  2 Dec 2026 13:03:24 +0000	[thread overview]
Message-ID: <20261202130324.1739821-1-jurbanowicz@google.com> (raw)

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

                 reply	other threads:[~2026-12-02 13:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261202130324.1739821-1-jurbanowicz@google.com \
    --to=jurbanowicz@google.com \
    --cc=antti.laakso@linux.intel.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®