diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2018-11-12 11:00:54 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-23 04:47:45 -0500 |
commit | bedfcd467c33976c4a25ccafb3c6a61f88fc5511 (patch) | |
tree | 04ebd3bd78be610bd6ec8f39c2f4f548599a4dc9 /drivers/media/i2c/ov772x.c | |
parent | 7852adf83cdd466b08f6d8204bf704dfa748408d (diff) | |
download | linux-bedfcd467c33976c4a25ccafb3c6a61f88fc5511.tar.gz linux-bedfcd467c33976c4a25ccafb3c6a61f88fc5511.tar.bz2 linux-bedfcd467c33976c4a25ccafb3c6a61f88fc5511.zip |
media: ov772x: support log_status ioctl and event interface
This adds log_status ioctl and event interface for ov772x's v4l2 controls.
Cc: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov772x.c')
-rw-r--r-- | drivers/media/i2c/ov772x.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index fefff7fd7d68..2e9a758736a1 100644 --- a/drivers/media/i2c/ov772x.c +++ b/drivers/media/i2c/ov772x.c @@ -30,6 +30,7 @@ #include <media/v4l2-ctrls.h> #include <media/v4l2-device.h> +#include <media/v4l2-event.h> #include <media/v4l2-image-sizes.h> #include <media/v4l2-subdev.h> @@ -1287,6 +1288,9 @@ static const struct v4l2_ctrl_ops ov772x_ctrl_ops = { }; static const struct v4l2_subdev_core_ops ov772x_subdev_core_ops = { + .log_status = v4l2_ctrl_subdev_log_status, + .subscribe_event = v4l2_ctrl_subdev_subscribe_event, + .unsubscribe_event = v4l2_event_subdev_unsubscribe, #ifdef CONFIG_VIDEO_ADV_DEBUG .g_register = ov772x_g_register, .s_register = ov772x_s_register, @@ -1379,7 +1383,8 @@ static int ov772x_probe(struct i2c_client *client, mutex_init(&priv->lock); v4l2_i2c_subdev_init(&priv->subdev, client, &ov772x_subdev_ops); - priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; v4l2_ctrl_handler_init(&priv->hdl, 3); /* Use our mutex for the controls */ priv->hdl.lock = &priv->lock; |