Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759382AbbFBNpT (ORCPT ); Tue, 2 Jun 2015 09:45:19 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:33422 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759257AbbFBNpC (ORCPT ); Tue, 2 Jun 2015 09:45:02 -0400 MIME-Version: 1.0 In-Reply-To: <1432865650-4062-5-git-send-email-gregory.0xf0@gmail.com> References: <1432865650-4062-1-git-send-email-gregory.0xf0@gmail.com> <1432865650-4062-5-git-send-email-gregory.0xf0@gmail.com> Date: Tue, 2 Jun 2015 15:45:01 +0200 Message-ID: Subject: Re: [PATCH v2 4/6] gpio: brcmstb: Allow GPIOs to be wakeup sources From: Linus Walleij To: Gregory Fong Cc: "linux-gpio@vger.kernel.org" , Alexandre Courbot , bcm-kernel-feedback-list , Brian Norris , "devicetree@vger.kernel.org" , Florian Fainelli , Ian Campbell , Kumar Gala , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Mark Rutland , Pawel Moll , Rob Herring , Russell King Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 30 On Fri, May 29, 2015 at 4:14 AM, Gregory Fong 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 (...) > + 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/