aboutsummaryrefslogtreecommitdiff
path: root/drivers/cdx/controller
diff options
context:
space:
mode:
authorAbhijit Gangurde <[email protected]>2023-10-17 21:35:05 +0530
committerGreg Kroah-Hartman <[email protected]>2023-10-27 13:23:24 +0200
commitfa10f413091a43f801f82b3cf484f15d6fc9266f (patch)
tree841c8ae975588c68351c92ae5ada6ba3db414bc6 /drivers/cdx/controller
parent0174f5810401ae6390bfe15354346b5ea660d40c (diff)
cdx: add sysfs for subsystem, class and revision
CDX controller provides subsystem vendor, subsystem device, class and revision info of the device along with vendor and device ID in native endian format. CDX Bus system uses this information to bind the cdx device to the cdx device driver. Co-developed-by: Puneet Gupta <[email protected]> Signed-off-by: Puneet Gupta <[email protected]> Co-developed-by: Nipun Gupta <[email protected]> Signed-off-by: Nipun Gupta <[email protected]> Signed-off-by: Abhijit Gangurde <[email protected]> Reviewed-by: Pieter Jansen van Vuuren <[email protected]> Tested-by: Nikhil Agarwal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/cdx/controller')
-rw-r--r--drivers/cdx/controller/mcdi_functions.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cdx/controller/mcdi_functions.c b/drivers/cdx/controller/mcdi_functions.c
index 0e1e35d91242..65dca2aa1d3f 100644
--- a/drivers/cdx/controller/mcdi_functions.c
+++ b/drivers/cdx/controller/mcdi_functions.c
@@ -120,6 +120,13 @@ int cdx_mcdi_get_dev_config(struct cdx_mcdi *cdx,
dev_params->vendor = MCDI_WORD(outbuf, CDX_BUS_GET_DEVICE_CONFIG_OUT_VENDOR_ID);
dev_params->device = MCDI_WORD(outbuf, CDX_BUS_GET_DEVICE_CONFIG_OUT_DEVICE_ID);
+ dev_params->subsys_vendor = MCDI_WORD(outbuf,
+ CDX_BUS_GET_DEVICE_CONFIG_OUT_SUBSYS_VENDOR_ID);
+ dev_params->subsys_device = MCDI_WORD(outbuf,
+ CDX_BUS_GET_DEVICE_CONFIG_OUT_SUBSYS_DEVICE_ID);
+ dev_params->class = MCDI_DWORD(outbuf,
+ CDX_BUS_GET_DEVICE_CONFIG_OUT_DEVICE_CLASS) & 0xFFFFFF;
+ dev_params->revision = MCDI_BYTE(outbuf, CDX_BUS_GET_DEVICE_CONFIG_OUT_DEVICE_REVISION);
return 0;
}