From patchwork Tue Oct 27 13:47:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F919C64E75 for ; Tue, 27 Oct 2020 15:00:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2CA8222C8 for ; Tue, 27 Oct 2020 15:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810843; bh=8cdHXiz2haHL8AoZUxJTqV+Z1jOsc86PgTXTv2ZWsYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EiYggxxFEAL2wQerePVh0gchfwAyqoKi+BetaMVbWT8PFmkznITCaiHfjQKHM5IrD cnhR4dIzWnmoOS//asZp7mEYPPMXl6N/H0X8wyKDrZs/1tbUkuLt87WbeR0BCr7YF7 6jVFqNWQLntDr/nVrivxzIcou3vZR6gRjq0v8y1I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1780688AbgJ0Oyx (ORCPT ); Tue, 27 Oct 2020 10:54:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:51390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1774898AbgJ0OwH (ORCPT ); Tue, 27 Oct 2020 10:52:07 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DCDC21556; Tue, 27 Oct 2020 14:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810324; bh=8cdHXiz2haHL8AoZUxJTqV+Z1jOsc86PgTXTv2ZWsYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kCgALPcahiFXcbOgbStVmbk59T18gzxSQXu3NjLLHIdl6oFaVlKwI/gWX5JHnkGXn IjHsWZv1DH2sFxzI/JAlvaBszuJT/+1DN6+WzTE/zUVhpkDeNmu/tweSRN2auv8eKp s6s4ojdlMbOauQusW++Gw+C5c1ItWK5wzm+slQ34= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maulik Shah , Marc Zyngier , Stephen Boyd , Douglas Anderson , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 5.8 099/633] pinctrl: qcom: Use return value from irq_set_wake() call Date: Tue, 27 Oct 2020 14:47:22 +0100 Message-Id: <20201027135527.346165461@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Maulik Shah [ Upstream commit f41aaca593377a4fe3984459fd4539481263b4cd ] msmgpio irqchip was not using return value of irq_set_irq_wake() callback since previously GIC-v3 irqchip neither had IRQCHIP_SKIP_SET_WAKE flag nor it implemented .irq_set_wake callback. This lead to irq_set_irq_wake() return error -ENXIO. However from 'commit 4110b5cbb014 ("irqchip/gic-v3: Allow interrupt to be configured as wake-up sources")' GIC irqchip has IRQCHIP_SKIP_SET_WAKE flag. Use return value from irq_set_irq_wake() and irq_chip_set_wake_parent() instead of always returning success. Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-3-git-send-email-mkshah@codeaurora.org Signed-off-by: Sasha Levin --- drivers/pinctrl/qcom/pinctrl-msm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index a28a96ac2b671..22283ba797cd0 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1060,12 +1060,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); - return 0; + return irq_set_irq_wake(pctrl->irq, on); } static int msm_gpio_irq_reqres(struct irq_data *d)