Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp253259pxx; Wed, 28 Oct 2020 04:10:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF9Vd1tidRgBxKcV48eIui2/JlDbpUghyfkvWR5ejiciKGeJbMc+/NAFHejpm5nflKK8nc X-Received: by 2002:a17:906:5e4f:: with SMTP id b15mr7160469eju.353.1603883430144; Wed, 28 Oct 2020 04:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883430; cv=none; d=google.com; s=arc-20160816; b=NNgEd2o7NUKsa6p1kzgsaNHNgTQLa2D9aTy4HXmvuqDbw2HGZbLFwj8qh1BqlSjzoh NyucpqYr41NzaJjNW7z56Q1QtTk3pmK4aLWQ1vRmFrWs/StVRpAdFYo0e9EP4NCnqTVZ yutW/zGQXpZgB59y3b7W6PsW7AgT4/VGG7/wpLDdRr2NN3qfLggZJfVRhqqVUwK5z5Y/ /xSiOlvtOntwMRsPsAjPBqnER5MzB4SbpyFvP2+VgFQ+mtDVYjv7xpPuQHsy/DTOKgVp T0CZ7R6UGaRtHcnQIhQVy7R8rzK4DCpo/SagxHkJqub0gQcwDDlA8Yw0Y8W/9oF1UgW0 zg4A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VLL1Nv/I9VIwXo5z1qkd9rGCNh6V76kMDyIFK41myhE=; b=yoQEiECq2+P7K4hUQqfklLWAnzo51GXULYf/tP4M21ryhiv+eSLsKxFT8M7cFJ+OAf Am10uHFFVPaxinJi5HQgMt7p69IC5rif3V4w93F2Y9hkaEzBk5WzILq6axGDX9D+SZTT ysdxc9w6YQxh9BwLXMfl5AGlBZHN+odsIKid1SHlMtX8Z0YTXIDacTd1DIGT869OMY1S G7leM5jTv0nhJZhLAlQlUgjJb9P+m0lSYhNkGAV69u+8lz9iRTYj/+8qs8RNT9mAn3f2 j1E9wfZhYszI7a7sJ0gekqO8cb1x/tyiWi6r2G4S095CJBau2Vmbf0yk++nKWt4DkqHA GMrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kCgALPca; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b29si2827715edn.354.2020.10.28.04.10.07; Wed, 28 Oct 2020 04:10:30 -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=@kernel.org header.s=default header.b=kCgALPca; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1786524AbgJ0O7w (ORCPT + 99 others); Tue, 27 Oct 2020 10:59:52 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) -- 2.25.1