From: Ulrich Hecht Date: Tue, 10 Nov 2015 13:39:00 +0000 (-0200) Subject: [media] media: adv7180: increase delay after reset to 5ms X-Git-Tag: v4.5-rc1~149^2^2~152 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=16dfe72fd879abc98255bbea62fae9d312ef3b5a;p=karo-tx-linux.git [media] media: adv7180: increase delay after reset to 5ms Initialization of the ADV7180 chip fails on the Renesas R8A7790-based Lager board about 50% of the time. This patch resolves the issue by increasing the minimum delay after reset from 2 ms to 5 ms, following the recommendation in the ADV7180 datasheet: "Executing a software reset takes approximately 2 ms. However, it is recommended to wait 5 ms before any further I2C writes are performed." Signed-off-by: Ulrich Hecht Acked-by: Laurent Pinchart Acked-by: Lars-Peter Clausen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index f82c8aa164fa..3c3c4bfe3866 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -1112,7 +1112,7 @@ static int init_device(struct adv7180_state *state) mutex_lock(&state->mutex); adv7180_write(state, ADV7180_REG_PWR_MAN, ADV7180_PWR_MAN_RES); - usleep_range(2000, 10000); + usleep_range(5000, 10000); ret = state->chip_info->init(state); if (ret)