Commit e1988e7a authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: ccs: Only do software reset if we have no hardware reset

The driver always used software reset after the sensor's power sequence
that includes a hardware reset if we have a reset GPIO. Do not use
software reset if we just brought the sensor up from hardware reset state.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 105676ce
...@@ -1552,11 +1552,13 @@ static int ccs_power_on(struct device *dev) ...@@ -1552,11 +1552,13 @@ static int ccs_power_on(struct device *dev)
* is found. * is found.
*/ */
if (!sensor->reset && !sensor->xshutdown) {
rval = ccs_write(sensor, SOFTWARE_RESET, CCS_SOFTWARE_RESET_ON); rval = ccs_write(sensor, SOFTWARE_RESET, CCS_SOFTWARE_RESET_ON);
if (rval < 0) { if (rval < 0) {
dev_err(dev, "software reset failed\n"); dev_err(dev, "software reset failed\n");
goto out_cci_addr_fail; goto out_cci_addr_fail;
} }
}
if (sensor->hwcfg.i2c_addr_alt) { if (sensor->hwcfg.i2c_addr_alt) {
rval = ccs_change_cci_addr(sensor); rval = ccs_change_cci_addr(sensor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment