lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 4/6] gpio: brcmstb: Allow GPIOs to be wakeup sources
From
On Fri, May 29, 2015 at 4:14 AM, Gregory Fong <gregory.0xf0@gmail.com> wrote:

> Several drivers (e.g. gpio-keys) allow for GPIOs to be configured as
> wakeup sources, and this GPIO controller supports that through a
> separate interrupt path.
>
> The de-facto standard DT property "wakeup-source" is checked, since
> that indicates whether the GPIO controller hardware can wake. Uses
> the IRQCHIP_MASK_ON_SUSPEND irq_chip flag because UPG GIO doesn't have
> any of its own wakeup source configuration.
>
> Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>

(...)
> + if (enable)
> + enable_irq_wake(priv->parent_wake_irq);
> + else
> + disable_irq_wake(priv->parent_wake_irq);
> + return 0;

No error handling? If the code assumes these calls will
always succeed, atleast write that in a comment.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2015-06-02 16:01    [W:0.136 / U:6.040 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site