forked from Minki/linux
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>
This commit is contained in:
parent
73b3386098
commit
dd15f0702f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user