From: Isaac Scott <isaac.scott@ideasonboard.com>
To: mchehab@kernel.org
Cc: laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com,
david.plowman@raspberrypi.com, naush@raspberrypi.com,
kieran.bingham@ideasonboard.com, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org,
Isaac Scott <isaac.scott@ideasonboard.com>
Subject: [PATCH] v4l: controls: Add v4l2 control to store camera module identifier
Date: Tue, 21 Oct 2025 13:41:21 +0100 [thread overview]
Message-ID: <20251021124121.93907-1-isaac.scott@ideasonboard.com> (raw)
Add a new v4l2 control ID that would be used by drivers to store a
string representing a SKU or other vendor-specific camera module
identifier. This would be used to tell user space which specific type of
camera module is present in the system.
Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
---
Hi all,
This patch builds on the discussion here:
https://lore.kernel.org/all/20250507081338.53614-1-sakari.ailus@linux.intel.com/
regarding the need to be able to identify camera modules. This is useful
when modules need to use the base driver of the camera sensor they
include, but need adjustments to account for different module features.
The driver, or potentially core v4l2, would be responsible for setting
this as a read-only control containing the SKU, or a vendor-specific
identifier for a camera module.
A SKU is expected to cover the sensor (found in the compatible string),
as well as the lens / packaging. For example, Raspberry Pi produce an
IMX708 camera module with several variations; a lot of code duplication
could be avoided in user space applications if a camera module
identifier was available.
These could be expressed through the SKU instead of variations of the
compatible string.
This would allow user space programs, such as libcamera, to select
different configurations specific to that module to account for
differences in lens characteristics, different CCMs, and more.
Tested on media/next
Best wishes,
Isaac
---
include/uapi/linux/v4l2-controls.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 2d30107e047e..39267bdd5286 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -1102,6 +1102,8 @@ enum v4l2_auto_focus_range {
#define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36)
+#define V4L2_CID_CAMERA_MODULE_IDENTIFIER (V4L2_CID_CAMERA_CLASS_BASE+37)
+
/* FM Modulator class control IDs */
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
--
2.43.0
next reply other threads:[~2025-10-21 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 12:41 Isaac Scott [this message]
2025-10-22 11:18 ` [PATCH] v4l: controls: Add v4l2 control to store camera module identifier 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=20251021124121.93907-1-isaac.scott@ideasonboard.com \
--to=isaac.scott@ideasonboard.com \
--cc=david.plowman@raspberrypi.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=naush@raspberrypi.com \
--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