Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp161346rdh; Sat, 23 Sep 2023 05:46:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX4BDajIYobbzESXnf7czUcBuQPaqyi7yh/UW9a+pJy0JUs8zSoatjs0+zgR/QoCQWuKPt X-Received: by 2002:a17:902:a5c5:b0:1c4:50f0:c4e1 with SMTP id t5-20020a170902a5c500b001c450f0c4e1mr2126311plq.38.1695473216003; Sat, 23 Sep 2023 05:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695473215; cv=none; d=google.com; s=arc-20160816; b=Lep80gLz00WTF8cXvSt0Pdm3BudrBRQkLMkF7uyE1WkZ+enRwBul3vKsPCY750KhJs OBsjp4z7lc1/egdqJTGsY59CQPzZEgFcEZsbEQel5IU/xnscE09yj9uMAoO82XMaSbE6 91zEWTdt4LtJAuXQXc4A9oETRQT3iwh+ydIWAP39d0eab8uDpY95+cgZz8n6fJRQaVm6 syVTOFzscfoO37oooZrGyIO68mdPqxt6Z12zOmrjqgCiFUGd/52XSsBw/CHF0rzUdIuK DiZziusjmzkJS6zsXpw7bj/V+oVKCB82BkY8gkoc60Or/yzxpP+YS8yHeWbDZf2Ac73A p0dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PL+AQoOO6bjM3p8idVLch1mw4f9cZ8fmXXgJjtTdXq4=; fh=yH4KQfy5tdTRYsScgTcPKWBPABMUFbe//dOqF0VNwc0=; b=b8kCGuxzSuP2pqXCpxaS8UWtnvu1Fk9l5LxgfZbIXXrZyz0Q03JRIFHd2EoBWYqqmp onJao9XlCyL1WbuwktOLGaplzHCe8AkBLMZA0qsHwGfVlFmifmHdYIdjacOMrFEUjqj4 K+sAqOmy8FzaKPqNhXuVz5maZMqUSIeeaoEGS8HsS1zFlEE+/a32TJcDhKsr5l9btzQF pQ0cSnTiEac/xnJYiRY5yqLdHmYmvII/ZHCXX7I5VO+ZP7GPgtu9aox9Y1Fc0Sxoe719 fCD3TlzFponIEKIrxuQ5DYueP+Zf8WpJBN1erK+02mseESfSkm/kYLbDiboy6i7E1RyI L1lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=WhGhanFs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id y9-20020a17090264c900b001c5fd2a242asi1257390pli.363.2023.09.23.05.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 05:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=WhGhanFs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DFCF8839A57E; Sat, 23 Sep 2023 02:33:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjIWJdp (ORCPT + 99 others); Sat, 23 Sep 2023 05:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbjIWJdb (ORCPT ); Sat, 23 Sep 2023 05:33:31 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8201F1A6; Sat, 23 Sep 2023 02:33:20 -0700 (PDT) Received: from g550jk.localnet (k10064.upc-k.chello.nl [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 8FCC9D0F4B; Sat, 23 Sep 2023 09:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1695461568; bh=qtF8rK3zTiN2N092gDgKMwaqzb1vmROqLxC+bL23f3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WhGhanFsA9HVICbckx6VJX3a1hl1DaBYbJJz9vGxfG11xRmoG8Rsei+yz2JHNjQYz WphJqbTejdyILZoQUjTh/WOktZTepsXXlGj1TMCIbYNQptGnp/64FJZkD413Biux8v KL/lgS855QqktfdrF4b5ZeJhJm4Fu2CbGZzmVRcM= From: Luca Weiss To: linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Matti =?ISO-8859-1?Q?Lehtim=E4ki?= , Bjorn Andersson , Andy Gross , Konrad Dybcio , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Matti =?ISO-8859-1?Q?Lehtim=E4ki?= Subject: Re: [PATCH 1/2] pinctrl: qcom: msm8226: Add MPM pin mappings Date: Sat, 23 Sep 2023 11:32:47 +0200 Message-ID: <10339711.nUPlyArG6x@z3ntu.xyz> In-Reply-To: <20230922224027.85291-2-matti.lehtimaki@gmail.com> References: <20230922224027.85291-1-matti.lehtimaki@gmail.com> <20230922224027.85291-2-matti.lehtimaki@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 23 Sep 2023 02:33:59 -0700 (PDT) X-Spam-Level: ** Hi Matti, On Samstag, 23. September 2023 00:40:26 CEST Matti Lehtim=E4ki wrote: > Add pin <-> wakeirq mappings to allow for waking up the AP from sleep > through MPM-connected pins. >=20 > Signed-off-by: Matti Lehtim=E4ki > --- > drivers/pinctrl/qcom/pinctrl-msm8226.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/pinctrl/qcom/pinctrl-msm8226.c > b/drivers/pinctrl/qcom/pinctrl-msm8226.c index 994619840a70..1e46a9ab382f > 100644 > --- a/drivers/pinctrl/qcom/pinctrl-msm8226.c > +++ b/drivers/pinctrl/qcom/pinctrl-msm8226.c > @@ -612,6 +612,16 @@ static const struct msm_pingroup msm8226_groups[] = =3D { >=20 > #define NUM_GPIO_PINGROUPS 117 >=20 > +static const struct msm_gpio_wakeirq_map msm8226_mpm_map[] =3D { > + { 1, 3 }, { 4, 4 }, { 5, 5 }, { 9, 6 }, { 13, 7 }, { 17, 8 }, I'm not really convinced this is the correct order of values... Let's look at downstream: qcom,gpio-map =3D <3 1>, <4 4 >, <5 5 >, <6 9 >, [...] =46rom Documentation/devicetree/bindings/arm/msm/mpm.txt downstream: Each tuple represents a MPM pin and which GIC interrupt is routed to it. So first is pin number, second is interrupt number. And check mainline:=20 /** * struct msm_gpio_wakeirq_map - Map of GPIOs and their wakeup pins * @gpio: The GPIOs that are wakeup capable * @wakeirq: The interrupt at the always-on interrupt controller */ struct msm_gpio_wakeirq_map { unsigned int gpio; unsigned int wakeirq; }; So here we also have the order pin-interrupt, not the reverse order. Therefore I believe the order in this patch is incorrect, and it should rat= her=20 be: { 3, 1 }, { 4, 4 }, { 5, 5 }, { 6, 9 }, { 7, 13 }, { 8, 17 }, [...] Or do you think I'm missing something? Regards Luca > + { 21, 9 }, { 27, 10 }, { 29, 11 }, { 31, 12 }, { 33, 13 }, { 35, 14=20 }, > + { 37, 15 }, { 38, 16 }, { 39, 17 }, { 41, 18 }, { 46, 19 }, { 48, 20=20 }, > + { 49, 21 }, { 50, 22 }, { 51, 23 }, { 52, 24 }, { 54, 25 }, { 62, 26=20 }, > + { 63, 27 }, { 64, 28 }, { 65, 29 }, { 66, 30 }, { 67, 31 }, { 68, 32=20 }, > + { 69, 33 }, { 71, 34 }, { 72, 35 }, { 106, 36 }, { 107, 37 }, > + { 108, 38 }, { 109, 39 }, { 110, 40 }, { 111, 54 }, { 113, 55 }, > +}; > + > static const struct msm_pinctrl_soc_data msm8226_pinctrl =3D { > .pins =3D msm8226_pins, > .npins =3D ARRAY_SIZE(msm8226_pins), > @@ -620,6 +630,8 @@ static const struct msm_pinctrl_soc_data msm8226_pinc= trl > =3D { .groups =3D msm8226_groups, > .ngroups =3D ARRAY_SIZE(msm8226_groups), > .ngpios =3D NUM_GPIO_PINGROUPS, > + .wakeirq_map =3D msm8226_mpm_map, > + .nwakeirq_map =3D ARRAY_SIZE(msm8226_mpm_map), > }; >=20 > static int msm8226_pinctrl_probe(struct platform_device *pdev)