From patchwork Tue May 10 16:41:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 12845259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D893C433EF for ; Tue, 10 May 2022 16:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7XAHA5Ie9RIpFTok1LAVHKNLCm44QjBtVWPdGnp0dlU=; b=z67gAUVNc9T4dv 3RO+OrCp9+VpfV9ZaVnWLGo+nxcpME6coY5xs1F3a9lHL2r651NDAFB9/5kBR2h/Tz7Pne/a/kHuO 81Od7uqfN4jZHdENshO7ZuyqkyJ6ipUxeMjuKLjCNjw4kDnBC7Q2U/MiIsVfYdIEcXbtekvXFTeT4 RaLWJ7QmxZTMihf33CLXwUhgr9Nzj7r/Ed7yMp3kTMutBiR/Sb9MKWmC1bnFuIO2xblmGfn5uWcEP 38UYib0jMHeuGwkRA715iaeuh1Ey5wKz+EJ23egatwQkSuSwYbp3oRxyTcM2H9TtivH/nel41NWh1 PWefW+bRLdm6H2c2+z/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noSx4-003900-Gv; Tue, 10 May 2022 16:43:10 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noSwj-0038rs-MS for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2022 16:42:52 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24ADqApE011169; Tue, 10 May 2022 18:42:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=cT5bl4hMyx6MvIaEIWQIuKbjqZzMOn/zldfQYiAYDnY=; b=66oAUaRGuHee/hfzY4M7knaqvFlPa5NDiOIgt932BuJWDKHCt3pYfv1ibxkipjuOG5Rg LFOzU3EfE9ul06gh6UUC1hLOrUFZmeNVdjeuqJr2zfQvTdtU/68VUfKUBU8vIYmlFUqQ 9mnNg23E8fDYFnQw4+E+ZZLj0awOYhKnt5/ZKMA6kYTp2/Ub4taYdTWJE/DUDZUio2rb 8jCAvzmau13x1jBNhaAwA89+fVds5H5K2mIn/XD6T6jIhmxuEO5v7wJ0ZoaMIfo3BciB KjJ1uJly+0oBj2P7xZ0PBC8RI13tY7winl+JC4cdK2ABdvOysexFrznQtzWjcDnmz+xK 2g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3fwfngkx0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 May 2022 18:42:38 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2C004100038; Tue, 10 May 2022 18:42:38 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 25FE823152B; Tue, 10 May 2022 18:42:38 +0200 (CEST) Received: from localhost (10.75.127.45) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 10 May 2022 18:42:37 +0200 From: Antonio Borneo To: Thomas Gleixner , Marc Zyngier , Maxime Coquelin , Alexandre Torgue , , , CC: Pascal Paillet , Ludovic Barre , Loic Pallardy , Antonio Borneo Subject: [PATCH 4/7] irqchip/stm32-exti: forward irq_request_resources to parent Date: Tue, 10 May 2022 18:41:20 +0200 Message-ID: <20220510164123.557921-4-antonio.borneo@foss.st.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220510164123.557921-1-antonio.borneo@foss.st.com> References: <20220510164123.557921-1-antonio.borneo@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-10_04,2022-05-10_01,2022-02-23_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220510_094250_277317_1B83F32E X-CRM114-Status: GOOD ( 16.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Pascal Paillet Enhance stm32-exti driver to forward request_resources and release_resources_parent operations to parent. Do not use irq_request_resources_parent because it returns an error when the parent does not implement irq_request_resources. Signed-off-by: Pascal Paillet Signed-off-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index c8003f4f0457..3f6d524a87fe 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -550,6 +550,16 @@ static void stm32_exti_h_unmask(struct irq_data *d) irq_chip_unmask_parent(d); } +static int stm32_exti_h_request_resources(struct irq_data *data) +{ + data = data->parent_data; + + if (data->chip->irq_request_resources) + return data->chip->irq_request_resources(data); + + return 0; +} + static int stm32_exti_h_set_type(struct irq_data *d, unsigned int type) { struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); @@ -677,6 +687,8 @@ static struct irq_chip stm32_exti_h_chip = { .irq_eoi = stm32_exti_h_eoi, .irq_mask = stm32_exti_h_mask, .irq_unmask = stm32_exti_h_unmask, + .irq_request_resources = stm32_exti_h_request_resources, + .irq_release_resources = irq_chip_release_resources_parent, .irq_retrigger = stm32_exti_h_retrigger, .irq_set_type = stm32_exti_h_set_type, .irq_set_wake = stm32_exti_h_set_wake, @@ -690,6 +702,8 @@ static struct irq_chip stm32_exti_h_chip_direct = { .irq_ack = irq_chip_ack_parent, .irq_mask = stm32_exti_h_mask, .irq_unmask = stm32_exti_h_unmask, + .irq_request_resources = stm32_exti_h_request_resources, + .irq_release_resources = irq_chip_release_resources_parent, .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_set_type = irq_chip_set_type_parent, .irq_set_wake = stm32_exti_h_set_wake,