From c3bcd08fcf2e9726474dd2ad31a5506d0d5362bd Mon Sep 17 00:00:00 2001 From: Lan Honglin Date: Wed, 7 Jun 2023 18:39:13 +0800 Subject: [PATCH] media: i2c: fix sc301iot reset when probe for fastboot [ISSUE] device I2C communication is fail due to reset Change-Id: I847523a8df22727b6863a4dbe2cdad11b104435c Signed-off-by: Lan Honglin --- drivers/media/i2c/sc301iot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/sc301iot.c b/drivers/media/i2c/sc301iot.c index 0bdb537028fa..e5d09e08daa9 100644 --- a/drivers/media/i2c/sc301iot.c +++ b/drivers/media/i2c/sc301iot.c @@ -1723,6 +1723,8 @@ static int __SC301IOT_power_on(struct SC301IOT *SC301IOT) dev_err(dev, "Failed to enable xvclk\n"); goto disable_clk; } + if (SC301IOT->is_thunderboot) + return 0; if (!IS_ERR(SC301IOT->reset_gpio)) gpiod_set_value_cansleep(SC301IOT->reset_gpio, 0); @@ -1731,9 +1733,6 @@ static int __SC301IOT_power_on(struct SC301IOT *SC301IOT) dev_err(dev, "Failed to enable regulators\n"); goto disable_clk; } - if (SC301IOT->is_thunderboot) - return 0; - if (!IS_ERR(SC301IOT->reset_gpio)) gpiod_set_value_cansleep(SC301IOT->reset_gpio, 1);