linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Fabio Estevam <festevam@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Linux PM <linux-pm@vger.kernel.org>,
	linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv4 2/4] serial: imx: add runtime pm support
Date: Mon, 17 Aug 2015 17:40:59 +0200	[thread overview]
Message-ID: <2095117.mcCCLIRizo@amdc1976> (raw)
In-Reply-To: <1439613468-22366-3-git-send-email-edubezval@gmail.com>


Hi,

On Friday, August 14, 2015 09:37:46 PM Eduardo Valentin wrote:
> This change introduces the runtime pm support on imx serial
> driver. The objective is to be able to idle the uart
> port whenever it is not in use while still being able
> to wake it up when needed. The key changes in this patch are:
> 1. Move the clock handling to runtime pm. Both, ipg and per,
> are now handled in the suspend and resume callbacks. Only
> enabling and disabling the clocks are handled in runtime
> suspend and resume, so we are able to use runtime pm
> in IRQ context.
> 2. Clocks are prepared in probe and unprepared in remove,
> so we do not need to prepare (may sleep) in runtime pm.
> 3. We mark the device activity based on uart and console
> callbacks. Whenever the device is needed and we want to
> access registers, we runtime_pm_get and then mark its
> last usage when we are done. This is done also across
> IRQs and DMA callbacks.
> 4. We reuse the infrastructure in place for suspend and
> resume, so we do not need to redo wakeup configuration,
> or context save and restore.
> 
> After this change, the clocks are still sane, in the sense
> of having balanced clock prepare and enable.

The clock changes in this patch seem to make this driver
non-functional with CONFIG_PM=n.  Have you tested your
changes with CONFIG_PM=n?

Generally the driver should not depend on PM support to
enable its clocks.  We had this issue in few Exynos-specific
drivers not that long time ago..

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


  reply	other threads:[~2015-08-17 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15  4:37 [PATCHv4 0/4] serial: imx: rework pm support and add runtime pm Eduardo Valentin
2015-08-15  4:37 ` [PATCHv4 1/4] serial: imx: add a flag to indicate we are in the suspend path Eduardo Valentin
2015-08-15  4:37 ` [PATCHv4 2/4] serial: imx: add runtime pm support Eduardo Valentin
2015-08-17 15:40   ` Bartlomiej Zolnierkiewicz [this message]
2015-08-18  0:28     ` Eduardo Valentin
2015-08-15  4:37 ` [PATCHv4 3/4] serial: imx: add pm_qos request Eduardo Valentin
2015-08-15  4:37 ` [PATCHv4 4/4] serial: imx: use SET_*SYSTEM_PM_OPS helper functions Eduardo Valentin

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=2095117.mcCCLIRizo@amdc1976 \
    --to=b.zolnierkie@samsung.com \
    --cc=edubezval@gmail.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).