summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7511.c
diff options
context:
space:
mode:
authorMartin Bugge2013-12-05 13:02:20 +0100
committerMauro Carvalho Chehab2014-01-07 08:28:24 +0100
commita62c6216707771b05df868b468f4494c8db9eb37 (patch)
tree2de3091b4645f0ba9339f5181a0f7f1e3dc37ebe /drivers/media/i2c/adv7511.c
parent[media] ad9389b: retry setup if the state is inconsistent (diff)
downloadkernel-qcow2-linux-a62c6216707771b05df868b468f4494c8db9eb37.tar.gz
kernel-qcow2-linux-a62c6216707771b05df868b468f4494c8db9eb37.tar.xz
kernel-qcow2-linux-a62c6216707771b05df868b468f4494c8db9eb37.zip
[media] adv7511: disable register reset by HPD
Whenever the hotplug pin is pulled low the chip resets a whole bunch of registers. It turns out that this can be turned off on the adv7511. Do so, as this 'feature' introduces race conditions in setting up registers, particular when the hotplug pin bounces a lot. Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c/adv7511.c')
-rw-r--r--drivers/media/i2c/adv7511.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index 7c8d971f1f61..89ea26667311 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -1038,6 +1038,12 @@ static void adv7511_init_setup(struct v4l2_subdev *sd)
/* clear all interrupts */
adv7511_wr(sd, 0x96, 0xff);
+ /*
+ * Stop HPD from resetting a lot of registers.
+ * It might leave the chip in a partly un-initialized state,
+ * in particular with regards to hotplug bounces.
+ */
+ adv7511_wr_and_or(sd, 0xd6, 0x3f, 0xc0);
memset(edid, 0, sizeof(struct adv7511_state_edid));
state->have_monitor = false;
adv7511_set_isr(sd, false);