[PATCH v6 0/6] cdx: provide sysfs interface for cdx device resources

From: Abhijit Gangurde
Date: Fri Oct 13 2023 - 02:09:22 EST


This patch series provides sysfs interface to
- enable and disable of cdx bus
- reset all the devices on cdx bus
- subsystem, class and revision for cdx device

Changes in v6:
- Register cdx bus on cdx subsystem
- Remove bus attributes enable, disable and reset
- Add new device attributes enable visible only for bus
device.
- Use reset attribute of cdx device for bus reset.

Changes in v5:
- Rebased on Linux 6.6

Changes in v4:
- Make ida as static
- Improve commit message
- Add sparse markings for the lock

Changes in v3:
- Remove local cdx controller list from cdx bus system and
instead use platform bus to locate controller
- Use ida to allocate unique id for registered controller

Changes in v2:
- Introduce lock to protect controller ops
- Split sysfs entry enable to enable and disable
- sysfs entry enable and disable take bus number as an argument
- sysfs entry reset takes bus number as an argument

Abhijit Gangurde (6):
cdx: Remove cdx controller list from cdx bus system
cdx: Introduce lock to protect controller ops
cdx: Register cdx bus as a device on cdx subsystem
cdx: add support for bus enable and disable
cdx: add sysfs for bus reset
cdx: add sysfs for subsystem, class and revision

Documentation/ABI/testing/sysfs-bus-cdx | 66 +++++-
drivers/cdx/cdx.c | 258 +++++++++++++++++++++---
drivers/cdx/cdx.h | 22 +-
drivers/cdx/controller/cdx_controller.c | 19 ++
drivers/cdx/controller/mc_cdx_pcol.h | 54 +++++
drivers/cdx/controller/mcdi_functions.c | 31 +++
drivers/cdx/controller/mcdi_functions.h | 18 ++
include/linux/cdx/cdx_bus.h | 41 +++-
include/linux/mod_devicetable.h | 10 +
scripts/mod/devicetable-offsets.c | 4 +
scripts/mod/file2alias.c | 8 +
11 files changed, 499 insertions(+), 32 deletions(-)

--
2.34.1