From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 7AD3DC433E7 for ; Sun, 11 Oct 2020 18:01:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F0302222A for ; Sun, 11 Oct 2020 18:01:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XhbWXaZy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="/+e0F4yc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728590AbgJKSBP (ORCPT ); Sun, 11 Oct 2020 14:01:15 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39934 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388349AbgJKR5W (ORCPT ); Sun, 11 Oct 2020 13:57:22 -0400 Date: Sun, 11 Oct 2020 17:57:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602439040; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWdvCkXdqtsiodoW0+b/VtLJH3OR31cuDZ1jHDAlwlI=; b=XhbWXaZyYWe2WG+ND+/1FQQm7a3ILn401R9zrSgDkGICqL3CN0HTUZiWj5KYqFX1qq0qjP +yF2VvaUFcojmYkoKduWKl7vbHXwC8zuYk3IgkAmacE4aLAJCTavuHcwfo7iVoB4QIbfdZ 2mtlifEOQ4JZye9m31M/FmIejbRHF4mWcYFjgjld/vunlHQNA/71ll2AMxvnIBrrAdIPH3 DdBoZCqKT5ZR9DREaFUgf4MZcxmWNiEUcwx/e3xsWGJOafFf0aYD9gFNENNOSMHavOrj7O aPos+l1kBBHyvSFW0hI0VwudoxlIfkge+mPf4YlT6TlU08qtfPn+cOB1iv4qfw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602439040; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWdvCkXdqtsiodoW0+b/VtLJH3OR31cuDZ1jHDAlwlI=; b=/+e0F4ycfp2eHm39hAvjzfbRkycigeN3s2+bY4zhrkRvFxMDNOQHxkO6QqOH9cGd5upO0B CAZMVLUwYlYe4UCw== From: "tip-bot2 for Marc Zyngier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] gpio: tegra186: Allow optional irq parent callbacks Cc: Marc Zyngier , x86 , LKML MIME-Version: 1.0 Message-ID: <160243904016.7002.1897000355914151479.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 986ec63d4482292570b579ac98b151acf8bdd1de Gitweb: https://git.kernel.org/tip/986ec63d4482292570b579ac98b151acf8bdd1de Author: Marc Zyngier AuthorDate: Mon, 05 Oct 2020 10:27:27 +01:00 Committer: Marc Zyngier CommitterDate: Sat, 10 Oct 2020 12:12:10 +01:00 gpio: tegra186: Allow optional irq parent callbacks Make the tegra186 GPIO driver resistent to variable depth interrupt hierarchy, which we are about to introduce. No functionnal change yet. Signed-off-by: Marc Zyngier --- drivers/gpio/gpio-tegra186.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index 178e912..9500074 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -430,7 +430,18 @@ static int tegra186_irq_set_type(struct irq_data *data, unsigned int type) else irq_set_handler_locked(data, handle_edge_irq); - return irq_chip_set_type_parent(data, type); + if (data->parent_data) + return irq_chip_set_type_parent(data, type); + + return 0; +} + +static int tegra186_irq_set_wake(struct irq_data *data, unsigned int on) +{ + if (data->parent_data) + return irq_chip_set_wake_parent(data, on); + + return 0; } static void tegra186_gpio_irq(struct irq_desc *desc) @@ -678,7 +689,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev) gpio->intc.irq_mask = tegra186_irq_mask; gpio->intc.irq_unmask = tegra186_irq_unmask; gpio->intc.irq_set_type = tegra186_irq_set_type; - gpio->intc.irq_set_wake = irq_chip_set_wake_parent; + gpio->intc.irq_set_wake = tegra186_irq_set_wake; irq = &gpio->gpio.irq; irq->chip = &gpio->intc;