[PATCH v12 51/86] media: ov2740: Add metadata layout control

Sakari Ailus
2026-04-09T20:14:56Z

Add the V4L2_CID_METADATA_LAYOUT control to the sub-device's control
handler, to convey the metadata layout for the sensor-generated embedded
data.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/ov2740.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
index cc9cd7ccbf1f..3308c51933aa 100644
--- a/drivers/media/i2c/ov2740.c
+++ b/drivers/media/i2c/ov2740.c
@@ -807,7 +807,7 @@ static int ov2740_init_controls(struct ov2740 *ov2740)
int ret;

ctrl_hdlr = &ov2740->ctrl_handler;
- ret = v4l2_ctrl_handler_init(ctrl_hdlr, 12);
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 13);
if (ret)
return ret;

@@ -862,6 +862,9 @@ static int ov2740_init_controls(struct ov2740 *ov2740)
V4L2_CID_CFA_PATTERN_FLIP,
0, V4L2_CFA_PATTERN_FLIP_BOTH,
0, V4L2_CFA_PATTERN_FLIP_BOTH);
+ v4l2_ctrl_new_std(ctrl_hdlr, NULL, V4L2_CID_METADATA_LAYOUT,
+ 0, V4L2_METADATA_LAYOUT_OV2740,
+ 1, V4L2_METADATA_LAYOUT_OV2740);

ret = v4l2_fwnode_device_parse(ov2740->dev, &props);
if (ret) {
--
2.47.3