virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Haixu Cui <quic_haixcui@quicinc.com>, Mark Brown <broonie@kernel.org>
Cc: virtualization@lists.linux.dev, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH RFC] spi: virtio: Add [new,delete]_device sysfs interface
Date: Mon, 8 Dec 2025 19:46:34 +0800	[thread overview]
Message-ID: <aTa6moPSbWk7+S6u@shlinux89> (raw)
In-Reply-To: <20251205-v-spi-v1-1-89713cc6c0b4@nxp.com>

On Fri, Dec 05, 2025 at 09:40:26PM +0800, Peng Fan (OSS) wrote:
>From: Peng Fan <peng.fan@nxp.com>
>
>spi-virtio registers a SPI controller, but we still need to register a
>SPI device to initiate the SPI virtio transfer.
>
>To Xen hypervisor, there might be no 'passthrough' node for DomU,
>so add a sysfs interface to allow creating/deleting a SPI device.
>
>Usage:
> echo "spidev" > /sys/class/spi_master/spi0/new_device
> echo "spi0.0" > /sys/class/spi_master/spi0/delete_device
>

After rethinking about this, I think it might be better to add the sysfs
to all SPI controller just as what i2c core supports:
drivers/i2c/i2c-core-base.c: 1264

I will post out v2 to move the code to spi_controller_groups if no objections.

Thanks,
Peng

      reply	other threads:[~2025-12-08 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 13:40 [PATCH RFC] spi: virtio: Add [new,delete]_device sysfs interface Peng Fan (OSS)
2025-12-08 11:46 ` Peng Fan [this message]

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=aTa6moPSbWk7+S6u@shlinux89 \
    --to=peng.fan@oss.nxp.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=quic_haixcui@quicinc.com \
    --cc=virtualization@lists.linux.dev \
    /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).