@@ -382,7 +382,6 @@ struct ov02c10 {
struct clk *img_clk;
struct regulator *avdd;
struct gpio_desc *reset;
- struct gpio_desc *handshake;
/* Current mode */
const struct ov02c10_mode *cur_mode;
@@ -650,12 +649,6 @@ static int ov02c10_get_pm_resources(struct device *dev)
return dev_err_probe(dev, PTR_ERR(ov02c10->reset),
"failed to get reset gpio\n");
- ov02c10->handshake = devm_gpiod_get_optional(dev, "handshake",
- GPIOD_OUT_LOW);
- if (IS_ERR(ov02c10->handshake))
- return dev_err_probe(dev, PTR_ERR(ov02c10->handshake),
- "failed to get handshake gpio\n");
-
ov02c10->img_clk = devm_clk_get_optional(dev, NULL);
if (IS_ERR(ov02c10->img_clk))
return dev_err_probe(dev, PTR_ERR(ov02c10->img_clk),
@@ -680,7 +673,6 @@ static int ov02c10_power_off(struct device *dev)
int ret = 0;
gpiod_set_value_cansleep(ov02c10->reset, 1);
- gpiod_set_value_cansleep(ov02c10->handshake, 0);
if (ov02c10->avdd)
ret = regulator_disable(ov02c10->avdd);
@@ -710,16 +702,11 @@ static int ov02c10_power_on(struct device *dev)
return ret;
}
}
- gpiod_set_value_cansleep(ov02c10->handshake, 1);
+
gpiod_set_value_cansleep(ov02c10->reset, 0);
+ usleep_range(1500, 1800);
- /* Lattice MIPI aggregator with some version FW needs longer delay
- * after handshake triggered. We set 25ms as a safe value and wait
- * for a stable version FW.
- */
- msleep_interruptible(25);
-
- return ret;
+ return 0;
}
static int __maybe_unused ov02c10_suspend(struct device *dev)
The handshake GPIO is not a sensor GPIO but is related to the special Lattice MIPI aggregator chip found on some Intel IPU6/IPU7 laptops. Since this is not a sensor GPIO it should not be handled by the sensor driver. See here for the alternative plan to handle this: https://lore.kernel.org/linux-media/4b87a956-a767-48dc-b98b-f80d9a44adc8@redhat.com/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/media/i2c/ov02c10.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-)