lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Oct 2013 13:11:34 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Daniel Mack <zonque@...il.com>, Arnd Bergmann <arnd@...db.de>,
	Greg KH <gregkh@...uxfoundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Mark Brown <broonie@...nel.org>,
	Stephen Warren <swarren@...dotorg.org>
Subject: Re: [PATCH] drivers: misc: add gpio wakeup driver

On Tue, Oct 1, 2013 at 3:55 PM, Daniel Mack <zonque@...il.com> wrote:

> This patch adds a very simple driver that enables GPIO lines as wakeup
> sources. It only operates on information passed in via DT, and depends
> on CONFIG_OF && CONFIG_PM_SLEEP. It can for example be used to connect
> wake-on-LAN (WOL) signals or other electric wakeup networks.
>
> The driver accepts a list of GPIO nodes and claims them along with their
> interrupt line. During suspend, the interrupts will be enabled and
> selected as wakeup source. The driver doesn't do anything else with the
> GPIO lines, and will ignore occured interrupts silently.
>
> Signed-off-by: Daniel Mack <zonque@...il.com>

This makes a weird kind of sense.
Hm hm hm.

But I really need the misc mainatiners' help here...
possibly also irqchip maintainers.

> +++ b/Documentation/devicetree/bindings/misc/gpio-wakeup.txt
> @@ -0,0 +1,16 @@
> +GPIO WAKEUP DRIVER BINDINGS
> +
> +Required:
> +
> +       compatible:     Must be "gpio-wakeup"
> +       gpios:          At list of GPIO nodes that are enabled as wakeup
> +                       sources.

Reword so this is OS independent. Describe what a wakeup source is
for example.

> +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?

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.)

It *may* be that we have many GPIO drivers that do not accept
that you request an interrupt on them before you have done
request_gpio() followed by gpio_to_irq() on the pin. Then this
shall be treated like a bug and the GPIO driver fixed to handle
this. (That was the outcome of this discussion.)

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.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ