From: Tarang Raval <tarang.raval@siliconsignals.io>
To: sakari.ailus@linux.intel.com, kieran.bingham@ideasonboard.com
Cc: Shravan.Chippa@microchip.com,
Tarang Raval <tarang.raval@siliconsignals.io>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Zhi Mao <zhi.mao@mediatek.com>,
Julien Massot <julien.massot@collabora.com>,
Luis Garcia <git@luigi311.com>,
Umang Jain <umang.jain@ideasonboard.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/9] media: i2c: imx334: Configure lane mode Dynamically
Date: Sat, 29 Mar 2025 11:13:26 +0530 [thread overview]
Message-ID: <20250329054335.19931-5-tarang.raval@siliconsignals.io> (raw)
In-Reply-To: <20250329054335.19931-1-tarang.raval@siliconsignals.io>
Configure the lane mode dynamically from the streaming
function instead of using a hardcoded value.
Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
---
drivers/media/i2c/imx334.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index 9d4d15df8dcf..f7be303af024 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -47,6 +47,8 @@
#define IMX334_EXPOSURE_DEFAULT 0x0648
#define IMX334_REG_LANEMODE CCI_REG8(0x3a01)
+#define IMX334_CSI_4_LANE_MODE 3
+#define IMX334_CSI_8_LANE_MODE 7
/* Window cropping Settings */
#define IMX334_REG_AREA3_ST_ADR_1 CCI_REG16_LE(0x3074)
@@ -240,7 +242,6 @@ static const struct cci_reg_sequence common_mode_regs[] = {
{ IMX334_REG_HADD_VADD, 0x00 },
{ IMX334_REG_VALID_EXPAND, 0x03 },
{ IMX334_REG_TCYCLE, 0x00 },
- { IMX334_REG_LANEMODE, 0x03 },
{ IMX334_REG_TCLKPOST, 0x007f },
{ IMX334_REG_TCLKPREPARE, 0x0037 },
{ IMX334_REG_TCLKTRAIL, 0x0037 },
@@ -876,6 +877,13 @@ static int imx334_start_streaming(struct imx334 *imx334)
return ret;
}
+ ret = cci_write(imx334->cci, IMX334_REG_LANEMODE,
+ IMX334_CSI_4_LANE_MODE, NULL);
+ if (ret) {
+ dev_err(imx334->dev, "failed to configure lanes\n");
+ return ret;
+ }
+
ret = imx334_set_framefmt(imx334);
if (ret) {
dev_err(imx334->dev, "%s failed to set frame format: %d\n",
--
2.34.1
next prev parent reply other threads:[~2025-03-29 5:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-29 5:43 [PATCH v2 0/9] media: i2c: imx334: Miscellaneous cleanups and improvements Tarang Raval
2025-03-29 5:43 ` [PATCH v2 1/9] media: i2c: imx334: Simplify with dev_err_probe() Tarang Raval
2025-03-29 5:43 ` [PATCH v2 2/9] media: i2c: imx334: Convert to CCI register access helpers Tarang Raval
2025-03-29 5:43 ` [PATCH v2 3/9] media: i2c: imx334: Remove redundant register entries Tarang Raval
2025-03-29 5:43 ` Tarang Raval [this message]
2025-03-29 5:43 ` [PATCH v2 5/9] media: i2c: imx334: Fix power management and control handling Tarang Raval
2025-03-29 5:43 ` [PATCH v2 6/9] media: i2c: imx334: Fix runtime PM handling in remove function Tarang Raval
2025-03-29 5:43 ` [PATCH v2 7/9] media: i2c: imx334: Enable runtime PM before sub-device registration Tarang Raval
2025-03-29 5:43 ` [PATCH v2 8/9] media: i2c: imx334: Use subdev state lock for synchronization Tarang Raval
2025-03-29 5:43 ` [PATCH v2 9/9] media: i2c: imx334: switch to {enable,disable}_streams Tarang Raval
2025-04-15 9:23 ` [PATCH v2 0/9] media: i2c: imx334: Miscellaneous cleanups and improvements Tarang Raval
2025-04-25 5:54 ` sakari.ailus
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=20250329054335.19931-5-tarang.raval@siliconsignals.io \
--to=tarang.raval@siliconsignals.io \
--cc=Shravan.Chippa@microchip.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=git@luigi311.com \
--cc=hverkuil@xs4all.nl \
--cc=julien.massot@collabora.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=umang.jain@ideasonboard.com \
--cc=zhi.mao@mediatek.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
all inboxes | Powered by JetHome®