All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] [media] adv7604: Add support for control event notifications
@ 2015-06-24 16:50 Lars-Peter Clausen
  2015-06-24 16:50 ` [PATCH 2/5] [media] adv7842: " Lars-Peter Clausen
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Lars-Peter Clausen @ 2015-06-24 16:50 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, Lars-Peter Clausen

Allow userspace applications to subscribe to control change events. This
can e.g. be used to monitor the 5V detect control to be notified when a
source is connected or disconnected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/media/i2c/adv7604.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 808360f..cf1cb5a 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -41,6 +41,7 @@
 #include <media/adv7604.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
+#include <media/v4l2-event.h>
 #include <media/v4l2-dv-timings.h>
 #include <media/v4l2-of.h>
 
@@ -2356,6 +2357,8 @@ static const struct v4l2_ctrl_ops adv76xx_ctrl_ops = {
 static const struct v4l2_subdev_core_ops adv76xx_core_ops = {
 	.log_status = adv76xx_log_status,
 	.interrupt_service_routine = adv76xx_isr,
+	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
+	.unsubscribe_event = v4l2_event_subdev_unsubscribe,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 	.g_register = adv76xx_g_register,
 	.s_register = adv76xx_s_register,
@@ -2833,7 +2836,7 @@ static int adv76xx_probe(struct i2c_client *client,
 	snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
 		id->name, i2c_adapter_id(client->adapter),
 		client->addr);
-	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
 
 	/*
 	 * Verify that the chip is present. On ADV7604 the RD_INFO register only
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-07-13 11:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 16:50 [PATCH 1/5] [media] adv7604: Add support for control event notifications Lars-Peter Clausen
2015-06-24 16:50 ` [PATCH 2/5] [media] adv7842: " Lars-Peter Clausen
2015-06-24 16:50 ` [PATCH 3/5] [media] Add helper function for subdev " Lars-Peter Clausen
2015-06-25  9:47   ` Sakari Ailus
2015-06-25 10:41     ` Lars-Peter Clausen
2015-06-24 16:50 ` [PATCH 4/5] [media] adv7604: Deliver resolution change events to userspace Lars-Peter Clausen
2015-06-25 10:21   ` Sakari Ailus
2015-06-25 10:44     ` Lars-Peter Clausen
2015-07-13  9:02   ` Hans Verkuil
2015-07-13 11:01     ` Lars-Peter Clausen
2015-06-24 16:50 ` [PATCH 5/5] [media] adv7842: " Lars-Peter Clausen
2015-06-25 10:24   ` Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.