From: Daniel Mack <zonque@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg KH <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH] drivers: misc: add gpio wakeup driver
Date: Fri, 11 Oct 2013 13:40:54 +0200 [thread overview]
Message-ID: <5257E3C6.3050507@gmail.com> (raw)
In-Reply-To: <CACRpkdYhQ+-d1COcvmg_hEJ==cTFpKLNDnvF8kdK4QgXzHenEA@mail.gmail.com>
Hi Linus,
On 11.10.2013 13:11, Linus Walleij wrote:
> On Tue, Oct 1, 2013 at 3:55 PM, Daniel Mack <zonque@gmail.com> wrote:
>> +Example:
>> +
>> + wake_up {
>> + compatible = "gpio-wakeup";
>> + gpios = <&gpio0 19 0>;
>> + };
>
> This will not work if that GPIO chip is not capable of supporting
> interrupts on that GPIO line right?
Of course. It's the IRQ that wakes up the system, after all :)
> We have recently had a very long discussion about this: such
> GPIO chips will also be marked "interrupt-controller" and you
> should be able to just state interrupt-parent and
> interrupts = <>; for this. (And it should accept an array.)
Well, but that's not very intuitive. I was aiming for a drop-in
replacement for what I currently use for this purpose: a fake GPIO key
input device which is marked as wakeup source (linux,wakeup). Schematics
and everything else use GPIO notation, and so should the DTB binding here.
> Since what the driver will then eventually provide is to
> flag an IRQ line as wakeup, I wonder if this should not just
> simply go into the interrupt core, or atleast of/irq.c.
But for that, the IRQ line must be requested exclusively and handled as
well, no? If not, how would you handle cases where an interrupt is
marked as wakeup source by the core, but used by another driver which
calls disable_irq_wake() on it for whatever reason?
Thanks,
Daniel
next prev parent reply other threads:[~2013-10-11 11:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 13:55 [PATCH] drivers: misc: add gpio wakeup driver Daniel Mack
2013-10-01 14:01 ` Fabio Estevam
2013-10-01 14:05 ` Daniel Mack
2013-10-02 10:57 ` Mark Brown
2013-10-02 11:02 ` Daniel Mack
2013-10-11 11:11 ` Linus Walleij
2013-10-11 11:40 ` Daniel Mack [this message]
2013-10-11 12:54 ` Linus Walleij
2013-10-15 19:32 ` Arnd Bergmann
2013-10-15 21:35 ` Linus Walleij
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=5257E3C6.3050507@gmail.com \
--to=zonque@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.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).