From: Martin Bugge Date: Thu, 5 Dec 2013 12:02:20 +0000 (-0300) Subject: upstream: [media] adv7511: disable register reset by HPD X-Git-Tag: submit/tizen/20141121.110247~1583 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbcacdceb58e84e2e455153a23830a228e6afe8f;p=platform%2Fkernel%2Flinux-3.10.git upstream: [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c index b2a11f6..10b6068 100644 --- a/drivers/media/i2c/adv7511.c +++ b/drivers/media/i2c/adv7511.c @@ -1040,6 +1040,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);