From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E97D5C04AAF for ; Tue, 21 May 2019 05:30:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B54FB21743 for ; Tue, 21 May 2019 05:30:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O773D8md"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KInkiCDF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B54FB21743 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J+sX3c2BP2ri5/UvnbSCeDPolFLhblMLckPWp3yaVJY=; b=O773D8mdzLrsqp Rd55pvA2B1ZaphTTJJo7nziAKAdXPMLzpBNC2zdlVx835eBxmAEiW6wlSH8gzrK6LSSH03qgYuhBJ ekYQZHGMD/v2GYWBWR3dxE8BzSq6xOtwQWTyK1vyzYnC9WTNEvldyr+4ujld3/ZXqMK68KPQyyfD3 GeHirWks8hCGsXzhvm9onbkqtZwjn2+UWUgKHAjdwaDTISKNpr8IFNjhrBIG6pESt6y3VMFdV0dWL Bolah5nq+WQP+xLh5TU2NVD8ekw2fJw+6fz18XcFPsAlN2q1hNt6h9qkD6zSnFUqWnsRpwtuQoQVf Yrw55eiwhZLW5hr22Rog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSxMV-0000xy-GE; Tue, 21 May 2019 05:30:55 +0000 Received: from mail-it1-x132.google.com ([2607:f8b0:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSxMR-0000xW-Q7 for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 05:30:53 +0000 Received: by mail-it1-x132.google.com with SMTP id e184so2772404ite.1 for ; Mon, 20 May 2019 22:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8qN0twdFcwXuepzLmJZnPlQPdwe8pV/UL2Zay+CiZEw=; b=KInkiCDFWuYqXHPIDcw89Bqsu1qxHPFy0Ke9vwbcjv0yIpwnhei08uqTk+c1S26RHs 0wJBAt7cmZz5bO/4Hie52tA5ikSCxvJ1jHjjUMGNuWuDUTnkRE//rkLI47Qzxers6ozt P9jXOxiLTXavrK+kpnRszjdkJY/eA2m1PM9l1sVGHtRhHeHc9y6V6O4xDEPigQKsTSXs dCXTYy78q0EZp8FOLwbd3NaushImT1RR3cU0PB86wzU3xNlAb27HbEKn9KD7CikA42VI yrmd0nLS9xWbmoyfPPCq+xFa6Fu1IM19OPkDZEs3uAIvR6sf3rrUDp6iDwCCMAFHPOE0 UTtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8qN0twdFcwXuepzLmJZnPlQPdwe8pV/UL2Zay+CiZEw=; b=kQ3bpuBUuCys32UGfWla9o6pRUvmAAb+bXQqEXTQKWDzqb3sQhbuU0nYDpg1yEfzqV sLOcTNBlaxbSyxNQ5CwsHJnCClRWwMr6crd/cfSVT5GnA9SNpJqsWv8SuoCielRTvmKi PT4XHgU0BccU/eDns6n7AXnE3/gSKXaIsbAcIpBOMZPrxpyxz4+ed9rz8oPNBx20X8PB kczQ+BcZ6vQhv1zT+MRlB74wDKnoG+qtLYFIrWEZ81eKVSdITLy0Cyc7SCvO5eI+eMnL kLvZ818yO/qqE53/c6RH0kZnFZhaFZrjiv6z0uXi+v3ufIM0zdXnG/VZ5T7KZaroeMqT YlIA== X-Gm-Message-State: APjAAAUcA0ai4KPXQDMJQAF4VRRfKOb3CaYWEzwZVmPAjBLW1VKuXKBj 4eTLClGxD8p5A191gsOpo5o= X-Google-Smtp-Source: APXvYqwuIWQFVA9y0u/gRe18vPIYmGs1HAuZAsz6ATsaeQ0fOvJWojiW3Q1JE8LlXwqX/9UZaYFbsA== X-Received: by 2002:a24:618f:: with SMTP id s137mr2331223itc.134.1558416650374; Mon, 20 May 2019 22:30:50 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id w132sm861310itb.30.2019.05.20.22.30.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 May 2019 22:30:49 -0700 (PDT) Date: Mon, 20 May 2019 22:30:47 -0700 From: "dmitry.torokhov@gmail.com" To: Anson Huang Subject: Re: [RESEND] input: keyboard: imx: make sure keyboard can always wake up system Message-ID: <20190521053047.GG183429@dtor-ws> References: <1554341727-16084-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1554341727-16084-1-git-send-email-Anson.Huang@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_223051_873994_193F4BBE X-CRM114-Status: GOOD ( 14.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "linux-input@vger.kernel.org" , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Anson, On Thu, Apr 04, 2019 at 01:40:16AM +0000, Anson Huang wrote: > There are several scenarios that keyboard can NOT wake up system > from suspend, e.g., if a keyboard is depressed between system > device suspend phase and device noirq suspend phase, the keyboard > ISR will be called and both keyboard depress and release interrupts > will be disabled, then keyboard will no longer be able to wake up > system. Another scenario would be, if a keyboard is kept depressed, > and then system goes into suspend, the expected behavior would be > when keyboard is released, system will be waked up, but current > implementation can NOT achieve that, because both depress and release > interrupts are disabled in ISR, and the event check is still in > progress. > > To fix these issues, need to make sure keyboard's depress or release > interrupt is enabled after noirq device suspend phase, this patch > moves the suspend/resume callback to noirq suspend/resume phase, and > enable the corresponding interrupt according to current keyboard status. I believe it is possible for IRQ to be disabled and still being enabled as wakeup source. What happens if you call disable_irq() before disabling the clock? Thanks. -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel