From: Tony Lindgren <tony@atomide.com>
To: Pascal Huerst <pascal.huerst@gmail.com>
Cc: santosh.shilimkar@ti.com, 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: Re: gpio-omap: wakeup mask
Date: Wed, 9 Jul 2014 08:24:42 -0700 [thread overview]
Message-ID: <20140709152441.GZ28884@atomide.com> (raw)
In-Reply-To: <53BD3950.60000@gmail.com>
* Pascal Huerst <pascal.huerst@gmail.com> [140709 05:47]:
> On 09.07.2014 12:41, Tony Lindgren wrote:
>
> > If you just comment out the _gpio_rmw part above do
> > things work as expected?
>
> Yes. It only wakes up on gpio 6 not on gpio 11 anymore.
>
> > Then if that works as expected, maybe write only some unused bits
> > into wkup_en register and see if it still wakes to all events while
> > it should not?
>
> If I use the following testcode, everything works as expected:
>
> //WARN(true, "WARN: bank->base = %08X\n", bank->base);
>
> if (likely(!(bank->non_wakeup_gpios & gpio_bit))) {
> //_gpio_rmw(base, bank->regs->wkup_en, gpio_bit, trigger != 0);
> writel(0xABC00000, base + bank->regs->wkup_en);
>
> bank->context.wake_en = readl_relaxed(bank->base +
> bank->regs->wkup_en);
> printk("bank->base = %08X gpio = %i bank->context->wake_en = %08X\n",
> bank->base, gpio, bank->context.wake_en);
> }
Hmm weird. It sounds like something like the following is happening:
1. The first GPIO bank is always powered, and does not need to set
wake-up events
2. When setting the GPIO wake-up events it seems that enabling any
wake-up event for the first (16?) bits wakes up the system
You might want to check this with some spare GPIOs not in the
first bank and see if you need the wake-up events and if enabling
some bits enables more than one GPIO for wake-up events.
Regards,
Tony
next prev parent reply other threads:[~2014-07-09 15:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 12:09 gpio-omap: wakeup mask Pascal Huerst
2014-07-04 7:27 ` 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 [this message]
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=20140709152441.GZ28884@atomide.com \
--to=tony@atomide.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=pascal.huerst@gmail.com \
--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).