build/patch/kernel/archive/sunxi-6.2/patches.megous/media-i2c-imx258-Powerdown-the-sensor-if-clock-enable-fails.patch

29 lines
851 B
Diff
Raw Permalink Normal View History

From 9853a1c873da29a86bec1d8086c5d3b9b95dc132 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 21 May 2022 15:09:17 +0200
Subject: [PATCH 323/391] media: i2c: imx258: Powerdown the sensor if clock
enable fails
This was missing.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/media/i2c/imx258.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
index 76fc1738d..e63ec7b4d 100644
--- a/drivers/media/i2c/imx258.c
+++ b/drivers/media/i2c/imx258.c
@@ -1040,6 +1040,7 @@ static int imx258_power_on(struct device *dev)
ret = clk_prepare_enable(imx258->clk);
if (ret) {
dev_err(dev, "failed to enable clock\n");
+ gpiod_set_value_cansleep(imx258->pwdn_gpio, 1);
regulator_bulk_disable(IMX258_SUPPLY_COUNT, imx258->supplies);
return ret;
}
--
2.35.3