devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/3] mailbox: renesas: Support MFIS mailbox driver
Date: Fri, 24 Oct 2025 09:58:46 +0200	[thread overview]
Message-ID: <17ebfe0f-ec3b-4f93-9146-f191d9c6a7fc@kernel.org> (raw)
In-Reply-To: <87cy6cn7jg.wl-kuninori.morimoto.gx@renesas.com>

On 24/10/2025 08:22, Kuninori Morimoto wrote:
> From: Masashi Ozaki <masashi.ozaki.te@renesas.com>
> 
> Add Renesas MFIS mailbox driver for R8A78000 (X5H)
> 
> Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com>
> Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  drivers/mailbox/Kconfig             |  10 +-
>  drivers/mailbox/Makefile            |   2 +
>  drivers/mailbox/rcar-mfis-mailbox.c | 137 ++++++++++++++++++++++++++++
>  3 files changed, 148 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c
> 
> diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> index e47cb68989267..07e6bf06effe3 100644
> --- a/drivers/mailbox/Kconfig
> +++ b/drivers/mailbox/Kconfig
> @@ -379,6 +379,15 @@ config BCM74110_MAILBOX
>  	  processor and coprocessor that handles various power management task
>  	  and more.
>  
> +config RCAR_MFIS_MBOX
> +	bool "Renesas R-Car Multifunctional Interface Mailbox Support"
> +	depends on ARM_SCMI_PROTOCOL && ARCH_RENESAS

I don't see any build restrictions, why no compile test?

> +	help
> +	  This driver provides support for SCMI interface transport with
> +	  MFIS(Multifunctional Interface).
> +	  It is used to send short message between CPU cores and
> +	  SCP(System Control Processor).
> +
>  config RISCV_SBI_MPXY_MBOX
>  	tristate "RISC-V SBI Message Proxy (MPXY) Mailbox"
>  	depends on RISCV_SBI
> @@ -389,5 +398,4 @@ config RISCV_SBI_MPXY_MBOX
>  	  remote processor through the SBI implementation (M-mode firmware
>  	  or HS-mode hypervisor). Say Y here if you want to have this support.
>  	  If unsure say N.
> -


Does not look as intended change.

...

> +
> +static int mfis_startup(struct mbox_chan *link)
> +{
> +	struct mbox_controller *mbox = link->mbox;
> +	struct device *dev = mbox->dev;
> +	int irq;
> +	int ret;
> +
> +	irq = of_irq_get(dev->of_node, 0);
> +
> +	ret = request_irq(irq, mfis_rx_interrupt,
> +			  IRQF_SHARED, "mfis-mbox", link);
> +	if (ret) {
> +		dev_err(dev,
> +			"Unable to acquire IRQ %d\n", irq);

Please don't wrap lines when not necessary. This only hurts readability.


> +		return ret;
> +	}



> +
> +	ret = mbox_controller_register(mbox);
> +	if (ret)
> +		return ret;
> +
> +	platform_set_drvdata(pdev, mbox);
> +	dev_info(dev, "MFIS mailbox is probed\n");


This does not look like useful printk message. Drivers should be silent
on success:
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/coding-style.rst#L913
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/debugging/driver_development_debugging_guide.rst#L79

> +
> +	return 0;
> +}
> +
> +static const struct of_device_id mfis_mbox_of_match[] = {
> +	{ .compatible = "renesas,mfis-mbox", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, mfis_mbox_of_match);
> +
> +static struct platform_driver mfis_mbox_driver = {
> +	.driver = {
> +		.name = "renesas-mfis-mbox",
> +		.of_match_table = mfis_mbox_of_match,
> +	},
> +	.probe	= mfis_mbox_probe,
> +};
> +module_platform_driver(mfis_mbox_driver);
> +MODULE_DESCRIPTION("Renesas MFIS mailbox driver");
> +MODULE_LICENSE("GPL v2");


Best regards,
Krzysztof

  reply	other threads:[~2025-10-24  7:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24  6:21 [PATCH 0/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto
2025-10-24  6:22 ` [PATCH 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto
2025-10-24  8:01   ` Geert Uytterhoeven
2025-10-24  6:22 ` [PATCH 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto
2025-10-24  7:58   ` Krzysztof Kozlowski [this message]
2025-10-24  8:12   ` Geert Uytterhoeven
2025-10-26 22:47   ` Wolfram Sang
2025-10-24  6:22 ` [PATCH 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto
2025-10-24  7:24   ` Rob Herring (Arm)
2025-10-27  4:57     ` Kuninori Morimoto
2025-10-27  9:36       ` Geert Uytterhoeven
2025-10-28  2:05         ` Kuninori Morimoto
2025-10-29  6:26         ` Kuninori Morimoto
2025-10-29  9:33           ` Geert Uytterhoeven
2025-10-24  8:01   ` Krzysztof Kozlowski

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=17ebfe0f-ec3b-4f93-9146-f191d9c6a7fc@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=jassisinghbrar@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=robh@kernel.org \
    /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).