Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6608746imm; Mon, 27 Aug 2018 20:22:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaSfd0bBUX5s5AhvFuWrfyKO6tGIEYniMW97YZIeUCm3+NVfJR1zMXc7fMhJ8Gs5xCHz99A X-Received: by 2002:a65:50c9:: with SMTP id s9-v6mr98591pgp.417.1535426530682; Mon, 27 Aug 2018 20:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535426530; cv=none; d=google.com; s=arc-20160816; b=zi7rEps54xbWeTWY4h5T3gj2H/AYhvoss5aIF+L7/V7/xGkYlv3p7H3/IA58Bfej1k s6Bye53DhnfHOKptIPxAs3iC/TEObg1fcVi1zP/RjL8pPbGsTIlKsRLPAHh/uhfSm/Ax FLj/piY/JCubIsJY5lYbk7Qe+mhp4IcEYvwkpANF6ei9fXrstms/z4RZxX8w3IHtIpOe zTd5dCkSYKj0cAjY6pANgHnch/v6Mo4gTaLKlpsbc6mEWCFE7+79mBb5KXpzmtmMlYFl /G+P9CDKwuM8SEQAn5S+rbiTz0q4UXSfirHAanctVKQPEp1ylZvNOIOsNeJ4ghaPUX+B NFEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=XqVY13ctqCmZNLdkXkl0It0wv9BBmcQ2gHNsbE+VX2Y=; b=Y0909g3LKW2309ZVrsHRn5cTZGisOvbJAYpww3kCQCVCMuHxFCmb9HrFCMSL0OcXVT FCfUpIV9E4ktQleAZFzh42TGEYxh99ooUI1CsdGcehWPg1VDH00apRck4Ykj2DTKAAgE D/fbMB73Xstg5fSh/771xyAAg7bOgqJo9SocjMfKsBhBZxS2k931r9KLDj0ZMmxW1q/B 8m17/nYpNzrRmKBL8QieRTAyZ2fNmMlbrNGu0yW8N8HHy8lhTHWjeWbx9ZOFqTwuvq9o r1p4H7hOkWtJok1LE4p5G+Z8JJ3Kj/IL+tb73kTsvhavrtxvywCrzI0Ya1IG+PlHrGHT yrsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k1sD4dFd; 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 n3-v6si1113140pld.146.2018.08.27.20.21.55; Mon, 27 Aug 2018 20:22:10 -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=k1sD4dFd; 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 S1727167AbeH1HKJ (ORCPT + 99 others); Tue, 28 Aug 2018 03:10:09 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40155 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727052AbeH1HKJ (ORCPT ); Tue, 28 Aug 2018 03:10:09 -0400 Received: by mail-pl1-f193.google.com with SMTP id s17-v6so93192plp.7 for ; Mon, 27 Aug 2018 20:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XqVY13ctqCmZNLdkXkl0It0wv9BBmcQ2gHNsbE+VX2Y=; b=k1sD4dFdL9pJ4I60PriTd8TGmKgrdXmYrFxd2Stc8uploZ8eiT6wlJkOGBld6SUf++ CUaDBSI7+NglKTKJ1pFEe11128aIFH1fzjsUYzqBHChV99aOVzQ8Ol28poIAlBzXNpcC /Savka5gAhxptrAfazpOnBLc4WGUW/gyqu7OE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XqVY13ctqCmZNLdkXkl0It0wv9BBmcQ2gHNsbE+VX2Y=; b=iM+k5V4AU184Aq6GN1nhZuC6RNVNUc4uHr2NLXzP/PCC8PX/szX0Wy73XyupdudNn1 7V1NjPM3K9+Gz06sPIBzKs4G1ePSBDI7wAOTLhdTjySVujp5EcmI01gA+JxEVWW0jYmS GIy9PKCRrluB4kQcTYCFYSFC0JnxzX6N2L3cxIbjtC4ERH+qB84PcUz5IGOdLYTKq9Lp +Idjk/fHNkvNOB2DIUAwvm8iaWKMETZE/errY1fAlVxUOmMXb5t+q4uXYZLvkfEM1qG9 IF9ZWZ1HI2UIhhJktJ9dUhUxhul9ErtzSHKlsNg7ZqtcB+NLF0i/lWY9+igArfmtHJED bJFQ== X-Gm-Message-State: APzg51ADNtK31gUiovmUVAVl9oaN03wKTnB38r8ogEEdvxCY73FaqiaN 2ABG4SoFT0nEdbxRqZEp+Upd5Q== X-Received: by 2002:a17:902:6b89:: with SMTP id p9-v6mr15412414plk.272.1535426437336; Mon, 27 Aug 2018 20:20:37 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 87-v6sm884078pfn.103.2018.08.27.20.20.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Aug 2018 20:20:36 -0700 (PDT) Date: Mon, 27 Aug 2018 20:20:34 -0700 From: Bjorn Andersson To: Lina Iyer Cc: Linus Walleij , Hans Verkuil , Hans Verkuil , Marc Zyngier , Stephen Boyd , evgreen@chromium.org, rplsssn@codeaurora.org, "linux-kernel@vger.kernel.org" , linux-arm-msm@vger.kernel.org, Rajendra Nayak , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Andy Gross , Doug Anderson Subject: Re: [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO Message-ID: <20180828032034.GG2523@minitux> References: <20180817163849.30750-1-ilina@codeaurora.org> <20180817163849.30750-2-ilina@codeaurora.org> <20180827165644.GR5081@codeaurora.org> <20180828002641.GC2523@minitux> <20180828014652.GB13998@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180828014652.GB13998@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 27 Aug 18:46 PDT 2018, Lina Iyer wrote: > On Mon, Aug 27 2018 at 18:26 -0600, Bjorn Andersson wrote: > > On Mon 27 Aug 09:56 PDT 2018, Lina Iyer wrote: [..] > > > Thanks, I will look into Hans's RFCv2. But what would help me would be > > > to avoid creating the IRQ for the GPIO itself (I have the latent IRQ), > > > if I could just return that instead in gpio_to_irq(), it might be > > > easier. I understand ->to_irq() is supposed to be a translate function > > > only, I can avoid the dance of enabling and diabling the PDC IRQ on > > > suspend and resume. > > > > > > > I did implement gpio_to_irq() like this in the PMIC gpio/mpp drivers and > > we've since concluded that we need to move this to some hierarchical > > interrupt controller, because people like Linus expect to be able to say > > > > interrupts = <&gpio_controller 1 IRQ_TYPE_EDGE_RISING> > > > > which is something used all over the place with the TLMM driver today. > > Does it have to be &gpio_controller, can it be another interrupt controller? > > Say, > interrupts-extended = <&pdc 1 IRQ_TYPE_EDGE_RISING>; > It would require that the GPIO interrupt number space of the PDC matches the pin numbering of the TLMM, to be somewhat maintainable. And it would still require DT-writers to know that if the implementation of a compatible, that references a TLMM IRQ, wants to mark the IRQ wake capable it needs to reference the PDC instead...while still having a pinmux/pinconf setting for the TLMM. And for gpio_to_irq() we would need to do the mapping that you suggest, so the TLMM still needs to have all these references to the PDC. So I think it would be nice if we could avoid this scenario, but I don't have any good ideas of how to do this right now... Regards, Bjorn