media: i2c: gc2093: pm_runtime_put device until stream_off for thunderboot

The camera device should keep *power on* until stream off, that make
sure the mclk is enable.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Iad14d6648b24c5e9202ba2cef2199e35fbe18fbb
This commit is contained in:
Lin Jinhan
2022-11-17 11:32:57 +08:00
committed by Tao Huang
parent 39115e823e
commit fea2e9f574

View File

@@ -1000,7 +1000,7 @@ static int __gc2093_stop_stream(struct gc2093 *gc2093)
gc2093->has_init_exp = false;
if (gc2093->is_thunderboot) {
gc2093->is_first_streamoff = true;
return 0;
pm_runtime_put(gc2093->dev);
}
return gc2093_write_reg(gc2093, GC2093_REG_CTRL_MODE,
GC2093_MODE_SW_STANDBY);
@@ -1517,7 +1517,10 @@ static int gc2093_probe(struct i2c_client *client,
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
pm_runtime_idle(dev);
if (gc2093->is_thunderboot)
pm_runtime_get_sync(dev);
else
pm_runtime_idle(dev);
return 0;