From: Vishwaroop A <va@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Thierry Reding" <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>, <smangipudi@nvidia.com>,
<va@nvidia.com>
Subject: [PATCH 0/2] spi: add sysfs interface for userspace device instantiation
Date: Mon, 20 Apr 2026 03:14:15 +0000 [thread overview]
Message-ID: <20260420031417.291442-1-va@nvidia.com> (raw)
Development boards such as the Jetson AGX Orin expose SPI buses on
expansion headers so that users can connect and interact with SPI
peripherals from userspace via /dev/spidevB.C character devices.
Today there is no viable upstream mechanism to create these device nodes:
- The spidev driver rejects the bare "spidev" compatible string in DT,
since spidev is a Linux software interface, not a hardware description.
- Vendor-specific compatible strings (e.g. "nvidia,tegra-spidev") have
been rejected by DT maintainers for the same reason.
The I2C subsystem solved an analogous problem years ago by exposing
new_device/delete_device sysfs attributes on each i2c adapter. This
series adds the same interface to SPI host controllers.
Patch 1 adds the core implementation: new_device and delete_device sysfs
attributes under /sys/class/spi_master/spiB/, allowing userspace to
dynamically instantiate and remove SPI devices at runtime.
Patch 2 adds documentation: an RST guide describing usage, parameters,
examples, and limitations, plus a formal ABI entry.
Link: https://lore.kernel.org/linux-tegra/909f0c92-d110-4253-903e-5c81e21e12c9@nvidia.com/
Vishwaroop A (2):
spi: add new_device/delete_device sysfs interface
docs: spi: add documentation for userspace device instantiation
.../ABI/testing/sysfs-class-spi-master | 34 ++++
Documentation/spi/index.rst | 1 +
Documentation/spi/instantiating-devices.rst | 88 +++++++++
drivers/spi/spi.c | 172 ++++++++++++++++++
include/linux/spi/spi.h | 10 +
5 files changed, 305 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-spi-master
create mode 100644 Documentation/spi/instantiating-devices.rst
--
2.17.1
next reply other threads:[~2026-04-20 3:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 3:14 Vishwaroop A [this message]
2026-04-20 3:14 ` [PATCH 1/2] spi: add new_device/delete_device sysfs interface Vishwaroop A
2026-04-20 3:14 ` [PATCH 2/2] docs: spi: add documentation for userspace device instantiation Vishwaroop A
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=20260420031417.291442-1-va@nvidia.com \
--to=va@nvidia.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=smangipudi@nvidia.com \
--cc=thierry.reding@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