[2/4] libcamera: controls: Add CAMERA_MODULE_IDENTIFIER
diff mbox series

Message ID 20251023105651.78395-3-isaac.scott@ideasonboard.com
State New
Headers show
Series
  • libcamera: controls: Add support for camera module identifiers
Related show

Commit Message

Isaac Scott Oct. 23, 2025, 10:56 a.m. UTC
Add a string control, and the necessary V4L2_CID to support a read-only
string payload. This can be used to store a string identifying a variant
of a camera sensor (more accurately, a unique module including that
camera sensor).

The addition to v4l2-controls.h to add V4L2_CID_CAMERA_MODULE_IDENTIFIER has
been posted upstream here:

https://lore.kernel.org/linux-media/aPi9c_c9f0dkduLA@kekkonen.localdomain/

Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
---
 include/linux/v4l2-controls.h        | 2 ++
 src/libcamera/property_ids_core.yaml | 8 ++++++++
 2 files changed, 10 insertions(+)

Patch
diff mbox series

diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 4cfae0414..b96142c46 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -1095,6 +1095,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)
diff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml
index 834454a4e..5f47a4ea7 100644
--- a/src/libcamera/property_ids_core.yaml
+++ b/src/libcamera/property_ids_core.yaml
@@ -701,4 +701,12 @@  controls:
 
         Different cameras may report identical devices.
 
+  - CameraModuleIdentifier:
+      type: string
+      description: |
+        Specify the camera module identifier.
+
+        The camera module identifier is a string that uniquely identifies the
+        camera module. It is used to select the appropriate tuning file for
+        the camera device.
 ...