Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2025309imm; Tue, 10 Jul 2018 11:50:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcT98XvcTVIOVe9WqWfRvglYz+yaC52O2VdlVWxVjPw38Qx+Z4aSpx/J/1iq/SiL1tusqMS X-Received: by 2002:a17:902:7592:: with SMTP id j18-v6mr25263641pll.51.1531248622134; Tue, 10 Jul 2018 11:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531248622; cv=none; d=google.com; s=arc-20160816; b=fQm+Z8ryNDQ0qVJzgJh+sJxWdLH0H4kE84EXLHS6EpJS0JYTF/iqKJ5cy9cFpsaPMk 3EzpNv+Tsn+kxxNPC+Tb9VvVUpLzJDBCenvHbDlrVCzG5UT8lR0L/ZNtd3r/JaM5SEDS H5Bsw2dZ/6ysYK13CKpTHvdnhLIP4ykHb61cfau9BV3skTAc398ShmCRjhu8F5uFbs/S y3OTJ8YukcdecdtBldz8yDZ7PVgX/19bYf8tw86c8CT+bTkSJ3vSdEDoY33tGDg04Fb6 QZlPnA/ZmJQ70b+hg3kR01ED5MPUSh9XGZxCxrW0NzQTAIGDFTnhn12XRD7CwauhFS8Y 77Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=OkFGVlTupMIy0BVQ3T/arjwEZphiZbJiESq5NpaNc9M=; b=ubm1v7N1GChfuFQO7iCfTf4wmlw8Z2nh/QxXoCqNS4auoTqMXUR3wtKMymkI3279fP QDRi3BeBWIvZ9npkZaMYh3/suyogIsww1ld5Z97Vpswg3w+546o16tYIvXOpbniX1NUK tiVvg3v/7CClCXZPdRxjF9KOek6RqyUbayfuRGYtBLukrohg/re0Bm5gg5pYo/u1QRq/ lmCkl7cLZ+fADdgtr2jIS5AVzgs2Tp4AxtniVN0AagE+WvrXB1ZpOivtnDu3y8EiJ4UI wJinDGVi45OgZ7QB1NJT1IIEDO9XfXKZTEVighYmxTFzgwKcSdxBo5Y2td7/trkAS/27 vhVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Vp8luyYq; 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 62-v6si17236405ply.176.2018.07.10.11.50.07; Tue, 10 Jul 2018 11:50:22 -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=Vp8luyYq; 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 S2388102AbeGJSso (ORCPT + 99 others); Tue, 10 Jul 2018 14:48:44 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:37795 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733312AbeGJSbN (ORCPT ); Tue, 10 Jul 2018 14:31:13 -0400 Received: by mail-lf0-f66.google.com with SMTP id j8-v6so19144551lfb.4 for ; Tue, 10 Jul 2018 11:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OkFGVlTupMIy0BVQ3T/arjwEZphiZbJiESq5NpaNc9M=; b=Vp8luyYqQrVJI/rRtAV07+AcvdmVsBah0G75jvrXnG4Xli/Rb5o9acH/ps6XGxMdtF BRvWbaiHT7pJWLjyETUYosN1XSY6Zq4cyVGRmK+KMNpk0QIzWchO/d9WlVAwl7202poF OOPnnOGB/VzegALw5rCGHzIgB6UwglDgbsIfc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OkFGVlTupMIy0BVQ3T/arjwEZphiZbJiESq5NpaNc9M=; b=RwPtMWnUaAF6tQgedozecQDyAOjQQuAdtjYtTDuVtd0FV+i+aLN/c8muW6/JBTgMuM Dae1cqmLfRlMkitLsJtn74ZYzJBDlRUMn3EjDosEwhviof9DvUdPkGt0zAzm38+ravhq qfHv3tP0gRBsBG8lB5BjAwJP5D5/AuCvtq0GW0C4XM9ys27DEFoAS8jSwtFskmSQ5Cdm +FrWbJUMwn861nHZjJy0/G1q/YpkZlRfcxq7uNDhWw0DBpEhkL67OahjNI7uEhXwVdQR /I8fjzAcxNEMXUDz0HakIV1P+c4E5IvCfiK7OwuncpqARhgzVH4BQRFuahwZSfh2YtnO +D/Q== X-Gm-Message-State: APt69E1cnfA+iC6WoRqRQ5Cvy6g4YhcedyVCTqtoKMr4Hk23tcRFo3qr 3zGC8GI9fkPUQf/VwM08Zy154mjIJOs= X-Received: by 2002:a19:9481:: with SMTP id o1-v6mr3720249lfk.38.1531245521612; Tue, 10 Jul 2018 10:58:41 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id o86-v6sm1374298lfi.82.2018.07.10.10.58.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 10:58:40 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id p6-v6so17424607ljc.5 for ; Tue, 10 Jul 2018 10:58:39 -0700 (PDT) X-Received: by 2002:a2e:5c07:: with SMTP id q7-v6mr15254259ljb.119.1531245519031; Tue, 10 Jul 2018 10:58:39 -0700 (PDT) MIME-Version: 1.0 References: <20180619234349.166190-1-evgreen@chromium.org> <20180709173022.GH2050@tuxbook-pro> In-Reply-To: <20180709173022.GH2050@tuxbook-pro> From: Evan Green Date: Tue, 10 Jul 2018 10:58:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl: msm: Pass along set_wake failures To: Bjorn Andersson Cc: Linus Walleij , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, Lina Iyer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 9, 2018 at 10:27 AM Bjorn Andersson wrote: > > Sorry for not getting back to you in a timely manner Evan, I wanted to > read up more on the details of how this is supposed to work. I still > haven't done so, but here's my concern: > > When we power down the SoC we're no longer powering either the TLMM or > the GIC, so the MPM or PDC is used to waking the system on some set of > triggers. As such set_wake on an individual pin or irq should be routed > to the MPM/PDC driver, which (in the PDC case) is implemented using > hierarchical irq domains. > > As such I think that we shouldn't toggle the wake property of the > summary pin at all; i.e. the patch should remove that call rather than > propagating what I believe is a constant failure. > > Regards, > Bjorn Hi Bjorn, That's okay, I always feel bad pinging. Thanks for the thoughtful response. Stephen and I are starting to think about how wake interrupts should work with regard to the PDC, and we're at a place where we're a bit unsure of the path forward. Our understanding is the downstream kernel had an interrupt hierarchy of GIC > PDC > TLMM & everybody else. In the downstream world PDC acted transparently, forwarding most requests directly onto the GIC, but quietly handling wake interrupts as well. With the upstream PDC driver, the #interrupt-cells got changed to 2, and it seemed like folks didn't like the idea that PDC was acting transparently. Correct me if I'm wrong there. So now we're sort of unsure about how to wire in PDC. If we make everybody an interrupt child of PDC, then we lose the ability to specify the third GIC parameter, and we're stuck expressing interrupts with respect to PDC pins, which is an awkward mental translation. In this world, does TLMM need to do direct-connect stuff to get wake-able GPIO interrupts working? It would kind of have a foot in both worlds, with its summary interrupt as a GIC interrupt but the wakeable ones as parented by PDC? So anyway, with regard to this patch, I'm happy to create a second spin that simply removes this function, but for me at least it brought up some larger questions we've been wrestling with. -Evan