media: i2c: sc3338: 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: Ziyuan Xu <xzy.xu@rock-chips.com> Change-Id: I2db0070793d755d8d1fe2cda3f87aaa498e052d3
This commit is contained in:
parent
334791b0d3
commit
f91fc90bbe
|
|
@ -855,8 +855,10 @@ static int __sc3338_start_stream(struct sc3338 *sc3338)
|
|||
static int __sc3338_stop_stream(struct sc3338 *sc3338)
|
||||
{
|
||||
sc3338->has_init_exp = false;
|
||||
if (sc3338->is_thunderboot)
|
||||
if (sc3338->is_thunderboot) {
|
||||
sc3338->is_first_streamoff = true;
|
||||
pm_runtime_put(&sc3338->client->dev);
|
||||
}
|
||||
return sc3338_write_reg(sc3338->client, SC3338_REG_CTRL_MODE,
|
||||
SC3338_REG_VALUE_08BIT, SC3338_MODE_SW_STANDBY);
|
||||
}
|
||||
|
|
@ -1470,7 +1472,10 @@ static int sc3338_probe(struct i2c_client *client,
|
|||
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
pm_runtime_idle(dev);
|
||||
if (sc3338->is_thunderboot)
|
||||
pm_runtime_get_sync(dev);
|
||||
else
|
||||
pm_runtime_idle(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue