Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp852578rbd; Fri, 23 Feb 2024 05:45:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXypzOq9TceAA6TQwag7F4lzQhReaY7A8iFOUMdMF+XHIBUyE+IaAXnQFyFDlV6xi2AATIzbFAHlsfEThYvTzBeuJ3YBBtsC1PRapaoIg== X-Google-Smtp-Source: AGHT+IGCdHchsUNnFgkJ3PtnBBQmqNWx2yAYpISiT5OJdy07eC8kR8q1D5+RLcmUwhlHdSM7j0ar X-Received: by 2002:a05:6a21:150d:b0:19e:b89f:99ff with SMTP id nq13-20020a056a21150d00b0019eb89f99ffmr1858917pzb.3.1708695940338; Fri, 23 Feb 2024 05:45:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708695940; cv=pass; d=google.com; s=arc-20160816; b=q53PsBWOxkqEPsy3e2gZeUGCngbPyx0yRY1fLRtTYmixKkuVDiWHol3LInRbS5uZiB o/11/RbUtDg550eeaYkKzeBa4YPR7EzPOhwUCnhONwDc8HC4oGohb5pfUHGJYuQA+n64 DnT/ZWIGOm9TIvC6lWwTs/yCsilSn4OqwzXj+dxyHEYkTWkrMrb4Ywc7bHqQQ9xAPr/u SccfJUvVWTjxOZNG/b1dwH3GFPolG3NcoZTG+KN5tUVul2SY5aFg0iB+EWILwjIJDyQ4 6ilqpq9vfsabPigeCbKvCgAUA9NTRzbsnm8MgJ2cZBe7Vded2pnxJwmGUBqkbyc71cBN faNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=PUdaN+NOyiFko6ApVjfQUO99UPdl8r3ljDhSfM9je4I=; fh=IEKZ1SwNja6xhFphHw9U6MW7M/TroFh7XZvM7/pun0w=; b=hmQ0xGPassjWyOr0OJ6FUmbfc2s9YdejCFmxcMFnKKcwWVHIGpVDVRZ+kOIoKZR/pL gnPfCj5mbpP+lamTwPrPzoQRHRjRnN9b5HorD0YFCVsQ3kxDGDdIYE4d5RoIW19lJ8Xh BMEDLGaaom9BbFiVYCUP5nAcM5AmsVZT2YmcJ7Pm3ydjcCXZaQ1LxJ0jfO0wedQPi5tH jH4DW5riFYaz/lMv4dOGgFYOheO9u4DZPStOFZogbWTZ/1HISOrDG5hKjDqdV40C1B6F 2SNVI/X2egQ1sVsIRSwMfbF0nygO2jsxn+OddxkOhh7aOHc32Y8zyhlJ417BJ2bQQDe4 kASQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=gmKWY4aC; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-78403-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m28-20020a63711c000000b005e2b0672449si9440531pgc.27.2024.02.23.05.45.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 05:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78403-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=gmKWY4aC; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-78403-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 205E2B247AE for ; Fri, 23 Feb 2024 13:43:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D04C8063D; Fri, 23 Feb 2024 13:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="gmKWY4aC" Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DE237C6E5; Fri, 23 Feb 2024 13:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708695660; cv=none; b=CtxcJ4NWf6HK4QeCbqqHBc8xUP/aOm4QKPlxNMGD9RyYIEcYtp1s12Cu7NT3qspaGK5aLCbRqu5miHqALVXq2lhlhr4GBPdJBY6muzPYfvkuf4EbEDtCISypFmuULhkg5PU7Dkapmqjf/TnVfKAsnPkudb5RJsQRIMeWMXpXTLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708695660; c=relaxed/simple; bh=PUdaN+NOyiFko6ApVjfQUO99UPdl8r3ljDhSfM9je4I=; h=Message-ID:Subject:From:To:CC:Date:In-Reply-To:References: Content-Type:MIME-Version; b=kkYzTjMPg6x/TK/zoRD6BIfgdV4NuqawAmidd6RmduLLbiYYbsNxuwkdkY4EC+EFCi2JPYDQDAvSwJ7pS0uJCT+mi0GsUi3Wmo12gXG2efOle4YwPI7gQ+fE0yFAFhfosNDgVKl8BCe51aoNLuJW/ZjZnwpNbkXVJC4GgCMLSu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=gmKWY4aC; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41NBw6P6025967; Fri, 23 Feb 2024 14:40:18 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s= selector1; bh=PUdaN+NOyiFko6ApVjfQUO99UPdl8r3ljDhSfM9je4I=; b=gm KWY4aCZqrkRS2Qaq06UuV+RBt72dfljhqYIuva4PStKzOdrAyUhPAFIi62vE1MbS 2QvWTc6PcHoh0LOjJtvqldsTwdA1WJ40G0dNLsf/Q9ynqzLQun+y9ZfAitMFFnck 4flc3JmzFTAI33MC5OYzUsVHm8U31oMLp2+ISJgRK1tiNOR274sWDh9T/XJlCF3W FBuOFov8w40GUcVMQ0lD4vGr96a5EXeP2whCHq4iRzM8XE1pn5NqBosK9yOTRjnS GANfQy6gfNQSIOyNjJWJkiP+VAe9n24puIyyfgXpEfpkCy8tTzJPWGSk00SAa9rM y6B0VUCQu4nFZJPaXqrA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3wd2024w03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 14:40:18 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E9FE040044; Fri, 23 Feb 2024 14:40:13 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DF21A29D7F4; Fri, 23 Feb 2024 14:39:26 +0100 (CET) Received: from [192.168.8.15] (10.201.20.114) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 23 Feb 2024 14:39:26 +0100 Message-ID: <2eb11bf9dc0c5f49de3fb72c44dd16d8ca136813.camel@foss.st.com> Subject: Re: [PATCH 02/12] dt-bindings: interrupt-controller: stm32-exti: Add irq nexus child node From: Antonio Borneo To: Rob Herring CC: Thomas Gleixner , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon , , , , , Fabrice Gasnier Date: Fri, 23 Feb 2024 14:39:25 +0100 In-Reply-To: <20240222234300.GA3809915-robh@kernel.org> References: <20240216094758.916722-1-antonio.borneo@foss.st.com> <20240216094758.916722-3-antonio.borneo@foss.st.com> <20240222234300.GA3809915-robh@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_15,2024-02-23_01,2023-05-22_02 On Thu, 2024-02-22 at 16:43 -0700, Rob Herring wrote: > On Fri, Feb 16, 2024 at 10:47:47AM +0100, Antonio Borneo wrote: > > The mapping of EXTI interrupts to its parent interrupt controller > > is both SoC and instance dependent. > > The current implementation requires adding a new table to the > > driver's code and a new compatible for each new EXTI instance. > >=20 > > Add to the binding an interrupt nexus child node that will be > > used on the new EXTI instances and can be optionally used on the > > existing instances. > > The property 'interrupt-map' in the nexus node maps each EXTI > > interrupt to the parent interrupt. > > Align #address-cells and #interrupt-cells between the EXTI node > > and its nexus node. >=20 > Looks like an abuse of interrupt-map. You avoid adding yourself to the= =20 > abuser list by putting it in a child node. Clever. (See list in=20 > drivers/of/irq.c if you don't know what I'm talking about) Hi Rob, thanks for the review. Yes, I know already about the abuser list but, from the commit message and the associated comment, I interpret it as an incorrect use of the property interrupt-map with custom syntax thus relying=20 on custom parsing code. The child nexus node in this series allows using the default parser in kernel. From your reply, looks like my interpretation is incorrect and I missed the real concern about the abuser list. Could you please explain why this use of interrupt-map is incorrect and/or which are the correct use cases? > I assume the EXTI has 0..N interrupts. Just define 'interrupts' with N= =20 > entries with each entry mapping EXTI interrupt N to 'interrupts' entry= =20 > N. Yes, EXTI has 0..N interrupts that can be mapped to multiple parent interrupt controllers and the mapping table has holes. While the DT in this series only use one interrupt parent, a second parent will follow. So 'interrupts-extended' property would be a better matching than 'interrupts' to handle the multiple parents. But how to code the missing entries in an 'interrupts-extended' list? As in the example in Documentation/devicetree/bindings/dma/apple,admac.yaml= ? The 'interrupt-map' contains the matching EXTI index, thus allowing a 'sparse' map where holes are simply ignored. Best Regards, Antonio