Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1337144yba; Thu, 4 Apr 2019 08:47:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVTcAOaOU2oMtmLta7ZjvCBOeL8xE2yTt1v4dDqU07bIreqVY6TRVjMy15PL9z/f3SoBu4 X-Received: by 2002:a17:902:2c01:: with SMTP id m1mr7102987plb.186.1554392879273; Thu, 04 Apr 2019 08:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554392879; cv=none; d=google.com; s=arc-20160816; b=dG24bJ2r4X6YTFvD2EHA/26u/lFfF4GvbroOHMs8IdyKSMcWFihdybfzFEO0ml0agA x5C4Bka067dGN5h9ejlL0CYxdnV9J8a76SJJILp8yIohxDwXyjfzveI74EN+eGcDc3Yr W2TYE6PqAIqt7tLtans6zgM+l3nnWihhYHQUqb9jrHmn/WhtOAqz37a/oltYDF2V8+54 3i0+CmcWVvFe7NWTuyhLUbUkLIrOM3zCMBdrJ+s7qTNp0zncNxHu0QNWGGhx/LP6nVm3 cbskbI7nBDmYKE/J1SBmtCF0Z2I5xkuIom+qNg16OSasQnuW2YjcUJpXJieTUzOItBSX 1hrA== 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; bh=n8gRJMICwdjjPmJZUtaM6oeLwi+MaWpqWKTPDjj9cBk=; b=Fkhr8kqoIKBM6gIHvCdgtvayMY7AYtBFRJBJMyhREeFZlwrTMfGdO9hhcmY8/l4s6U bkWz3yciUZZe7qP7cQErwy9HDx60njGvHnLeIYETsg543bvoMYxLz2z+e3xauXqrCqwT rRe/c6hAWbi4bNxPqYP2lJuGW6RfvqYPsSSzXZ0vt7yeEfrCyYAbgAtizto9WMiduHaa yc9kAfSRwU9MwaNqLimBG7WgISR4dRc1gcy7ldr3iyMyji1oApX2PyANS3uVEWtuS/Rl +WpCvmfQzxnmOiawOl/ADkHGwRGIaHcGc/b3ndk4NnaklPHO1mW3cXwxUNi3e6usk1GG FkWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TIYv+W/C"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u71si327894pgd.147.2019.04.04.08.47.44; Thu, 04 Apr 2019 08:47:59 -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=@linaro.org header.s=google header.b="TIYv+W/C"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbfDDPqw (ORCPT + 99 others); Thu, 4 Apr 2019 11:46:52 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:36518 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728744AbfDDPqv (ORCPT ); Thu, 4 Apr 2019 11:46:51 -0400 Received: by mail-vs1-f67.google.com with SMTP id n4so1655531vsm.3 for ; Thu, 04 Apr 2019 08:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n8gRJMICwdjjPmJZUtaM6oeLwi+MaWpqWKTPDjj9cBk=; b=TIYv+W/Cr5WxbCAVkhpQmaC8TbZRy6Cwrvf73Yfnhe1ZXyiTVyhFf1mf5xMr52eWwm WZ569nx2iR1l4iT+rrdi7QNsxF2sH0v79ew2+yDe3oOLYtmeLg+WB9bm/bsQE391aD/5 EYWL3jfROrXFeL5z+wKD8LeEOpq6TD82uS4MX9VnPmO09neJExkOSxCttkaGO1SZ4QMH 1lnRncEy3suDD94CMbOyNrFu21iW8Oi9kMgG6TIjawl643fPb7+iQ0ilNCadYzXqveOr ys2Ry/29QbocJYVgF1j0DcZvy8evCoywnnZOyfuL2decqM4v+Lsx0B9loTwIeUxhmdNQ UDTg== 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=n8gRJMICwdjjPmJZUtaM6oeLwi+MaWpqWKTPDjj9cBk=; b=aFlCXXYoke7qiPNy69fccv80mkY62fFTuDPRWgHxFK74PlNpQ45Z8nx06f5Fd1UwrT sX1UfWZBLF9DSgyM9chwbGUlfkabhbKLrrOF11wpuNRIoAdV4XafoP/asc3bS/sG3m06 cyE2gd+A6IxLEGHXJBhzSh4StoSt09sm81jsvdGYe+jG4Y/TMhGInn8Wjjs9Ha4EYrhj 8FQYUEp5kDrGBDjQhihHjByj7eU2icQF88Zxbx+z6lfquWjDrsioTZqK4QyVrZ9JJZS9 D/+P8qMAcJSYQe0WXBRiA5DTd4kqQ2dvhOioP55/P6FqepYp0RVm7sJtZtmEswI/ISUl aprA== X-Gm-Message-State: APjAAAWT7UlFY3sgbPscEue3ycgQMnD7tTTwl/BBuCP7aNXbTbqoMvDO qGazgGFvRTEUWcMN18HmA6Fjpdkow5pD9BABnC9Wlw== X-Received: by 2002:a67:2e8c:: with SMTP id u134mr4562798vsu.57.1554392810775; Thu, 04 Apr 2019 08:46:50 -0700 (PDT) MIME-Version: 1.0 References: <20190320103927.21227-1-geert+renesas@glider.be> In-Reply-To: From: Ulf Hansson Date: Thu, 4 Apr 2019 17:46:14 +0200 Message-ID: Subject: Re: [PATCH RFC] gpio: pca953x: Configure wake-up path when wake-up is enabled To: Geert Uytterhoeven Cc: Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , "Rafael J . Wysocki" , Kevin Hilman , Laurent Pinchart , "open list:GPIO SUBSYSTEM" , Linux PM , Linux-Renesas , Linux Kernel Mailing List 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 [...] > > > However, while this approach is known to work fine on other boards, with > > > other GPIO and interrupt controllers (gpio-rcar, irq-renesas-irqc, > > > irq-renesas-intc-irqpin), it wouldn't work on Ebisu-4D, due to different > > > device suspend ordering. > > > > > > The proper ordering is: > > > 1. When gpio-keys is suspended, its suspend handler calls > > > enable_irq_wake(), invoking pca953x_irq_set_wake(), and causing > > > pca953x_chip.wakeup_path to be incremented, > > > 2. When gpio-pca953x is suspended, it checks pca953x_chip.wakeup_path, > > > and marks the device to be part of the wake-up path. > > > > Right. > > > > > > > > However, gpio-keys is suspended _after_ gpio-pca953x, breaking the > > > scheme :-( > > > > Would it make sense to fixup the ordering issue via creating a > > parent/child relationship or setting up a device link? > > Could that be due to gpio_keys not having rudimentary Runtime PM support? You are saying that the parent/child relation ship is already there? In such case, it shouldn't matter whether runtime PM is deployed or not, the PM core should propagate the wakeup_path flag from children to parents in __device_suspend() and in device_suspend_late(). If that doesn't happen there is bug in the PM core. Kind regards Uffe