Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4217959ooa; Tue, 14 Aug 2018 02:56:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyKI9jYW9QPOD4tUBc/v6FzbZEdd7SI+1TUb/i15cSzBNNstH9O6U/0tnyGoldMZ5y6uEtN X-Received: by 2002:a63:bf08:: with SMTP id v8-v6mr19985561pgf.3.1534240585299; Tue, 14 Aug 2018 02:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534240585; cv=none; d=google.com; s=arc-20160816; b=m2Ri/1qn+WMX52m1abl/xwbve0hLl0IJOnSg8dOo2USRMihC/Je6NTGPa44Oz9uR1Q EC0LxV8Z+FdlwWebhGQuFb/u+y8EarojeyQhq92fv7c0nyWeE4CGQdHZGjxbjjPb2Qr2 LFgWu08qSpUIeb78nbDoImrTVYLoiC5qKqn82b9hs1gph/hN3Y/36fE8pVx1gK3JHVmQ i0GXlF1phBhKDilStttAzZEmxsM+3mDghY+GRj6n7tldryCKJhttSAMt83Nn7eGqJSFO JHl/4dqVvdiIWrbWDYyaDmbQJHXtR7/imbLPcVQ5NYgZzh7qH4OQElaME6VXyzAJ7C+C SG/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=aNjvvikE/gEzloifJyH8U9WdnvYaYvBQYTQFu+mIbBs=; b=AX0kauJc9Q0ph72KObknyYp+mCev2Va6WSed/RvBt6UU8GDReTeElYR9LQk2cgjPaq IwmJkuxyiUPZn/ny7HkyCzpenoA3T6aEtcVESBiy/gg+IW5QbBNbulsxsoNpPUAvvno6 lsjsHrZ6lgBfcK3d40v/ZJ9EgKTM73lNzWERZEP+xOyevzr3ab/7eaBum+8Iypr68vPD uxt2mmoG3QfcwiQR81jpokliCwPqsPaGxv2FqHd8cnrMLstIZTDNzeDAT3lDPQqxQmkv FN27LmmIyxPch5/7iuE38czsfwy1zBGi0/zKqgScYyeUUpGsmTXMwMoiI2Jgcj+UUQa/ Xc/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 82-v6si20334312pfo.229.2018.08.14.02.56.10; Tue, 14 Aug 2018 02:56:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731732AbeHNMNU (ORCPT + 99 others); Tue, 14 Aug 2018 08:13:20 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40596 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730340AbeHNMNU (ORCPT ); Tue, 14 Aug 2018 08:13:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5560180D; Tue, 14 Aug 2018 02:26:59 -0700 (PDT) Received: from [10.4.13.119] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 928803F5D0; Tue, 14 Aug 2018 02:26:57 -0700 (PDT) Subject: Re: [PATCH RESEND RFC 2/4] drivers: pinctrl: qcom: add wakeup gpio map for sdm845 To: Lina Iyer Cc: swboyd@chromium.org, 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-3-ilina@codeaurora.org> <8636vyxyub.wl-marc.zyngier@arm.com> <20180801200405.GB6422@codeaurora.org> <20180813194152.GG5081@codeaurora.org> From: Marc Zyngier Organization: ARM Ltd Message-ID: <91ca518e-3906-9790-a27d-a06d15105655@arm.com> Date: Tue, 14 Aug 2018 10:26:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180813194152.GG5081@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/08/18 20:41, Lina Iyer wrote: > On Wed, Aug 01 2018 at 14:04 -0600, Lina Iyer wrote: >> On Wed, Aug 01 2018 at 02:42 -0600, Marc Zyngier wrote: >>> On Wed, 01 Aug 2018 03:00:19 +0100, >>> Lina Iyer wrote: >>>> >>>> Add GPIO to PDC pin map for the SDM845 SoC. >>>> >>>> Signed-off-by: Lina Iyer >>>> --- >>>> drivers/pinctrl/qcom/pinctrl-sdm845.c | 76 +++++++++++++++++++++++++++ >>>> 1 file changed, 76 insertions(+) >>>> >>>> diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c >>>> index 2ab7a8885757..e93660922dc2 100644 >>>> --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c >>>> +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c >>>> @@ -1277,6 +1277,80 @@ static const struct msm_pingroup sdm845_groups[] = { >>>> UFS_RESET(ufs_reset, 0x99f000), >>>> }; >>>> >>>> +static struct msm_pinctrl_pdc_map sdm845_wakeup_gpios[] = { >>> >>> [huge array] >>> >>>> +}; >>> >>> Why isn't that array part of the DT? I'd expect other SoCs to >>> eventually use a similar mechanism, no? >>> >> I agree and it should be. >> >> One place I am thinking is to add it to the DT definition of PDC >> controller as a data argument - >> >> tlmm: pinctrl@000000{ >> [...] >> interrupts-extended = <&pdc 30 IRQ_TYPE_LEVEL_HIGH 1>, >> <&pdc 31 IRQ_TYPE_LEVEL_HIGH 3>, >> <&pdc 32 IRQ_TYPE_LEVEL_HIGH 5>, >> ^ >> |--- Provide the GPIO >> for the PDC pin here. >> }; >> >> pdc: interrupt-controller@b220000 { >> compatible = "qcom,sdm845-pdc"; >> reg = <0xb220000 0x30000>; >> qcom,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>; >> #interrupt-cells = <3>; <-------- Increase this from 2 ? >> interrupt-parent = <&intc>; >> interrupt-controller; >> }; >> >> Would that be acceptable? >> > Any ideas on how to do this better? I don't think adding an extra argument to the PDC interrupt specifier is that great. I'd rather see some associated array in the PDC binding mapping an interrupt to a pin on which special treatment must be applied. Thanks, M. -- Jazz is not dead. It just smells funny...