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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38D5BC433FE for ; Thu, 30 Dec 2021 10:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236298AbhL3Kev (ORCPT ); Thu, 30 Dec 2021 05:34:51 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:49952 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbhL3Keu (ORCPT ); Thu, 30 Dec 2021 05:34:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EF6186164C; Thu, 30 Dec 2021 10:34:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5922FC36AE9; Thu, 30 Dec 2021 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640860489; bh=nfEWWofBiVFW/veTE8QIIdW50Omt2J+CSnASOfyGbyw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h8OU/B8fQPks49Gf+mjq5Q8eMTeJqqhHPiNnWKgPWlqaWb4BpfdgzkvnlEWpJj90+ gkbynyggVkbc47H9OprrPZI89QgvOkQpcUhLlEGjJuryyjra+BPYUPd4hXTZnw46ok JRbVCVi8kAj5cWHJzbPCdCdgN33pPddCYamtQny/RCULhm2YBrpO5xoGs8W/1sZWDq W492KZHC9m9/wpy6JRI5ryAuQTX1jpXzTgE6I5nUDYpV7BLwqk08hyN2cvzR+3FmQN 80mM6zXWschSREl1b53iULV4fSSo+JaE7n0Zt90RGiXlGJNzM2WNyNYH1s9otna2qo nawQ77KbdXumw== Received: from cfbb000407.r.cam.camfibre.uk ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n2slj-00F2dn-7W; Thu, 30 Dec 2021 10:34:47 +0000 Date: Thu, 30 Dec 2021 10:34:47 +0000 Message-ID: <87ee5uz8hk.wl-maz@kernel.org> From: Marc Zyngier To: Nikita Yushchenko Cc: Thomas Gleixner , Geert Uytterhoeven , Magnus Damm , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH/RFC] drivers/irqchip: add irq-inverter In-Reply-To: <37db485e-b832-9ff1-4d21-606eeeba871c@cogentembedded.com> References: <20211228165642.2514766-1-nikita.yoush@cogentembedded.com> <87h7aszj70.wl-maz@kernel.org> <87fsqbznc2.wl-maz@kernel.org> <37db485e-b832-9ff1-4d21-606eeeba871c@cogentembedded.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: nikita.yoush@cogentembedded.com, tglx@linutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Dec 2021 19:52:18 +0000, Nikita Yushchenko wrote: > > Hi > > >>> The right way to do it is to use the existing API by exposing the > >>> inverter (there are existing examples in the tree, using the > >>> hierarchical model)... > > > > A much simpler version can be written in a few minutes, see below... > > Can something like that be used if the parent domain is not > hierarchical (i.e. does not provide alloc(), but provides map() > instead)? No. This definitely relies on the parent being hierarchical, as that's exactly what it was designed for the first place. > In particular, gpio-rcar currently provides irq domain that is not > hierarchical. As well as quite a few other gpiochips. Well, you just found yourself some useful work! ;-) M. -- Without deviation from the norm, progress is not possible.