linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Tomer Maimon" <tmaimon77@gmail.com>,
	pmenzel@molgen.mpg.de, "Rob Herring" <robh+dt@kernel.org>,
	krzysztof.kozlowski+dt@linaro.org,
	"Conor Dooley" <conor+dt@kernel.org>,
	avifishman70@gmail.com, tali.perry1@gmail.com,
	"Joel Stanley" <joel@jms.id.au>,
	venture@google.com, yuenn@google.com, benjaminfair@google.com,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Cc: openbmc@lists.ozlabs.org,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] soc: nuvoton: add NPCM BPC driver
Date: Thu, 14 Dec 2023 13:44:24 +0100	[thread overview]
Message-ID: <cf3ce945-2f1c-4dae-86b8-349dae3d962b@app.fastmail.com> (raw)
In-Reply-To: <20231213190528.3751583-4-tmaimon77@gmail.com>

On Wed, Dec 13, 2023, at 20:05, Tomer Maimon wrote:
> Add Nuvoton BMC NPCM BIOS post code (BPC) driver.
>
> The NPCM BPC monitoring two configurable I/O address written by the host
> on the bus.
>
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  drivers/soc/nuvoton/Kconfig    |   9 +
>  drivers/soc/nuvoton/Makefile   |   1 +
>  drivers/soc/nuvoton/npcm-bpc.c | 387 +++++++++++++++++++++++++++++++++
>  3 files changed, 397 insertions(+)
>  create mode 100644 drivers/soc/nuvoton/npcm-bpc.c

I try hard to avoid having user interfaces in drivers/soc/, that
subsystem should primarily be used for things that don't have an
existing subsystem in the kernel and are used by other in-kernel
drivers but don't export hteir own misc device.

> diff --git a/drivers/soc/nuvoton/Kconfig b/drivers/soc/nuvoton/Kconfig
> index d5102f5f0c28..ebd162633942 100644
> --- a/drivers/soc/nuvoton/Kconfig
> +++ b/drivers/soc/nuvoton/Kconfig
> @@ -2,6 +2,15 @@
> 
>  menu "NUVOTON SoC drivers"
> 
> +config NPCM_BPC
> +	tristate "NPCM BIOS Post Code support"
> +	depends on (ARCH_NPCM || COMPILE_TEST)
> +	help
> +	  Provides NPCM driver to control the BIOS Post Code
> +	  interface which allows the BMC to monitor and save
> +	  the data written by the host to an arbitrary I/O port,
> +	  the BPC is connected to the host thourgh LPC or eSPI bus.
> +

This one in particular looks like this might be implemented
by more than one BMC type, it's a fairly generic functionality.

Have you talked to the other maintainers of SoCs used in
OpenBMC about coming up with a common interface?

> +#define DEVICE_NAME	"npcm-bpc"

[nitpicking] No need for macros like this one, open-coding the
string is usually more readable.

    Arnd

  parent reply	other threads:[~2023-12-14 12:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 19:05 [PATCH v3 0/3] soc: add NPCM BPC driver support Tomer Maimon
2023-12-13 19:05 ` [PATCH v3 1/3] dt-bindings: soc: nuvoton: Add NPCM BPC Tomer Maimon
2023-12-14  7:56   ` Krzysztof Kozlowski
2023-12-14 13:34     ` Tomer Maimon
2023-12-14 15:29       ` Krzysztof Kozlowski
2023-12-13 19:05 ` [PATCH v3 2/3] soc: nuvoton: add configuration menu Tomer Maimon
2023-12-13 19:05 ` [PATCH v3 3/3] soc: nuvoton: add NPCM BPC driver Tomer Maimon
2023-12-14  7:59   ` Krzysztof Kozlowski
2023-12-14 12:44   ` Arnd Bergmann [this message]
2023-12-14 14:09     ` Tomer Maimon
2023-12-14 15:48       ` Arnd Bergmann
2023-12-14 16:50         ` Tomer Maimon
2023-12-14 22:41   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-12-13 18:28 [PATCH v3 0/3] soc: add NPCM BPC driver support Tomer Maimon
2023-12-13 18:28 ` [PATCH v3 3/3] soc: nuvoton: add NPCM BPC driver Tomer Maimon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf3ce945-2f1c-4dae-86b8-349dae3d962b@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=robh+dt@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).