public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/6] misc: amd-sbi: Refactor SBTSI driver with I3C support and ioctl interface
@ 2026-03-23 11:08 Akshay Gupta
  2026-03-23 11:08 ` [PATCH v1 1/6] hwmon/misc: amd-sbi: Move core SBTSI support from hwmon to misc Akshay Gupta
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Akshay Gupta @ 2026-03-23 11:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: corbet, skhan, linux, arnd, gregkh, akshay.gupta, Prathima.Lk,
	naveenkrishna.chatradhi, Anand.Umarji, linux-doc, linux-hwmon,
	kunyi, Akshay Gupta

This series refactors the AMD SB-TSI (Side-Band Temperature Sensor
Interface) driver by moving it from the hwmon subsystem into the
drivers/misc/amd-sbi framework, alongside the existing SB-RMI driver.

Background:
The SB-TSI driver currently lives under drivers/hwmon/sbtsi_temp.c and
is limited to exposing temperature readings via the hwmon interface.
As AMD platforms evolve, SB-TSI access is required from multiple
consumers (hwmon, userspace via ioctl, I3C-attached devices), making
the hwmon-only placement insufficient.

This series restructures the driver into a layered design:

  - tsi-core.c  : core register access and ioctl/miscdevice support
  - tsi-hwmon.c : hwmon sensor layer built on top of the core
  - tsi.c       : I2C/I3C probe and glue

Changes in this series:
1. Move core SBTSI driver from drivers/hwmon into drivers/misc/amd-sbi,
   renaming sbtsi_temp.c -> sbtsi.c and wiring it into the amd-sbi
   Kconfig/Makefile. The hwmon probe entry point is preserved so
   existing device-tree bindings and hwmon consumers are unaffected.

2. Update the Kconfig entry to explicitly state that the driver targets
   BMC-side I2C/I3C controllers (ARM/ARM64), avoiding accidental
   enablement on non-BMC targets.

3. Split the hwmon sensor handling (sysfs attributes, hwmon_chip_info)
   into tsi-hwmon.c so the core transport layer is not entangled with
   hwmon internals, making future interface additions cleaner.

4. Extend the driver to support SB-TSI over I3C in addition to I2C.
   Both buses share the same core read/write path via sbtsi_xfer();
   the is_i3c flag selects the underlying transport at probe time.
   Backward compatibility with existing I2C deployments is maintained.

5. Add a miscdevice (/dev/sbtsi-<addr>) and an ioctl interface
   (SBTSI_IOCTL_REG_XFER_CMD) that allows root userspace to perform
   SB-TSI register read/write operations through the APML protocol,
   consistent with the existing SBRMI ioctl interface.

6. Document the new SBTSI miscdevice and its ioctl in
   Documentation/misc-devices/amd-sbi.rst.

Testing:
Tested on AMD Genoa/Turin/Venice BMC platforms with both I2C and I3C-attached
SB-TSI targets. hwmon sysfs attributes (tempX_input, tempX_max, etc.)
and ioctl register transfers verified against hardware.

Akshay Gupta (1):
  misc: amd-sbi: Update SBTSI Kconfig to clarify this is BMC driver

Prathima (5):
  hwmon/misc: amd-sbi: Move core SBTSI support from hwmon to misc
  misc: amd-sbi: Split SBTSI hwmon sensor handling into a separate
    entity
  misc: amd-sbi: Add support for SB-TSI over I3C
  misc: amd-sbi: Add SBTSI ioctl register transfer interface
  docs: misc: amd-sbi: Document SBTSI userspace interface

 Documentation/misc-devices/amd-sbi.rst |  18 ++
 drivers/hwmon/Kconfig                  |  10 -
 drivers/hwmon/Makefile                 |   1 -
 drivers/hwmon/sbtsi_temp.c             | 250 -------------------------
 drivers/misc/amd-sbi/Kconfig           |  24 +++
 drivers/misc/amd-sbi/Makefile          |   4 +
 drivers/misc/amd-sbi/tsi-core.c        | 146 +++++++++++++++
 drivers/misc/amd-sbi/tsi-core.h        |  44 +++++
 drivers/misc/amd-sbi/tsi-hwmon.c       | 198 ++++++++++++++++++++
 drivers/misc/amd-sbi/tsi.c             | 162 ++++++++++++++++
 include/uapi/misc/amd-apml.h           |  23 +++
 11 files changed, 619 insertions(+), 261 deletions(-)
 delete mode 100644 drivers/hwmon/sbtsi_temp.c
 create mode 100644 drivers/misc/amd-sbi/tsi-core.c
 create mode 100644 drivers/misc/amd-sbi/tsi-core.h
 create mode 100644 drivers/misc/amd-sbi/tsi-hwmon.c
 create mode 100644 drivers/misc/amd-sbi/tsi.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-03-27  7:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 11:08 [PATCH v1 0/6] misc: amd-sbi: Refactor SBTSI driver with I3C support and ioctl interface Akshay Gupta
2026-03-23 11:08 ` [PATCH v1 1/6] hwmon/misc: amd-sbi: Move core SBTSI support from hwmon to misc Akshay Gupta
2026-03-23 14:15   ` Guenter Roeck
2026-03-24 10:36     ` Gupta, Akshay
2026-03-24 11:33       ` Guenter Roeck
2026-03-27  5:07         ` Gupta, Akshay
2026-03-27  5:52           ` Guenter Roeck
2026-03-27  7:23             ` gregkh
2026-03-23 11:08 ` [PATCH v1 2/6] misc: amd-sbi: Update SBTSI Kconfig to clarify this is BMC driver Akshay Gupta
2026-03-23 11:08 ` [PATCH v1 3/6] misc: amd-sbi: Split SBTSI hwmon sensor handling into a separate entity Akshay Gupta
2026-03-23 11:08 ` [PATCH v1 4/6] misc: amd-sbi: Add support for SB-TSI over I3C Akshay Gupta
2026-03-23 11:08 ` [PATCH v1 5/6] misc: amd-sbi: Add SBTSI ioctl register transfer interface Akshay Gupta
2026-03-27  7:24   ` Greg KH
2026-03-23 11:08 ` [PATCH v1 6/6] docs: misc: amd-sbi: Document SBTSI userspace interface Akshay Gupta
2026-03-27  7:25   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox