lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200831204833.GG844@valkosipuli.retiisi.org.uk>
Date:   Mon, 31 Aug 2020 23:48:33 +0300
From:   Sakari Ailus <sakari.ailus@....fi>
To:     Sowjanya Komatineni <skomatineni@...dia.com>
Cc:     thierry.reding@...il.com, jonathanh@...dia.com, hverkuil@...all.nl,
        luca@...aceresoli.net, leonl@...pardimaging.com,
        robh+dt@...nel.org, lgirdwood@...il.com, broonie@...nel.org,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/4] media: i2c: imx274: Add IMX274 power on and off
 sequence

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ