Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7170482rwb; Wed, 23 Nov 2022 03:12:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf4eKdcbUrjDvlu35X9ZYkcEtwDWp8Q7FvfnR3h15xc9RsqbRKo04pZwCr/Ql1JsdnTRhfZ3 X-Received: by 2002:a63:f205:0:b0:477:acd9:896a with SMTP id v5-20020a63f205000000b00477acd9896amr5064692pgh.312.1669201962800; Wed, 23 Nov 2022 03:12:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669201962; cv=none; d=google.com; s=arc-20160816; b=QUlIKQfPmdaQ1WDSP0tswT9JnG6mxjRhcDrpbDicEKFexALRdhls48CxMX75UainsR LM6eo3nI88cTXlnkaF2filPAEyu43Dz/DdKwzxksrY9W9sDIdvz+VSWpLkMg92skhH7X fGxwpQqvnWy2DKc2DiVPMghAHnopdHu9llaUWeMhI8N82S6LsvbLS/Yohca8pBlOdXCY 38lfUfRvmiKfaIioKPvO1bUFCA8AlPbSaMbOqTpUag0Ip50EGlbZiuT52mE0MayVjJOb JQoQHxsVzbLGVcYdlnU6GW4hvk0V01+4hVSSArl38v9AwCherk8wK5VBdSAh9vqPNXog g0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=P/3gymjggxG0AGo8CB4kiNTmYVS5hoUgWnwMUY5zy6A=; b=QerQGA0ntrBCX1g9SlEZ9yiP2gbB7XudqcaZjC69XuogHA+dE/laSNlKnWAeS08mR5 QZTh48U0q+DOTF7SPyk5/5rFjsX7fx+nO4ngenrlleT/rtcUOU2xd7ENqQ0c8+wkXfNz dQIFOe7KN/UGc/ZuEoK+5j9QmD7SIi1gD4A1c5GTxcIcBo5DtGjhiAzyxgcu12bixJpJ LDh0+o+gExvYgOC5iJlaiFNy1KW50gxmeRuw2d4ri/AU4dYJY//QulrjWON0+TTp4gwP z3+bwynlORF5UdM9eqRriIkIVX66EfbpFfJIorF8UEdmdjK2ntESq6OHDupoV7FJNgou X+jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=XHerL+dM; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=DXuPSQyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a170903110600b00188b9b4139asi19066313plh.210.2022.11.23.03.12.31; Wed, 23 Nov 2022 03:12:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=XHerL+dM; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=DXuPSQyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236697AbiKWLDU (ORCPT + 88 others); Wed, 23 Nov 2022 06:03:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236560AbiKWLCt (ORCPT ); Wed, 23 Nov 2022 06:02:49 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC5124965; Wed, 23 Nov 2022 02:58:20 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 404755C018B; Wed, 23 Nov 2022 05:58:20 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Wed, 23 Nov 2022 05:58:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669201100; x=1669287500; bh=P/3gymjggx G0AGo8CB4kiNTmYVS5hoUgWnwMUY5zy6A=; b=XHerL+dM+qFeU/J/gClsNwqKYP +/f48/pxEFdBIrgqCgIQLzD9UFu9xP1tqyeSqfgwXjvIvRL8p3bCjb0bNiI9pfXR DWGqecxjuUkjtwe6CpBmkVnaHwop6wzEjYcy0pl938upDFhP/AkM73XSEGC7A3+N LcPLvZ9MFm+tPG3cRUTXK5slAxL/dBxMRCeSsA7s0qqzXQ/EEKvpMKUxH5+E7xvo loR6KfoexCYcdlW9TyduWMYvnqWH/eobTeAxW4Vj6xt1EYhWenZqwLwHCkALwKE3 fdY1zhdIW83wFlwj7j/Gc1WNv63jnPWCYMnUZxsTCfC845UmY5WPFydbXPzQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669201100; x=1669287500; bh=P/3gymjggxG0AGo8CB4kiNTmYVS5 hoUgWnwMUY5zy6A=; b=DXuPSQyIBea+ygxBIrS1CUZ8KzYgBSuCeg3zFSY1x7Wy H35LLQSxcPV9GwtCUj4XHP0V8vIrTKuORP4QJP+vRXyA3S1sydeDaDSOxOt5/OnU HewPpYDKJabWFRxYGXCrmlaQgR6klwWTX8IHHCGPDnHkViHAi8wTbxypX9y59l1V 0rxQCHvo0ZlnFmXuZgmGpxUVD8j3S8rDGBOqCkGvhrrw5XOy7lv82lQlzrkM0Aku rWsh13yD1uLsqzYdVhjuCcTfNyf8pbNqQeR2Z+dciT+ZLmmVrg3RROoXYewu9hf7 Rq0ShKkYrXeYH+qTtfNv+BMTJoxU4CggQbRZuYv3bg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedriedugddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2195EB60086; Wed, 23 Nov 2022 05:58:19 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: <577e273d-ff9b-4d8d-b797-d7275ab8374f@app.fastmail.com> In-Reply-To: <20221122201232.107065-3-tmaimon77@gmail.com> References: <20221122201232.107065-1-tmaimon77@gmail.com> <20221122201232.107065-3-tmaimon77@gmail.com> Date: Wed, 23 Nov 2022 11:57:57 +0100 From: "Arnd Bergmann" To: "Tomer Maimon" , avifishman70@gmail.com, tali.perry1@gmail.com, "Joel Stanley" , venture@google.com, yuenn@google.com, benjaminfair@google.com, "Hitomi Hasegawa" , "Hector Martin" , "Nicolas Ferre" , "Conor.Dooley" , =?UTF-8?Q?Heiko_St=C3=BCbner?= , "Sven Peter" , "Brian Norris" , "Rob Herring" , krzysztof.kozlowski+dt@linaro.org Cc: openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v1 2/2] soc: nuvoton: add NPCM LPC BPC driver Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 22, 2022, at 21:12, Tomer Maimon wrote: > Add Nuvoton BMC NPCM LPC BIOS post code (BPC) driver. > > The NPCM BPC monitoring two configurable I/O address written by the host > on the Low Pin Count (LPC) bus. > > Signed-off-by: Tomer Maimon > --- > drivers/soc/Kconfig | 1 + > drivers/soc/Makefile | 1 + > drivers/soc/nuvoton/Kconfig | 24 ++ > drivers/soc/nuvoton/Makefile | 3 + > drivers/soc/nuvoton/npcm-lpc-bpc.c | 396 +++++++++++++++++++++++++++++ In general, I try to keep drivers/soc/ for drivers that are used purely inside of the kernel and don't provide their own user space ABI, those should normally be part of some subsystem grouped by functionality. It appears that we have similar drivers for aspeed already, so there is some precedent, but I would still like to ask you and Joel to try to make sure the two are compatible, or ideally share the code for the user-facing part of the LPC driver. > +config NPCM_PCI_MBOX > + tristate "NPCM PCI Mailbox Controller" > + depends on (ARCH_NPCM || COMPILE_TEST) && REGMAP && MFD_SYSCON > + help > + Expose the NPCM BMC PCI MBOX registers found on Nuvoton SOCs > + to userspace. This looks unrelated to the LPC driver, so this should probably be a separate patch. The same comment about user space presumably applies here, but I have not seen the driver. The implementation of npcm-lpc-bpc looks fine otherwise, I only noticed one minor detail that I would change: > + np = pdev->dev.parent->of_node; > + if (!of_device_is_compatible(np, "nuvoton,npcm750-lpc") && > + !of_device_is_compatible(np, "nuvoton,npcm845-lpc")) { > + dev_err(dev, "unsupported LPC device binding\n"); > + return -ENODEV; > + } This check doesn't seem to make sense here, since those are the only two types you support. Arnd