public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Juha Yrjölä" <juha.yrjola@solidboot.com>
To: balrogg@gmail.com
Cc: Linux-OMAP <linux-omap-open-source@linux.omap.com>
Subject: Re: Suspending with keypad bug (RFC)
Date: Sun, 06 Aug 2006 22:25:51 +0300	[thread overview]
Message-ID: <44D6423F.3070001@solidboot.com> (raw)
In-Reply-To: <fb249edb0608041633y58eef1b8we6f00cccf69c99a0@mail.gmail.com>

andrzej zaborowski wrote:

> I came up with a different fix, in the keypad driver but it's a bit
> more intrusive. With this the device sleeps peacefully until another
> key-press is detected. What should be the correct behavior?
> I'm attaching both changes.

This approach is better; the generic PM code should not have to care 
that much about different wakeup sources.

I'm not exactly sure in which state the system is when the suspend 
function is called.  Can there still be timer activity, for example? 
Nevertheless, you're safer doing a spin_lock_irqsave() in the suspend 
function first, and releasing the lock only after setting the suspended 
variable and re-enabling the interrupt.

You should also check whether you're actually running on OMAP1 before 
you write to the register.

In the IRQ handler, you should also do a spin_lock_irqsave() before 
accessing the suspended variable.

Cheers,
Juha

  reply	other threads:[~2006-08-06 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04 23:33 Suspending with keypad bug (RFC) andrzej zaborowski
2006-08-06 19:25 ` Juha Yrjölä [this message]
2006-08-10  4:55   ` andrzej zaborowski
2006-08-11 10:04     ` Tony Lindgren
2006-08-13  9:36     ` Juha Yrjölä
2006-08-17 19:43       ` andrzej zaborowski

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=44D6423F.3070001@solidboot.com \
    --to=juha.yrjola@solidboot.com \
    --cc=balrogg@gmail.com \
    --cc=linux-omap-open-source@linux.omap.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