summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7604.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-05-07 10:37:57 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-20 13:41:30 -0300
commit48519838cc915d1af7083662471d2eb939a024c9 (patch)
tree3863b9c2266502180284bc80a9a19a4fe4108090 /drivers/media/i2c/adv7604.c
parent17e484686be2e9ecb88cc7913a4baaf6783275e3 (diff)
[media] adv7604/adv7842: replace FMT_CHANGED by V4L2_DEVICE_NOTIFY_EVENT
This makes it easier for the bridge driver to just passthrough such events to the corresponding device node. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/adv7604.c')
-rw-r--r--drivers/media/i2c/adv7604.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index be3f8660e457..aaa37b0e9ed4 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -341,6 +341,11 @@ static const struct adv76xx_video_standards adv76xx_prim_mode_hdmi_gr[] = {
{ },
};
+static const struct v4l2_event adv76xx_ev_fmt = {
+ .type = V4L2_EVENT_SOURCE_CHANGE,
+ .u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION,
+};
+
/* ----------------------------------------------------------------------- */
static inline struct adv76xx_state *to_state(struct v4l2_subdev *sd)
@@ -1744,11 +1749,11 @@ static int adv76xx_s_routing(struct v4l2_subdev *sd,
state->selected_input = input;
disable_input(sd);
-
select_input(sd);
-
enable_input(sd);
+ v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT,
+ (void *)&adv76xx_ev_fmt);
return 0;
}
@@ -1915,7 +1920,8 @@ static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
"%s: fmt_change = 0x%x, fmt_change_digital = 0x%x\n",
__func__, fmt_change, fmt_change_digital);
- v4l2_subdev_notify(sd, ADV76XX_FMT_CHANGE, NULL);
+ v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT,
+ (void *)&adv76xx_ev_fmt);
if (handled)
*handled = true;