diff options
author | Akinobu Mita | 2019-01-08 15:51:48 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2019-01-25 13:56:00 +0100 |
commit | dd15f0702f12cf80ecebe173c6b04ec3dfa10703 (patch) | |
tree | 57eb0bfa96bc95f25eda9158437aa865b14c301f /drivers/media | |
parent | media: mt9m001: register to V4L2 asynchronous subdevice framework (diff) | |
download | kernel-qcow2-linux-dd15f0702f12cf80ecebe173c6b04ec3dfa10703.tar.gz kernel-qcow2-linux-dd15f0702f12cf80ecebe173c6b04ec3dfa10703.tar.xz kernel-qcow2-linux-dd15f0702f12cf80ecebe173c6b04ec3dfa10703.zip |
media: mt9m001: support log_status ioctl and event interface
This adds log_status ioctl and event interface for mt9m001's v4l2 controls.
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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')
-rw-r--r-- | drivers/media/i2c/mt9m001.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index 94c9919963b4..479e42dffd2e 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -17,6 +17,7 @@ #include <media/v4l2-ctrls.h> #include <media/v4l2-device.h> +#include <media/v4l2-event.h> #include <media/v4l2-subdev.h> /* @@ -632,6 +633,9 @@ static const struct v4l2_ctrl_ops mt9m001_ctrl_ops = { }; static const struct v4l2_subdev_core_ops mt9m001_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 = mt9m001_g_register, .s_register = mt9m001_s_register, @@ -720,7 +724,8 @@ static int mt9m001_probe(struct i2c_client *client, return PTR_ERR(mt9m001->reset_gpio); v4l2_i2c_subdev_init(&mt9m001->subdev, client, &mt9m001_subdev_ops); - mt9m001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + mt9m001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; v4l2_ctrl_handler_init(&mt9m001->hdl, 4); v4l2_ctrl_new_std(&mt9m001->hdl, &mt9m001_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); |