From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 25AA531B136 for ; Fri, 19 Sep 2025 15:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295833; cv=none; b=nebeNNZB4FdGORbgS9lPi15mqMoL6mZQ8E31v8X1S6MTflJVu47S9eBb/DqHkiMASng991d43SRnAyJG++JsjAMZXFdCoDIEweF5wugff4Yxmcgi/ZNJaamwgHEFBPRb61jVl8l2lrGdmirNL28NnPX54aOhcURBtT0R+hWJcxI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295833; c=relaxed/simple; bh=+4PZdqjap8xszXOt8XL4lD85fXoioACD8cWnc7TQ75s=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GmX9koqf5IR6NVXmCszxhSbLRmQIfXR2p8CGQQgJaUur7u6+rVqwsJxYPAW5N93rmHxV4jDfSoyT6Ar5PKC6E7ov2b96H0mV8Tfzh6JT2uUHGjsRlgBwom7KvjgeEVSzT1pIjnWnJ4P+f0Qv34BhRflHWHFOgLqVyVEolQSldYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=K1Uw/QL5; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="K1Uw/QL5" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 8601F1A0F14; Fri, 19 Sep 2025 15:30:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4FD67606A8; Fri, 19 Sep 2025 15:30:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3B7D0102F183B; Fri, 19 Sep 2025 17:30:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758295828; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=KorTOHGT+f9+nNZ7UQL8M7VObv8JOq459H/SyY11yls=; b=K1Uw/QL59JphgBYp1ihEC+DD67F51NEXJc6M+eoPvZlg09K/xx0e3lJZZahpkw1kGpxv7k MAtNMWPcLZbYOqYOHxA545LjrW7ZIP/o3IqPHlKcKvQIR0yZf/2LLhtJkSeaAaHGbtbN1o u53EobUUqMAsY1P1PokRVOksVCLda6k7/Rk1arp9Ekx0UT0dFHOEZFDp6XMlxWfbNceakA 6K06DMFMK/jlobQHVYamjzPJdPCBR38vJe/tkwcoT1wMM5TEMJfBiQGEuApewskyrT8MKY +ajjQ86ivLGvGdzIn0fd/NuPZw79R+GT6sS44NQ0uo4EAbRN3vNokveTpPUDJQ== Date: Fri, 19 Sep 2025 17:30:11 +0200 From: Herve Codina To: Wolfram Sang Cc: Thomas Gleixner , Hoan Tran , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Saravana Kannan , Serge Semin , Phil Edworthy , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Pascal Eberhard , Miquel Raynal , Thomas Petazzoni Subject: Re: [PATCH v3 7/8] soc: renesas: Add support for Renesas RZ/N1 GPIO Interrupt Multiplexer Message-ID: <20250919173011.4b32a928@bootlin.com> In-Reply-To: References: <20250918104009.94754-1-herve.codina@bootlin.com> <20250918104009.94754-8-herve.codina@bootlin.com> <20250919151448.14f8719a@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Hi Wolfram, On Fri, 19 Sep 2025 16:40:06 +0200 Wolfram Sang wrote: > > Rob asked to use only interrupt-map and use directly the interrupt-map index as > > the hardware index: > > https://lore.kernel.org/lkml/20250801111753.382f52ac@bootlin.com/ > > I agree with that. Currently an interrupt-map entry looks like: > > interrupt-map = <0 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, > > And the number after GIC_SPI determines the index register, no? Can't we > simply say 'index = - 103' incl. some sanity checks? > And so 103 used to compute the index is hardcoded on the driver. Further more the wiring of irq-mux interrupt output to the GIC input line depends on the irq-mux integration and not the irq-mux itself. Nothing in the irq-mux itself requires a specific connection to the GIC. But well, without adding this mapping information in the DT, maybe a table in the driver in order to determine reg index from GIC IRQ number. kind of: static u8 reg_index[8] = {103, 104, 105, ... , 110}; Base on GIC IRQ number retrieve from the interrupt-map item, we search for the index in reg_index that match this number. The index found is the index used to access the register. What do you think about this? Best regards, Hervé