public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-media@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: [PATCH 6/7] media: ov7670: support log_status ioctl and event interface
Date: Tue, 13 Nov 2018 01:00:53 +0900	[thread overview]
Message-ID: <1542038454-20066-7-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1542038454-20066-1-git-send-email-akinobu.mita@gmail.com>

This adds log_status ioctl and event interface for ov7670's v4l2 controls.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/media/i2c/ov7670.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index bc68a3a..a70a6ff 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -20,6 +20,7 @@
 #include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <media/v4l2-device.h>
+#include <media/v4l2-event.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-mediabus.h>
@@ -1651,6 +1652,9 @@ static int ov7670_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 static const struct v4l2_subdev_core_ops ov7670_core_ops = {
 	.reset = ov7670_reset,
 	.init = ov7670_init,
+	.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 = ov7670_g_register,
 	.s_register = ov7670_s_register,
@@ -1773,7 +1777,7 @@ static int ov7670_probe(struct i2c_client *client,
 
 #ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
 	sd->internal_ops = &ov7670_subdev_internal_ops;
-	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
 #endif
 
 	info->clock_speed = 30; /* default: a guess */
-- 
2.7.4

  parent reply	other threads:[~2018-11-13  1:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 16:00 [PATCH 0/7] media: i2c: small enhancements for camera sensor drivers Akinobu Mita
2018-11-12 16:00 ` [PATCH 1/7] media: mt9m111: support log_status ioctl and event interface Akinobu Mita
2018-11-12 16:00 ` [PATCH 2/7] media: mt9m111: add V4L2_CID_COLORFX control Akinobu Mita
2018-11-12 16:00 ` [PATCH 3/7] media: ov2640: add V4L2_CID_TEST_PATTERN control Akinobu Mita
2018-11-13 10:36   ` Sakari Ailus
2018-11-13 13:55     ` Akinobu Mita
2018-11-13 21:32       ` Sakari Ailus
2018-11-12 16:00 ` [PATCH 4/7] media: ov2640: support log_status ioctl and event interface Akinobu Mita
2018-11-12 16:00 ` [PATCH 5/7] media: ov5640: " Akinobu Mita
2018-11-12 16:00 ` Akinobu Mita [this message]
2018-11-12 16:00 ` [PATCH 7/7] media: ov772x: " Akinobu Mita
2018-11-14  0:20 ` [PATCH 0/7] media: i2c: small enhancements for camera sensor drivers jacopo mondi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542038454-20066-7-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox