Re: [PATCH v4 4/4] media: i2c: imx274: Add IMX274 power on and off sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

> 
> > >   	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;
> > >   }

-- 
Sakari Ailus



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux