Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH v4 4/4] media: i2c: imx274: Add IMX274 power on and off sequence | From | Sowjanya Komatineni <> | Date | Mon, 31 Aug 2020 13:54:24 -0700 |
| |
On 8/31/20 1:48 PM, Sakari Ailus wrote: > On Mon, Aug 31, 2020 at 01:46:00PM -0700, Sowjanya Komatineni wrote: >> On 8/31/20 1:23 PM, Sakari Ailus wrote: >>>> @@ -1968,19 +2087,45 @@ static int imx274_remove(struct i2c_client *client) >>>> struct v4l2_subdev *sd = i2c_get_clientdata(client); >>>> struct stimx274 *imx274 = to_imx274(sd); >>>> + pm_runtime_get_sync(&imx274->client->dev); >>>> + >>>> /* stop stream */ >>> This really shouldn't happen and the driver isn't expected to handle it >>> either. >> Do you mean to remove stop stream during remove()? >> >> Stop stream is not part of this change and as writes to sensor can't happen >> when power off, added pm_runtime_get_sync > Indeed. > > But there certainly isn't a need to power the sensor on to stream off, is > there?
yeah not required. Will remove get_sync.
Will remove imx274 stop stream during remove() as separate patch as it was not introduced in this.
>>>> imx274_write_table(imx274, imx274_stop); >>>> v4l2_async_unregister_subdev(sd); >>>> v4l2_ctrl_handler_free(&imx274->ctrls.handler); >>>> + >>>> + pm_runtime_put(&client->dev); >>>> + pm_runtime_disable(&client->dev); >>>> + pm_runtime_set_suspended(&client->dev); >>>> + >>>> media_entity_cleanup(&sd->entity); >>>> mutex_destroy(&imx274->lock); >>>> return 0; >>>> }
| ![\](/images/icornerr.gif) |