Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp694018pxa; Tue, 11 Aug 2020 12:35:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4mra2MsgGLyB+0e6iCZlCwRWIpWB5pO+7GirnXcjezHRthpuB7PP8GNDXFz4YBciqSzn1 X-Received: by 2002:a17:906:990c:: with SMTP id zl12mr2773045ejb.488.1597174511403; Tue, 11 Aug 2020 12:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597174511; cv=none; d=google.com; s=arc-20160816; b=JPMbjcgYqRz5IHpWptqVqMeaQyaUIax9k2w5pjLir6QdhAyBZmIrTEZ1r6pgaT/IWY XnLiH0NDJYyh9eA16CNaCAcS2JDk79Abeggj2XYyCGLjcEBesAt9QBu1y4ra2lpt37zP 3BZlNJ3jYssvfYBDG0GZ7u/xIiGWbJVXGZ0lmuzj9WxPhzznHZf4uHirlRyUIct6zgUY CeWaQ7LUYdX5IkOPGKxL08zXPNt+BNcOz7C+m66wpMfpm6dhHx8vmngixWSf8FBwFqbh YOiaPynONlgAgTcznXHXl9Kl3VBqEfT7aMRZSUdkuuNB5hnaKrMZrwvHZUshWwRTSKYh 1K0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=HPJgVYMlOVpx8CMW1iLnfKWUU9aKgZyZKqJZiVOc4AE=; b=ESufV+cZ3K+w+zD+6zfp28bmvuMO670JE97bZRmtrVABEXzIyq4pinEzL2j4JgL2H9 ft7IDNTGtDhdmH97IUXnEPmOSnqm5JyHrgMp9gkQ0Y17cj1r1kWD4IlvHzSt/FxsOQaK t8Pa+uMIRLr207IoIFTbw/DpFOeputkuzh/D2bXMEjHdb0X2q8yzLhnJvSMaGJ6yW7JD lxHB4FqdSCeq1UDGWAlrTsxWF/2yCP5te8dF+ZzAZcMztDbipgr7WvqOVUroqJqp+/4G /0UAMDiDV/C4UoYcBMDgKLp7zKFOIFbm9r/PgIhyyB1JqVhr+Hnh98yWven+2/t5jM6a IpbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X2nYMD+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d8si13209137edu.63.2020.08.11.12.34.48; Tue, 11 Aug 2020 12:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X2nYMD+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726425AbgHKTeF (ORCPT + 99 others); Tue, 11 Aug 2020 15:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgHKTeE (ORCPT ); Tue, 11 Aug 2020 15:34:04 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7141EC061788 for ; Tue, 11 Aug 2020 12:34:04 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id s15so7183538pgc.8 for ; Tue, 11 Aug 2020 12:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=HPJgVYMlOVpx8CMW1iLnfKWUU9aKgZyZKqJZiVOc4AE=; b=X2nYMD+XxV/+IOGD2YouE5zjPO0QlFLkjP5eXZT/K91Na9ZuG+TaAJ8H31hRXuj8p7 /SKbAPVGvH8U61Mievn5GpQS0s2MgET9lCLkypee8LiqhWmCPazJRIr/Bb815s2YPD3f TJojCe6sU4MxN57aVFFFCNoyGsqTSiwLKRJLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=HPJgVYMlOVpx8CMW1iLnfKWUU9aKgZyZKqJZiVOc4AE=; b=cOmU1MQr3xbqvjh/+EJf857dkXvQ4uYHOQpXYCG9zADDVX+C6z+Co5Xk89COAFbLCl aU16ITT9R2aQ9L8y61mnMq3hQQObmrTQ9Aqom6rCQabTZLv+IhBUc+5yjPhKzt9nNHhO BkoGLVYurt9CYgVD74sTQxG5xbV2rCgMF9lLGi4fJMLJkQp6F6PTB8fCSbsBOKhrqtC9 ezMXHsuhjcDBMrlqUenDxesSdmUS5CCKg8lHkwoEMdNHh/qBDvpaCYsJMXyNY8xr1GKj TKkNtr+dImqIPSgcQa2VDU/cYKrg69PoolF2L4sv/XScXnhqDrX7G8/XqFzMxG1TA3g9 EjuQ== X-Gm-Message-State: AOAM533g5pFYfmiIGjfBUXG+XSEqkbVfqSb/0LnXU0PlR0zKlnQwB+j9 2O/WGWcwkLfzMXRhydtAu0dRL1ohLuQ= X-Received: by 2002:a63:fe54:: with SMTP id x20mr1968326pgj.438.1597174443718; Tue, 11 Aug 2020 12:34:03 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id lb1sm3355502pjb.26.2020.08.11.12.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 12:34:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1597058460-16211-3-git-send-email-mkshah@codeaurora.org> References: <1597058460-16211-1-git-send-email-mkshah@codeaurora.org> <1597058460-16211-3-git-send-email-mkshah@codeaurora.org> Subject: Re: [PATCH v4 2/7] pinctrl: qcom: Use return value from irq_set_wake call From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, agross@kernel.org, tglx@linutronix.de, jason@lakedaemon.net, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah To: Maulik Shah , bjorn.andersson@linaro.org, evgreen@chromium.org, linus.walleij@linaro.org, maz@kernel.org, mka@chromium.org Date: Tue, 11 Aug 2020 12:34:01 -0700 Message-ID: <159717444178.1360974.6520145243224264090@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maulik Shah (2020-08-10 04:20:55) > msmgpio irqchip is not using return value of irq_set_wake call. > Start using it. Does this work when the irq parent isn't setup in a hierarchy? I seem to recall that this was written this way because sometimes irq_set_irq_wake() would fail for the summary irq so it was a best effort setting of wake on the summary line. >=20 > Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") > Signed-off-by: Maulik Shah > Reviewed-by: Douglas Anderson > --- > drivers/pinctrl/qcom/pinctrl-msm.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pi= nctrl-msm.c > index 90edf61..c264561 100644 > --- a/drivers/pinctrl/qcom/pinctrl-msm.c > +++ b/drivers/pinctrl/qcom/pinctrl-msm.c > @@ -1077,12 +1077,10 @@ static int msm_gpio_irq_set_wake(struct irq_data = *d, unsigned int on) > * when TLMM is powered on. To allow that, enable the GPIO > * summary line to be wakeup capable at GIC. > */ > - if (d->parent_data) > - irq_chip_set_wake_parent(d, on); > - > - irq_set_irq_wake(pctrl->irq, on); > + if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs)) > + return irq_chip_set_wake_parent(d, on); So this bit is probably fine. > =20 > - return 0; > + return irq_set_irq_wake(pctrl->irq, on); But this one is probably not fine. > } > =20 > static int msm_gpio_irq_reqres(struct irq_data *d)