* [PATCH] media: i2c: ov5693: Support control events
@ 2026-10-10 14:20 Simon Kruse
0 siblings, 0 replies; only message in thread
From: Simon Kruse @ 2026-10-10 14:20 UTC (permalink / raw)
To: Daniel Scally
Cc: Sakari Ailus, Mauro Carvalho Chehab, linux-media, linux-kernel
The sensor subdev exposes controls but does not implement the control
event operations, so VIDIOC_SUBSCRIBE_EVENT fails and v4l2-compliance
reports:
fail: v4l2-test-controls.cpp(1128): subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
Add the standard control event subdev operations and set
V4L2_SUBDEV_FL_HAS_EVENTS.
Signed-off-by: Simon Kruse <simon0x+git@proton.me>
---
Tested on a Microsoft Surface Pro 9 (Intel Alder Lake, IPU6, OVTI5693) with
media-committers next at d7e7bca71. v4l2-compliance 1.32.0 on the sensor
subdev node: 45/46 without this patch, 46/46 with it.
drivers/media/i2c/ov5693.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 56599f9ca..5cddd46b3 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -26,6 +26,7 @@
#include <media/v4l2-cci.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
+#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
/* System Control */
@@ -1095,7 +1096,13 @@ static const struct v4l2_subdev_pad_ops ov5693_pad_ops = {
.get_frame_interval = ov5693_get_frame_interval,
};
+static const struct v4l2_subdev_core_ops ov5693_core_ops = {
+ .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
+ .unsubscribe_event = v4l2_event_subdev_unsubscribe,
+};
+
static const struct v4l2_subdev_ops ov5693_ops = {
+ .core = &ov5693_core_ops,
.video = &ov5693_video_ops,
.pad = &ov5693_pad_ops,
};
@@ -1336,7 +1343,8 @@ static int ov5693_probe(struct i2c_client *client)
return dev_err_probe(&client->dev, ret,
"Error fetching regulators\n");
- ov5693->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+ ov5693->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
+ V4L2_SUBDEV_FL_HAS_EVENTS;
ov5693->pad.flags = MEDIA_PAD_FL_SOURCE;
ov5693->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-10 14:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-10 14:20 [PATCH] media: i2c: ov5693: Support control events Simon Kruse
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®