Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7596119imu; Mon, 3 Dec 2018 15:49:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/X6CRQxDmJJOW/D2WXZxxWQPwgnCfU9/7b7wPRn/FWrEpdSibNMUUsXB/K4tEn5gKcYydKI X-Received: by 2002:a62:8985:: with SMTP id n5mr18044309pfk.255.1543880967508; Mon, 03 Dec 2018 15:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543880967; cv=none; d=google.com; s=arc-20160816; b=aC1tO0PigxXe4usDyTablgJ3U+JalF5mA8/xWTjMckjnTxc+R1YRJ3MWdtuDjlrt8c vrf5md81BAs52KgYyQTk6E+ffL2gdBrmc3BaK9jr6472j6A/wE1uOTc1Ph8n0Kvo0hyI RdMiw/YUBF2uCi0hYi9EVVFQci6Z+3W7ZLYyerOAsxARjquOEfnHExRaoI37+XC7aTru rjl26sPxQ4VSHoZYcmQUuU609PdrSzUG8z9tGNFTs/N9ZDrlO2N8Jt2QZuOu3FMXP/tu egZwIpRnVXXgZQYGSDGW98VDj8UAzzdbT0QXRPDV+rtLDXQSQqexppFYd29rEYAD4HLH l3Hg== 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; bh=8TlFaMonp9oxMSo4me7gJfHFdO0cVi4wJZxa2g4hFaA=; b=JCnoDUtVq54TIk7RKdB4gw5srXosTKEK+zILbKtNmR0Dx64hegbNr8JfvrAAeNQKMi oMapAKfJpqZxzpkJ6ublCkj88RLJRWIOYhuoBbr4rdU34amfpouOwNJ06+H0rwJPhwo7 fzFDCyJ4WGGKPyxsuwy/f3gKNkaY+smKS/MwnRSFUm7dVfpr2zUOWjEgbTrqivNtSWoO mXTdU4kG4l/ZSOLlx+R8dHH492/nzf2upeZjC8AQdFUV7i1jNtJGwhbXiWAUIOjAGFmw fOdLuSBLaIWu29/ox0Z2cOkuWnUm+IrBgszXing22lEsDbAuazhRxRfvaFTPxwBYgAGb nFmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=C0AKAMWx; 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=NONE sp=NONE 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 y188si16223006pfb.59.2018.12.03.15.49.12; Mon, 03 Dec 2018 15:49:27 -0800 (PST) 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=C0AKAMWx; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbeLCXsd (ORCPT + 99 others); Mon, 3 Dec 2018 18:48:33 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44981 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbeLCXsc (ORCPT ); Mon, 3 Dec 2018 18:48:32 -0500 Received: by mail-pl1-f195.google.com with SMTP id k8so7268976pls.11 for ; Mon, 03 Dec 2018 15:48:31 -0800 (PST) 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=8TlFaMonp9oxMSo4me7gJfHFdO0cVi4wJZxa2g4hFaA=; b=C0AKAMWxF1LoUkYkcb1QksQsdikZ2wKn4aylxyT97HJSfdO4F6SJox6tLsh48AAeak dLPcO/mz/iSAvk6jl6gcfGua1nBUcaDtG9LWmx0PqgiGBYP/wCnI0MOFdH0yxH+/FGjL n0WHdPPJL3108wG+W4P9JD3ZXGMO2TaE2QeGc= 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=8TlFaMonp9oxMSo4me7gJfHFdO0cVi4wJZxa2g4hFaA=; b=Z8u9yPSM7CU/Zeqs9KXkNtGS6U6sREj7aTuT+8gKme6rJ4Mko4MDLo38iQbSAVPXvQ 6OIJCy/gBRbeNJ9adTnSMC50htRPhTR4mzJesjl/xcapg2roOEtRN3nYLJJlNN/Pgl1m HWAHFmi1MLdS4p9O46baVt1GxxQavkE8G1uVj8qpq59Nfmzs/6NbGH3QJqo7KGmQaiga JE2rgdX22DVCbX3pIA9d5qXxQoWc0W6VXJZ2+yHc5xKAXGH1JS6OyJCmTpqt1/qpD9G4 QFl70V3WApEtl1JwT5Ec33Dpz1vAqvpIbLPddkYv3LrUgi+u2HU39CwpeBEGg9E0yIvI mcGw== X-Gm-Message-State: AA+aEWYcjpE4vBUXetdQvwATasqTZPsQXZgtwPISAvY5PqKiIRP39vDz P0/Q4gXBYW4DtWqWv3qB57TlmIWB2tM= X-Received: by 2002:a17:902:b707:: with SMTP id d7mr9098319pls.29.1543880911479; Mon, 03 Dec 2018 15:48:31 -0800 (PST) Received: from localhost ([2620:15c:202:1:fed3:9637:a13a:6c15]) by smtp.gmail.com with ESMTPSA id z191sm17071850pgd.74.2018.12.03.15.48.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Dec 2018 15:48:30 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Bjorn Andersson , Lina Iyer From: Stephen Boyd In-Reply-To: <20181130183317.GL18262@codeaurora.org> Cc: evgreen@chromium.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, rplsssn@codeaurora.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, thierry.reding@gmail.com References: <20181121000648.29262-1-ilina@codeaurora.org> <154283618199.88331.10217252750356423959@swboyd.mtv.corp.google.com> <20181126161455.GA28236@codeaurora.org> <154330994255.88331.11409511159882116164@swboyd.mtv.corp.google.com> <20181127182123.GC28236@codeaurora.org> <154335513853.88331.9713562640538396853@swboyd.mtv.corp.google.com> <20181128173959.GC18262@codeaurora.org> <20181129002457.GJ24969@minitux> <20181129214539.GG18262@codeaurora.org> <20181130183317.GL18262@codeaurora.org> Message-ID: <154388090959.88331.13819513007141877197@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [RFC v3 2/3] dt-bindings: sdm845-pinctrl: add wakeup interrupt parent for GPIO Date: Mon, 03 Dec 2018 15:48:29 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2018-11-30 10:33:17) > On Thu, Nov 29 2018 at 14:45 -0700, Lina Iyer wrote: > >On Wed, Nov 28 2018 at 17:25 -0700, Bjorn Andersson wrote: > >>On Wed 28 Nov 09:39 PST 2018, Lina Iyer wrote: > >> > >>>On Tue, Nov 27 2018 at 14:45 -0700, Stephen Boyd wrote: > >>>> Quoting Lina Iyer (2018-11-27 10:21:23) > >>>> > On Tue, Nov 27 2018 at 02:12 -0700, Stephen Boyd wrote: > = > [...] > >BTW, I am discussing with the internal folks here on if we need to mask > >TLMM when the wakeup-parent is MPM. If we don't have to, we should be > >able to follow the same model as we done in this patch and don't even > >have to check the compatible or use the approach suggested by Stephen. > > > The TLMM and the MPM are not active at the same time. However, there is > a small chance they might be (a few clock cycles) when the system is > going down, but even then, since we replay the interrupt from the MPM > driver before the interrupts are serviced by Linux, we would not see > multiple GPIO interrupts. > = > The way we have MPM working downstream, for a wakeup GPIO IRQ - > = > a. Application cores gets a wakeup interrupt either from RPM or GIC (if > TLMM was not powered down) while still in the interrupt locked context. > = > b. In the hardware, apps core handshakes with the RPM and then starts > resuming from the platform's system idle driver. > = > c. The first CPU to wake up calls MPM driver from the idle driver, which > reads the shared memory to find the MPM pins that are set. Converts the > MPM pins to their corresponding linux interrupt and replays the > interrupt. > = > d. Idle driver exits and wakeup GPIO interrupt is handled. > = > The MPM pins are not updated after the RPM lets the application core to > run. Since TLMM is functional after the RPM handshake, it takes over. > = Thanks for the background info. I don't think it really changes anything that we've discussed though. We still need to mask the IRQ in TLMM all the time when we're using the PDC and we need to leave it unmasked and replay edges that the MPM sees when we use the MPM. Should I clean up my RFC patch and post it to the list? I'd like to see hierarchical gpio irqs work in general for this problem and also the SSBI/SPMI gpio irq problem that Linus pointed out last week.