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 31D93C433EF for ; Wed, 6 Jul 2022 07:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230518AbiGFHB1 (ORCPT ); Wed, 6 Jul 2022 03:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbiGFHBV (ORCPT ); Wed, 6 Jul 2022 03:01:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFB3D1EAFC; Wed, 6 Jul 2022 00:01:20 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9F093B81AE8; Wed, 6 Jul 2022 07:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C463C3411C; Wed, 6 Jul 2022 07:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657090878; bh=+cM9fbXgghc45VgTmM6OgjrtFCbCpn//QrK67G8SxMw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t+PGTy4NrxmmE4XEqgl/Ogpy+Cnfpimwnc0xiX8KVK0JUyww/ppKs89RePW/5uzsp giOTLrbd8L++9gPSsDPtEC3M6tluCPSlyCCcLvjX8xqZfqVBXFA5RfkzQbMjiKRqUh 7vekQaK6qNdaFFVjg6KMbWlxXrAKjnEDv21PuY5E6IJ1B2aWdVIBcSBVuYpqcUosHp n8brPLCgqQRjgE6Yrnb96dpnuWvmjYmtYrHMZYtaFlvgBdI2Wz8XlLb29Ccpgg13X/ w13ynAMiJofDLsjBj9ODtCoE+s5FPkKffWpzGYQ/fzzQlFmfN1cJIej0kyZIfPlf2L g25PaWGEGZJqg== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] 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.95) (envelope-from ) id 1o8z2A-005YBP-E3; Wed, 06 Jul 2022 08:01:16 +0100 Date: Wed, 06 Jul 2022 08:01:08 +0100 Message-ID: <87iloan2rv.wl-maz@kernel.org> From: Marc Zyngier To: "Lad, Prabhakar" Cc: Andy Shevchenko , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Philipp Zabel , devicetree , Linux-Renesas , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Biju Das , Lad Prabhakar Subject: Re: [PATCH v7 3/5] gpio: gpiolib: Allow free() callback to be overridden In-Reply-To: References: <20220703194020.78701-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220703194020.78701-4-prabhakar.mahadev-lad.rj@bp.renesas.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.104.136.29 X-SA-Exim-Rcpt-To: prabhakar.csengg@gmail.com, andy.shevchenko@gmail.com, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, geert+renesas@glider.be, linus.walleij@linaro.org, brgl@bgdev.pl, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com 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-gpio@vger.kernel.org On Tue, 05 Jul 2022 05:53:03 +0100, "Lad, Prabhakar" wrote: > > On Mon, Jul 4, 2022 at 5:16 PM Andy Shevchenko > wrote: > > > > On Sun, Jul 3, 2022 at 9:43 PM Lad Prabhakar wrote: > > > > > > Allow free() callback to be overridden from irq_domain_ops for > > > hierarchical chips. > > > > > > This allows drivers to free up resources which are allocated during > > > child_to_parent_hwirq()/populate_parent_alloc_arg() callbacks. > > > > > > On Renesas RZ/G2L platform a bitmap is maintained for TINT slots, a slot > > > is allocated in child_to_parent_hwirq() callback which is freed up in free > > > callback hence this override. > > > > Hmm... To me this sounds asymmetrical. We alloc something in another > > callback, which is not what this free is for. Perhaps it should be an > > optional > > > > free_populated_parent_arg() or alike? > > > @Marc your thoughts? I think there are enough optional callbacks, and we don't currently have a clear picture of how this may be used in the future, specially based on a sample of *one*. Let's get it in as is, and tweak things as we go, should another user require a slightly different behaviour. This also saves us the debate around the naming, which is always pretty useless. Thanks, M. -- Without deviation from the norm, progress is not possible.