Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2304802imm; Thu, 9 Aug 2018 10:31:59 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyUMIguoXQEa93qupNJtj2bKVG+c2Xssn6gnPd4mFPRBL521bzdjnmp7Q3F7SBpdTb6/O/g X-Received: by 2002:a62:9349:: with SMTP id b70-v6mr3291596pfe.193.1533835918968; Thu, 09 Aug 2018 10:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533835918; cv=none; d=google.com; s=arc-20160816; b=OxKKqFtcVwjIwFGCRhynpNkw9zgwjHLuVRF4LXN9qIp3UVy1pqcbZkG/NO6wMlYl9Y 4uniWS+vIneheUyuupbJhedJMtHgWNssZwgxIA5Fgmz6l7LViR6FFNJGuxVGwtVKztpB uGBmOIXxrq2xziQC8mrzFV/e6nqA3OtMfIuUNsbOVw7I7AQH6PRumtnYEFiQQ6EN1zLp ePPZeOgQpS1AF0HLDkBS9L1opx4CZ0PtBhYHIDqM3+FJA2JqZUAcpv+HzUU0i8Mxq3ic NJ0EqtKPTaHKKRO0NT4ZbZ1WEml0i5M+BDj8CzQw1LGN/82djy+MLoB+tBCwtovBDsUL J5nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=PcFBIdm56J4VcOS3323480oATpUi/0b04KYiQNpp4rM=; b=owmEzQXhoWmmd8SGYsVaSyJMcuvRFO7rIvZKmcJDe/Cpy4EDXzvS7nIKIEMF0wET9s kLj2u6r7tGe38MElLJ6pXeBCa4YAEXEKV+szVCSkepBfvh/vi45FtVq9Pgo/jJeTTQBI si9ku7tXswwH93vbxugIF/Aer1wiEGSyk2pYp7zLal3WILlrOHWhH8Ve9Su37KCkhMm8 fie8rhEqwNDfWZXYMG6qwi6P7ofuVzaUPQNy2bb74r7oUuIx/JGRz4Rdi/BoovvYJyN+ n4qq03v3FFB899TjsypsfDCYnhd567Tj6L4+vSFrizOtcVr59uKKeUwAkR0LcMx7dg9O r+uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jbtdX4+6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si6074590pls.477.2018.08.09.10.31.43; Thu, 09 Aug 2018 10:31:58 -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; dkim=pass header.i=@chromium.org header.s=google header.b=jbtdX4+6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732583AbeHIT4q (ORCPT + 99 others); Thu, 9 Aug 2018 15:56:46 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34097 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730839AbeHIT4q (ORCPT ); Thu, 9 Aug 2018 15:56:46 -0400 Received: by mail-pl0-f67.google.com with SMTP id f6-v6so2845562plo.1 for ; Thu, 09 Aug 2018 10:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=PcFBIdm56J4VcOS3323480oATpUi/0b04KYiQNpp4rM=; b=jbtdX4+6/ixTU5Vh/xenFgJXTVEwJLJAQqfhDBcX88/zFLuFwPSmf6YElCsrDrlxnx HrYWdAeDa4/EY9Hb3irnSsiOMTZKxMLDvEB2u5t6n9LTmHG/xqofhYknffVXkvtbbmar sQZGrlz4GBVwYQ27ljeS+eGjJr9mCrK/bzmfk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=PcFBIdm56J4VcOS3323480oATpUi/0b04KYiQNpp4rM=; b=SDQxwrECQdBH3TLtQs5+5CHmUG7h+S39LbETwF9ar++20a7oZYbPeqZX6YX/jPv3SH 7Ku81vNHZaoGUzwgjQ/M+opxIsk0Sxie8uulnHYybE9E4oA0DHdpW+gWUMa5BfbhAqd2 RrvAAwvqcGvvwf4exCzV4wYdP1EExDmQlcIwJHf+x6be8El53aVSMtCfXawiI9wxXW/Q QpLRudT4uJHsRqQz6wgVzfSsmS8ctKL3WBMEDmJETUhHf5x/Kl5SPRWGp17fdxY2/eLW neQWwEhL7eyyMcoLzbj6J6QJStr/YyW9xLii6QO9mdmGsCBCbsPyeX/YOgGPG9Djs6O8 1m6g== X-Gm-Message-State: AOUpUlEbYH6s5P+/Fz4X7yyR7uSwqipsaGj1fH/ONnjqhPohVRvsABnZ Dqy/kIx23ABRZ6zAfMmPJBTERg== X-Received: by 2002:a17:902:c85:: with SMTP id 5-v6mr2900009plt.141.1533835854519; Thu, 09 Aug 2018 10:30:54 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id g20-v6sm9257466pfo.94.2018.08.09.10.30.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Aug 2018 10:30:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Marc Zyngier From: Stephen Boyd In-Reply-To: <20180808072632.21f076b6@why.wild-wind.fr.eu.org> 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 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> <20180808072632.21f076b6@why.wild-wind.fr.eu.org> Message-ID: <153383585322.220756.9422019201626837843@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH RESEND RFC 1/4] drivers: pinctrl: qcom: add wakeup capability to GPIO Date: Thu, 09 Aug 2018 10:30:53 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Marc Zyngier (2018-08-07 23:26:32) > 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. Right. I suspect we'll still need to configure the PDC to actually wake up on the level triggered signal though so PDC needs to be told to unmask the line. > = > 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). > = Ok. Looking at the hardware it seems that I can write the interrupt status bit directly for an edge type interrupt and that causes the interrupt handler to run. So that's good news, we can use that ability to directly inject interrupts here.