media: i2c: sc3336 reset/pwd gpio should set low output by default for normal case

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I026cc9b6026d3641df861d60111d08369097fd59
This commit is contained in:
Yiqing Zeng
2022-11-23 17:29:54 +08:00
committed by Tao Huang
parent 279b6f645c
commit 8334ade617

View File

@@ -1582,11 +1582,17 @@ static int sc3336_probe(struct i2c_client *client,
return -EINVAL;
}
sc3336->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_ASIS);
if (!sc3336->is_thunderboot)
sc3336->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
else
sc3336->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_ASIS);
if (IS_ERR(sc3336->reset_gpio))
dev_warn(dev, "Failed to get reset-gpios\n");
sc3336->pwdn_gpio = devm_gpiod_get(dev, "pwdn", GPIOD_ASIS);
if (!sc3336->is_thunderboot)
sc3336->pwdn_gpio = devm_gpiod_get(dev, "pwdn", GPIOD_OUT_LOW);
else
sc3336->pwdn_gpio = devm_gpiod_get(dev, "pwdn", GPIOD_ASIS);
if (IS_ERR(sc3336->pwdn_gpio))
dev_warn(dev, "Failed to get pwdn-gpios\n");