linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	linux-serial@vger.kernel.org, linux-omap@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>, Kevin Hilman <khilman@linaro.org>,
	Felipe Balbi <balbi@ti.com>
Subject: Re: [PATCH] serial: omap: Fix missing pm_runtime_resume handling by simplifying code
Date: Thu, 10 Apr 2014 16:47:53 -0500	[thread overview]
Message-ID: <20140410214753.GE27668@saruman.home> (raw)
In-Reply-To: <20140325184846.GB31906@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

On Tue, Mar 25, 2014 at 11:48:47AM -0700, Tony Lindgren wrote:
> The lack of pm_runtime_resume handling for the device state leads into
> device wake-up interrupts not working after a while for runtime PM.
> 
> Also, serial-omap is confused about the use of device_may_wakeup.
> The checks for device_may_wakeup should only be done for suspend and
> resume, not for pm_runtime_suspend and pm_runtime_resume. The wake-up
> events for PM runtime should always be enabled.
> 
> The lack of pm_runtime_resume handling leads into device wake-up
> interrupts not working after a while for runtime PM.
> 
> Rather than try to patch over the issue of adding complex tests to
> the pm_runtime_resume, let's fix the issues properly:
> 
> 1. Make serial_omap_enable_wakeup deal with all internal PM state
>    handling so we don't need to test for up->wakeups_enabled elsewhere.
> 
>    Later on once omap3 boots in device tree only mode we can also
>    remove the up->wakeups_enabled flag and rely on the wake-up
>    interrupt enable/disable state alone.
> 
> 2. Do the device_may_wakeup checks in suspend and resume only,
>    for runtime PM the wake-up events need to be always enabled.
> 
> 3. Finally just call serial_omap_enable_wakeup and make sure we
>    call it also in pm_runtime_resume.
> 
> 4. Note that we also have to use disable_irq_nosync as serial_omap_irq
>    calls pm_runtime_get_sync.
> 
> Fixes: 2a0b965cfb6e (serial: omap: Add support for optional wake-up)
> Cc: stable@vger.kernel.org # v3.13+
> Signed-off-by: Tony Lindgren <tony@atomide.com>

FWIW:

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-04-10 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 18:48 [PATCH] serial: omap: Fix missing pm_runtime_resume handling by simplifying code Tony Lindgren
2014-03-25 18:52 ` Felipe Balbi
2014-03-25 19:28   ` Tony Lindgren
2014-04-10 21:47 ` Felipe Balbi [this message]

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=20140410214753.GE27668@saruman.home \
    --to=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=khilman@linaro.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).