From nobody Fri Oct 3 10:15:11 2025 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B392DAFDD; Wed, 3 Sep 2025 10:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756895002; cv=none; b=j0A5Is6jZU4prJpxVNXTqd1hcKHWOqbpqeQdgAIocZFxVquIJJwMbl2+4IdFUc6Ygc8oFmqQA3xTMl1Vn+YFC0ARBvQ59hZXBPwQv3zisCegG9V7E+/mKzWZlONqtGla4JBV4gxn9WSj6GGB2kIMrsFufTj+wt94pyA5IIf5YnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756895002; c=relaxed/simple; bh=wKtrXGuOI00qmTLY6sya8CgZIXHv8Sh4X0UtJ+kBBos=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ecmHqdSFWCz9DJcMQezvBz0wpozzVU3Wdb4kPxh3mIxAvkBw8A67k7Aai6XvWkXFthA53AQepv2FlUtFZCT/6wOKRkCR9TNSSnsMpmssLCQqBM52PMIxIIW9JWRE5XB3EDLxWbPEDNqUcrp00a7rOrZcUhjvFzogQ92rok/UKXA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=SN0HIu0m; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SN0HIu0m" Received: from isaac-ThinkPad-T16-Gen-2.lan (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D495EF0F; Wed, 3 Sep 2025 12:22:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1756894927; bh=wKtrXGuOI00qmTLY6sya8CgZIXHv8Sh4X0UtJ+kBBos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SN0HIu0mSKVqZ8lzu0YoXTlyHir/zVF2lCG49uM02XG7n/1AQnOyDMnG3tnUCL39L h9JM6T3P1dqqS0jen8OQ366bKeCST1CGk8QdkQ4Vlzy8iqFhGDjCrbAVX+IyKfF/d+ hFr9J4DB+txdNoBe3xHSA66sNjYACn6nyi9dSUfY= From: Isaac Scott To: laurent.pinchart@ideasonboard.com Cc: rmfrfs@gmail.com, martink@posteo.de, kernel@puri.sm, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hverkuil@kernel.org, nicolas.dufresne@collabora.com, sakari.ailus@linux.intel.com, tomi.valkeinen@ideasonboard.com, jonas@kwiboo.se, dan.scally+renesas@ideasonboard.com, m.szyprowski@samsung.com, mehdi.djait@linux.intel.com, niklas.soderlund+renesas@ragnatech.se, Isaac Scott Subject: [PATCH v2 2/3] media: imx-mipi-csis: Store the number of data_lanes configured in dt Date: Wed, 3 Sep 2025 11:22:41 +0100 Message-ID: <20250903102243.1563527-3-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250903102243.1563527-1-isaac.scott@ideasonboard.com> References: <20250903102243.1563527-1-isaac.scott@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The number of lanes actively used by a MIPI CSI transmitter may differ from that which is defined in device tree. To allow us to be able to set the number of configured lanes without changing the maximum lane count, store the number of lanes configured in device tree, and adjust the debug print to reflect the device tree value. Signed-off-by: Isaac Scott --- drivers/media/platform/nxp/imx-mipi-csis.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/pla= tform/nxp/imx-mipi-csis.c index 2beb5f43c2c0..fc89325f2f94 100644 --- a/drivers/media/platform/nxp/imx-mipi-csis.c +++ b/drivers/media/platform/nxp/imx-mipi-csis.c @@ -313,6 +313,8 @@ struct mipi_csis_device { u32 hs_settle; u32 clk_settle; =20 + unsigned int max_data_lanes; + spinlock_t slock; /* Protect events */ struct mipi_csis_event events[MIPI_CSIS_NUM_EVENTS]; struct dentry *debugfs_root; @@ -1299,8 +1301,9 @@ static int mipi_csis_async_register(struct mipi_csis_= device *csis) } =20 csis->bus =3D vep.bus.mipi_csi2; + csis->max_data_lanes =3D vep.bus.mipi_csi2.num_data_lanes; =20 - dev_dbg(csis->dev, "data lanes: %d\n", csis->bus.num_data_lanes); + dev_dbg(csis->dev, "data lanes: %d\n", csis->max_data_lanes); dev_dbg(csis->dev, "flags: 0x%08x\n", csis->bus.flags); =20 asd =3D v4l2_async_nf_add_fwnode_remote(&csis->notifier, ep, --=20 2.43.0