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 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 EDBFEC433EF for ; Sat, 16 Jul 2022 10:44:50 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dH/bSHsQG0s7snoumIxiKLhnqILov2gvvqfuRkwbplc=; b=gJYwf+K/wnyBup BGSMmL/t1L46IfRM7DR9vVWEWQC3WgLsbHLLEX6ukjv/vaSJbyybZ3XxEPA6mnpCcRQJUYXAVIgSC 2K2uJ4TcnL/N65Opmsf42hEv6nw+AiM9yR2uteq04SOtgoyCuGbLOgYDspmvtbLAncgBuRrQ6TnSg eqaawijVJLzvxunFbDo1vVzyDASauo6PZyH50Abq0DRmsJM+buAlz5GfhACrzYN7puG8kH7fXaO71 dMgGVTkgcypT4oWs4jXyaxtHkZlDzh+ryYi4kmJGAq1HnVRA4X+bgwqGCy9GIi7ui06hVSk7GGWdS BOD3goXkOXVm3GnBV5Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCfHq-00FTfM-EF; Sat, 16 Jul 2022 10:44:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCfHn-00FTdM-9M for linux-riscv@lists.infradead.org; Sat, 16 Jul 2022 10:44:36 +0000 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 9934360FA6; Sat, 16 Jul 2022 10:44:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A137C34114; Sat, 16 Jul 2022 10:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657968273; bh=MT/ioChApAV3Fbzdv9gL+KtbbUDKSiObJMHNjAz1Iwk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N8I1FwXwIlaoSQq9N9cUgqE2zMOuBH932SIkqKWogyNUG3LefcXTehPghN6c/39Pj RVVX/7SgcJEL7AGz21Gir6Dow1kiXbRBUAU+fi0gN+lcs1IVH4iSNweCWVVqF4ZCHo cvZWz4sVhN5WAN22S+yeFaohJHNBLbcslRxi+XCsTya5JZFqG0ohFCfaDjr0jin/ew Mdspnl0BVP6KkZpf5wDXBgHsyBRA8JojgybzA3FGgMlRzDSQzHQF+MYATcp9i5ofjd kuxQIPv0HxsVpKBfS95Q2VWwgR/3h8y0dPMb/B4fp3BCKT47bP5EIv/wzptcYRQu+k rUqWUgfaS+dUA== 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 1oCfHi-007rH6-P9; Sat, 16 Jul 2022 11:44:31 +0100 Date: Sat, 16 Jul 2022 11:44:26 +0100 Message-ID: <87pmi549rp.wl-maz@kernel.org> From: Marc Zyngier To: Cc: , , , , , , , Subject: Re: [PATCH v3 1/1] gpio: mpfs: add polarfire soc gpio support In-Reply-To: <20220716071113.1646887-2-lewis.hanly@microchip.com> References: <20220716071113.1646887-1-lewis.hanly@microchip.com> <20220716071113.1646887-2-lewis.hanly@microchip.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") X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: lewis.hanly@microchip.com, linux-gpio@vger.kernel.org, linux-riscv@lists.infradead.org, linus.walleij@linaro.org, brgl@bgdev.pl, linux-kernel@vger.kernel.org, palmer@dabbelt.com, conor.dooley@microchip.com, daire.mcnamara@microchip.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220716_034435_386144_F99D59B0 X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Sat, 16 Jul 2022 08:11:13 +0100, wrote: > > From: Lewis Hanly > > Add a driver to support the Polarfire SoC gpio controller. > > Signed-off-by: Lewis Hanly > --- > drivers/gpio/Kconfig | 9 + > drivers/gpio/Makefile | 1 + > drivers/gpio/gpio-mpfs.c | 361 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 371 insertions(+) > create mode 100644 drivers/gpio/gpio-mpfs.c A couple of other nits: > +static const struct of_device_id mpfs_of_ids[] = { > + { .compatible = "microchip,mpfs-gpio", }, Where is the DT binding for this? > + { /* end of list */ } > +}; > + > +static struct platform_driver mpfs_gpio_driver = { > + .probe = mpfs_gpio_probe, > + .driver = { > + .name = "microchip,mpfs-gpio", > + .of_match_table = mpfs_of_ids, > + }, > + .remove = mpfs_gpio_remove, No, please. You cannot enforce that there are no interrupts being used (and nothing checks for this), and you're pretty much guaranteed that the system will catch fire on the first interrupt being delivered. Moreover, your "remove" callback only turns the clock off, which is yet another nail on that coffin. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv