media: i2c: max9286: [Workaround] Hard delay while waiting to enable the V3M cameras

The camera's power regulator is connected to a GPIO on the max9286.
Unfortunately this causes us a circular dependency on the regulator
needing the gpio_chip before the max9286 has probed.

Until we can get the regulator framework to create the regulator device
on demand (at the time of regulator_get(), the gpio_chip is available)
we need to force the gpio line with a gpio-hog, and handle the delay
required with a manual sleep.

This is specific to the Eagle-V3M.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index bf4dfc3..b73884e 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -1188,6 +1188,20 @@ static int max9286_init(struct device *dev)
 		return ret;
 	}
 
+	/*
+	 * Regulator Workaround:
+	 *
+	 * We must sleep at least 8 seconds to let the cameras power and
+	 * complete their bootstrapping process. This should be handled by the
+	 * call to regulator_enable, but alas on V3M we end up in a circular
+	 * dependency due to the regulator being connected to our own gpio_chip
+	 *
+	 * This sleep is a temporary work-around and should be removed, which
+	 * ensures enough time has passed from the gpio_chip enabling a
+	 * gpio-hog before we enable any reverse channels within max9286_setup.
+	 */
+	usleep_range(8000000, 9000000);
+
 	ret = max9286_setup(priv);
 	if (ret) {
 		dev_err(dev, "Unable to setup max9286\n");