From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Jai Luthra <jai.luthra@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Alexander Shiyan <eagle.alexander923@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: [PATCH v6 16/18] media: sony-starvis2: Parameterise the mono ID register
Date: Thu, 22 Oct 2026 18:34:09 +0100 [thread overview]
Message-ID: <20261022-media-starvis2-v6-16-374343f55fd3@raspberrypi.com> (raw)
In-Reply-To: <20261022-media-starvis2-v6-0-374343f55fd3@raspberrypi.com>
All sensors to this point have used register 0x4d18[0]
to signal whether it is a mono or colour module.
IMX585 uses a different register (0x5a18[0]), so parameterise
which register to use.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/media/i2c/sony-starvis2.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c
index 15d5a066a556..b526ea3ce2e4 100644
--- a/drivers/media/i2c/sony-starvis2.c
+++ b/drivers/media/i2c/sony-starvis2.c
@@ -97,7 +97,6 @@
#define STARVIS2_REG_WINMODEV CCI_REG8(0x3021)
/* Sensor Identification */
-#define STARVIS2_REG_MONOCHROME CCI_REG8(0x4d18)
#define STARVIS2_TYPE BIT(0)
#define STARVIS2_MODULE_ID_DELAY 80000
@@ -629,6 +628,7 @@ struct starvis2_variant {
u32 id_mask;
u32 id_value;
u32 interface_sel_reg;
+ u32 mono_id_reg;
struct v4l2_rect native_area;
struct v4l2_rect active_area;
u64 pixel_rate;
@@ -649,6 +649,7 @@ static const struct starvis2_variant imx678_variant_def = {
.id_mask = 0x3ff,
.id_value = 0x2a6,
.interface_sel_reg = CCI_REG8(0x4e3c),
+ .mono_id_reg = CCI_REG8(0x4d18),
.native_area = {
.top = 0,
.left = 0,
@@ -782,6 +783,7 @@ static const struct starvis2_variant imx662_variant_def = {
.id_reg = CCI_REG16_LE(0x4d1c),
.id_mask = 0x3ff,
.id_value = 0x296,
+ .mono_id_reg = CCI_REG8(0x4d18),
.native_area = {
.top = 0,
.left = 0,
@@ -972,6 +974,7 @@ static const struct starvis2_variant imx675_variant_def = {
.id_reg = CCI_REG16_LE(0x4d12),
.id_mask = 0xfff,
.id_value = 0x576,
+ .mono_id_reg = CCI_REG8(0x4d18),
.native_area = {
.top = 0,
.left = 0,
@@ -1068,6 +1071,7 @@ static const struct starvis2_variant imx832_variant_def = {
.id_reg = CCI_REG16_LE(0x4d1c),
.id_mask = 0x3ff,
.id_value = 0x340,
+ .mono_id_reg = CCI_REG8(0x4d18),
.native_area = {
.top = 0,
.left = 0,
@@ -1675,7 +1679,7 @@ static int starvis2_identify_model(struct starvis2 *starvis2)
goto err_standby;
}
- cci_read(starvis2->cci, STARVIS2_REG_MONOCHROME, &val, &ret);
+ cci_read(starvis2->cci, variant->mono_id_reg, &val, &ret);
if (ret) {
dev_err(&client->dev,
--
2.34.1
next prev parent reply other threads:[~2026-10-22 17:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 17:33 [PATCH v6 00/18] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 01/18] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 02/18] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 03/18] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 04/18] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 05/18] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-22 17:33 ` [PATCH v6 06/18] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 07/18] media: sony-starvis2: Correct the exposure range Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 08/18] media: sony-starvis2: Put module into standby after identify Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 09/18] media: sony-starvis2: Use pm_runtime_autosuspend Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 10/18] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 11/18] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 12/18] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 13/18] media: sony-starvis2: Add support for IMX832 Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 14/18] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 15/18] media: sony-starvis2: Parameterise exposure min and step Dave Stevenson
2026-10-22 17:34 ` Dave Stevenson [this message]
2026-10-22 17:34 ` [PATCH v6 17/18] media: sony-starvis2: Add support for IMX585 Dave Stevenson
2026-10-22 17:34 ` [PATCH v6 18/18] media: sony-starvis2: Add support for IMX676 Dave Stevenson
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=20261022-media-starvis2-v6-16-374343f55fd3@raspberrypi.com \
--to=dave.stevenson@raspberrypi.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eagle.alexander923@gmail.com \
--cc=jai.luthra@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.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®