All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Paul Elder <paul.elder@ideasonboard.com>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	"Paul J. Murphy" <paul.j.murphy@intel.com>,
	Martina Krasteva <martinax.krasteva@intel.com>,
	Shawn Tu <shawnx.tu@intel.com>, Arec Kao <arec.kao@intel.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Jimmy Su <jimmy.su@intel.com>,
	Martin Kepplinger <martink@posteo.de>,
	Daniel Scally <djrscally@gmail.com>,
	Jacopo Mondi <jmondi@jmondi.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v2] media: ov5640: Use runtime PM
Date: Fri, 11 Mar 2022 15:15:54 +0200	[thread overview]
Message-ID: <YitLit9LC2zlOfdh@paasikivi.fi.intel.com> (raw)
In-Reply-To: <YitA0dI2mM4ACdaL@pendragon.ideasonboard.com>

Hi Laurent,

On Fri, Mar 11, 2022 at 02:30:09PM +0200, Laurent Pinchart wrote:
> Hi Sakari,
> 
> On Fri, Mar 11, 2022 at 02:23:53PM +0200, Sakari Ailus wrote:
> > On Fri, Mar 11, 2022 at 08:12:59PM +0900, Paul Elder wrote:
> > > Switch to using runtime PM for power management.
> > > 
> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > > 
> > > ---
> > > Changes in v2:
> > > - replace manual tracking of power status with pm_runtime_get_if_in_use
> > > - power on the sensor before reading the checking the chip id
> > > - add dependency on PM to Kconfig
> > > ---
> > >  drivers/media/i2c/Kconfig  |   1 +
> > >  drivers/media/i2c/ov5640.c | 112 ++++++++++++++++++++++---------------
> > >  2 files changed, 67 insertions(+), 46 deletions(-)
> > > 
> > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> > > index e7194c1be4d2..97c3611d9304 100644
> > > --- a/drivers/media/i2c/Kconfig
> > > +++ b/drivers/media/i2c/Kconfig
> > > @@ -1025,6 +1025,7 @@ config VIDEO_OV5640
> > >  	tristate "OmniVision OV5640 sensor support"
> > >  	depends on OF
> > >  	depends on GPIOLIB && VIDEO_V4L2 && I2C
> > > +	depends on PM
> > 
> > I think this is not needed as the sensor is powered on explicitly in probe.
> > 
> > You should similarly power it off explicitly in remove, set the runtime PM
> > status suspended and disable runtime PM. See e.g. imx319 driver for an
> > example. It doesn't have resume callback but that doesn't really matter ---
> > it's just ACPI-only.
> 
> Do we want to continue supporting !PM ? Does it have any real use case
> when dealing with camera sensors ?

Probably not much.

The changes I proposed are not eve related on runtime PM. Hence the
question here is whether there should be a dependency to CONFIG_PM or not,
and as there's no technical reason to have it, it should be omitted.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2022-03-11 13:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 11:12 [PATCH v2] media: ov5640: Use runtime PM Paul Elder
2022-03-11 12:23 ` Sakari Ailus
2022-03-11 12:30   ` Laurent Pinchart
2022-03-11 13:15     ` Sakari Ailus [this message]
2022-03-11 13:20       ` Laurent Pinchart
2022-03-11 13:32         ` Sakari Ailus
2022-03-13 13:01           ` Laurent Pinchart
2022-03-13 13:38             ` Sakari Ailus
2022-03-13 14:16               ` Laurent Pinchart
2022-03-14 20:01                 ` Sakari Ailus
2022-03-14 20:05                   ` Laurent Pinchart
2022-03-14 21:11                     ` Sakari Ailus
2022-03-29 13:02                       ` Laurent Pinchart
2022-04-14  9:29                         ` Sakari Ailus
2022-08-01  7:17                           ` Tomasz Figa
2022-08-01  7:23                             ` Tomasz Figa
2022-08-01 13:47                               ` Laurent Pinchart
2022-08-01 20:39                               ` Sakari Ailus
2022-03-18 22:28 ` Laurent Pinchart
2022-03-21 10:58   ` Sakari Ailus
2022-03-21 11:24     ` Laurent Pinchart
2022-03-22 12:05       ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YitLit9LC2zlOfdh@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=arec.kao@intel.com \
    --cc=djrscally@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jimmy.su@intel.com \
    --cc=jmondi@jmondi.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=martinax.krasteva@intel.com \
    --cc=martink@posteo.de \
    --cc=paul.elder@ideasonboard.com \
    --cc=paul.j.murphy@intel.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=shawnx.tu@intel.com \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.