summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-11-19 17:35:49 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-12 17:02:28 +0100
commitdc3373081396f5317f8f0b593a2cb644c4e1786e (patch)
tree2aa3ae0ea214984cfdc945798235ee75b1961b8c /drivers/media/i2c
parentd07440702da0ff084f2bb97b1396d75fd7acc53f (diff)
downloadlinux-dc3373081396f5317f8f0b593a2cb644c4e1786e.tar.bz2
media: ov5647: Support VIDIOC_SUBSCRIBE_EVENT
The driver reports the V4L2_SUBDEV_FL_HAS_EVENTS flag but does not support subscribing and unsubscribing to events. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov5647.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 963f51656266..be40c60ab7ee 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -24,6 +24,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
+#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-image-sizes.h>
#include <media/v4l2-mediabus.h>
@@ -979,6 +980,8 @@ static int ov5647_sensor_set_register(struct v4l2_subdev *sd,
/* Subdev core operations registration */
static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
+ .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
+ .unsubscribe_event = v4l2_event_subdev_unsubscribe,
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = ov5647_sensor_get_register,
.s_register = ov5647_sensor_set_register,