Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbbHMLMe (ORCPT ); Thu, 13 Aug 2015 07:12:34 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:33228 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbbHMLMc (ORCPT ); Thu, 13 Aug 2015 07:12:32 -0400 MIME-Version: 1.0 In-Reply-To: <1438391865-7862-4-git-send-email-gregory.0xf0@gmail.com> References: <1438391865-7862-1-git-send-email-gregory.0xf0@gmail.com> <1438391865-7862-4-git-send-email-gregory.0xf0@gmail.com> Date: Thu, 13 Aug 2015 13:12:31 +0200 Message-ID: Subject: Re: [PATCH v4 3/4] gpio: brcmstb: support wakeup from S5 cold boot From: Linus Walleij To: Gregory Fong Cc: 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-gpio@vger.kernel.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: 1261 Lines: 33 On Sat, Aug 1, 2015 at 3:17 AM, Gregory Fong wrote: > For wake from S5, we need to: > - register a reboot handler > - set wakeup capability before requesting IRQ so wakeup count is > incremented > - mask all GPIO IRQs and clear any pending interrupts during driver > probe to since no driver will yet be registered to handle any IRQs > carried over from boot at that time, and it's possible that the > booted kernel does not request the same IRQ anyway. > > This means that /sys/.../power/wakeup_count is valid at boot time, and > we can properly account for S5 wakeup stats. e.g.: > > ### After waking from S5 from a GPIO key > # cat /sys/bus/platform/drivers/brcmstb-gpio/f04172c0.gpio/power/wakeup > enabled > # cat /sys/bus/platform/drivers/brcmstb-gpio/f04172c0.gpio/power/wakeup_count > 1 > > Signed-off-by: Gregory Fong > --- > v4: rename __brcmstb_gpio_irq_set_wake() to brcmstb_gpio_priv_set_wake(). Patch applied. 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/