Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp464802imm; Tue, 7 Aug 2018 23:27:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPww/+l66+TuxrQ3ZByM/N4l6G0xLB1c32ePyUFsPysOfLKkCeveOw+lB7jGnCqfj6wdXkwZ X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr1310658plv.37.1533709663359; Tue, 07 Aug 2018 23:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533709663; cv=none; d=google.com; s=arc-20160816; b=UVOVenR461VPC0KVrPVa7UOiNdAW6jlJ5dE3E8uXOOrDXGuexZUCVpxv+094yzFom/ iHl7r1ARBlUnw52wWrOyDmzr+pBD+sB7XNl1QTgk1zJEXkcBghRDuczXj8xtQAGq4YLG xzKJq3sC872ttgDQ61uHGHn4m7foLfSgEbdXyfx/gTDHderozvivoMeLxUa+UVOR0JG3 BL/B0SctBxd4E4Mp8WXZmwACh1EnyhRLEDio71uJzqLLVJQqmGu58TLEoTzI6rmbUPnh poA7mxnHp6qOTI+GlxGNZ+bZVBt+PX+Rw7rYn+HjufoE1tNIisDyQL6TwDpCvYMb22RL vvYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=hcjpCaoAxL7g+jqUsx0U7gK/IJuGBDbRMqmcwyE9vhQ=; b=T/QIlAeY6zyWZcQb0oM9AiBqaD4MnS8xdo9FHgUUu0DW9eXyXIWuBV3pPTev0AVTgb 4hOwUF6vftAkIxMRK5XmAWiV8THdYP2n8tt9gQO4uA1cuacWoZIj09DlR1jdp8TrcoUc GVTtffYKKgVLLIhhPzUZqN4fxJGm70e7PrqB9OV6KZvMX/HLLwxs9TAWC/lhqLEwgBOr B+98y/VmBANxjJqMDcXwn8Ml2h0DLb0vZMwagd6IvDqfAjXjpUKiRfuW1EhFj/MWQ+/g vTNXoB40Oow3CAElsCswppdb6/T8LfV8/k6tLVH7FrRUGkCAYWMw5av22Qo2GNdoTWhZ 7ebw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d128-v6si3747924pfc.211.2018.08.07.23.27.28; Tue, 07 Aug 2018 23:27:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbeHHIot (ORCPT + 99 others); Wed, 8 Aug 2018 04:44:49 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:34786 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbeHHIot (ORCPT ); Wed, 8 Aug 2018 04:44:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 271137A9; Tue, 7 Aug 2018 23:26:38 -0700 (PDT) Received: from why.wild-wind.fr.eu.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1B8213F5D0; Tue, 7 Aug 2018 23:26:35 -0700 (PDT) Date: Wed, 8 Aug 2018 07:26:32 +0100 From: Marc Zyngier To: Stephen Boyd Cc: Lina Iyer , evgreen@chromium.org, linus.walleij@linaro.org, bjorn.andersson@linaro.org, rplsssn@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, rnayak@codeaurora.org, devicetree@vger.kernel.org Subject: Re: [PATCH RESEND RFC 1/4] drivers: pinctrl: qcom: add wakeup capability to GPIO Message-ID: <20180808072632.21f076b6@why.wild-wind.fr.eu.org> In-Reply-To: <153370830708.220756.4595316550560511917@swboyd.mtv.corp.google.com> References: <20180801020021.9782-1-ilina@codeaurora.org> <20180801020021.9782-2-ilina@codeaurora.org> <86600uy4vh.wl-marc.zyngier@arm.com> <20180801194538.GA6422@codeaurora.org> <86wot9wb9u.wl-marc.zyngier@arm.com> <20180802065104.GA27850@codeaurora.org> <86sh3xw7m9.wl-marc.zyngier@arm.com> <20180802125827.GB27850@codeaurora.org> <153370830708.220756.4595316550560511917@swboyd.mtv.corp.google.com> Organization: ARM Ltd X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 07 Aug 2018 23:05:07 -0700 Stephen Boyd wrote: > Quoting Lina Iyer (2018-08-02 05:58:27) > > On Thu, Aug 02 2018 at 01:27 -0600, Marc Zyngier wrote: > > > > > >Sure. But once woken up (GIC *and* TLMM), the gpio line (which I > > >assume is level) is still high at the TLMM input. So why isn't it > > >registering that state once it has been woken up? > > > > > >I can understand that it would be missing an edge. But that doesn't > > >hold for level signalling. > > > > > Sure, yes. Sorry for not registering your point in my response. > > Once woken up we should see the level interrupt in TLMM. > > And the level type gpio interrupt will trigger the TLMM summary > interrupt line after the wakeup? So then the only thing that needs to be > replayed is edge interrupts? How are edge interrupts going to be > replayed? Level interrupts should be taken care of without doing anything, by the very nature of being a level signal. Edge interrupts should be replayed using check_irq_resend() after taking the right locks and making the interrupt pending. Or, if there is a way for SW to make the interrupt pending at the TLMM level, to use that as a way to reinject the interrupt (which would be the preferred way, as it avoids all kind of ugly locking considerations). Thanks, M. -- Without deviation from the norm, progress is not possible.