linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Huerst <pascal.huerst@gmail.com>
To: santosh.shilimkar@ti.com
Cc: khilman@deeprootsystems.com, linus.walleij@linaro.org,
	gnurou@gmail.com, linux-omap@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Mack <daniel@zonque.org>
Subject: gpio-omap: wakeup mask
Date: Wed, 02 Jul 2014 14:09:43 +0200	[thread overview]
Message-ID: <53B3F687.5050502@gmail.com> (raw)

Hi everyone,

we have a device with an am335x and are using some gpios on bank0 to
wake up the device from suspend to ram.

We have some user buttons which are configured in the devicetree as
gpio-keys and one power-key which should wake up the device:

&buttons {
        power {
                label = "Power";
                gpios = <&gpio0 6 1>;
                linux,code = <116>;
                gpio-key,wakeup;
        };

        one {
                label = "One";
                gpios = <&gpio0 11 1>;
                linux,code = <2>;
        };

        : : :
}

The problem is, that the device wakes up on any trigger on bank 0. No
matter which button was pressed. "gpio-key,wakeup" seems not to have any
influence.

Now, if I comment the following lines out in drivers/gpio/gpio-omap.c :
set_gpio_trigger(...).

321
322 if (likely(!(bank->non_wakeup_gpios & gpio_bit))) {
323    _gpio_rmw(base, bank->regs->wkup_en, gpio_bit, trigger != 0);
324      bank->context.wake_en =
325        readl_relaxed(bank->base + bank->regs->wkup_en);
326 }
327

Everything works as expected. But I don't really understand why? Is this
a bug, or does this break something else I have not discovered yet?

Thanks,
Pascal

             reply	other threads:[~2014-07-02 12:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 12:09 Pascal Huerst [this message]
2014-07-04  7:27 ` gpio-omap: wakeup mask Tony Lindgren
2014-07-09 10:16   ` Pascal Huerst
2014-07-09 10:41     ` Tony Lindgren
2014-07-09 12:45       ` Pascal Huerst
2014-07-09 15:24         ` Tony Lindgren
2014-07-15 13:27           ` Pascal Huerst
2014-07-15 13:41             ` Tony Lindgren

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=53B3F687.5050502@gmail.com \
    --to=pascal.huerst@gmail.com \
    --cc=daniel@zonque.org \
    --cc=gnurou@gmail.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.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).