From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-renesas-soc@vger.kernel.org,
tomoharu.fukawa.eb@renesas.com,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH v13 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver
Date: Sun, 15 Apr 2018 22:47:37 +0200 [thread overview]
Message-ID: <20180415204737.GF20093@bigcity.dyn.berto.se> (raw)
In-Reply-To: <20180404201357.kx7e4dbqurn5zx2r@valkosipuli.retiisi.org.uk>
Hi Sakari,
Thanks for your feedback.
On 2018-04-04 23:13:57 +0300, Sakari Ailus wrote:
[snip]
> > > + pm_runtime_enable(&pdev->dev);
> >
> > Is CONFIG_PM mandatory on Renesas SoCs? If not, you end up with the
> > device uninitialised at probe, and pm_runtime_get_sync will not
> > initialise it either if CONFIG_PM is not enabled. I guess you could
> > call your runtime_resume function unconditionally, and mark the device
> > as active in runtime_pm using pm_runtime_set_active.
>
> There doesn't seem to be any runtime_resume function. Was there supposed
> to be one?
No there is not suppose to be one.
>
> Assuming runtime PM would actually do something here, you might add
> pm_runtime_idle() to power the device off after probing.
>
> I guess pm_runtime_set_active() should precede pm_runtime_enable().
The CSI-2 is in the always on power domain so the calls to
pm_runtime_get_sync() and pm_runtime_put() are there in the s_stream()
callback to enable and disable the module clock. I'm no expert on PM but
in my testing the pm_ calls in this driver seems to be correct.
1. In probe I call pm_runtime_enable(). And rudimentary tests shows the
clock is off (but I might miss something) as I wish it to be until
stream on time.
2. In s_stream() I call pm_runtime_get_sync() before writing any
register when starting a stream. And likewise I call pm_runtime_put()
when stopping and I no longer need to write to a register.
3. In remove() I call pm_runtime_disable().
Am I missing something obvious here?
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2018-04-15 20:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 23:01 [PATCH v13 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 Niklas Söderlund
2018-02-12 23:01 ` [PATCH v13 1/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation Niklas Söderlund
2018-04-04 14:49 ` Laurent Pinchart
2018-02-12 23:01 ` [PATCH v13 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver Niklas Söderlund
2018-03-13 22:23 ` Kieran Bingham
2018-04-04 15:25 ` Laurent Pinchart
2018-04-15 18:50 ` Niklas Söderlund
2018-04-15 18:48 ` Niklas Söderlund
2018-03-29 11:30 ` Maxime Ripard
2018-04-04 15:26 ` Laurent Pinchart
2018-04-05 7:33 ` Geert Uytterhoeven
2018-04-05 8:26 ` Laurent Pinchart
2018-04-15 20:35 ` Niklas Söderlund
2018-04-04 20:13 ` Sakari Ailus
2018-04-15 20:47 ` Niklas Söderlund [this message]
2018-04-16 9:30 ` Sakari Ailus
2018-04-15 20:33 ` Niklas Söderlund
2018-04-04 15:15 ` Laurent Pinchart
2018-04-15 21:26 ` Niklas Söderlund
2018-04-23 23:23 ` Laurent Pinchart
2018-04-05 9:10 ` jacopo mondi
2018-04-05 13:06 ` jacopo mondi
2018-04-15 23:16 ` Niklas Söderlund
2018-04-16 12:46 ` jacopo mondi
2018-04-17 0:05 ` Niklas Söderlund
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=20180415204737.GF20093@bigcity.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=geert@linux-m68k.org \
--cc=hverkuil@xs4all.nl \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.com \
--cc=tomoharu.fukawa.eb@renesas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox