diff options
author | Abhijit Gangurde <abhijit.gangurde@amd.com> | 2023-10-17 21:35:05 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-27 13:23:24 +0200 |
commit | fa10f413091a43f801f82b3cf484f15d6fc9266f (patch) | |
tree | 841c8ae975588c68351c92ae5ada6ba3db414bc6 /scripts/mod/file2alias.c | |
parent | 0174f5810401ae6390bfe15354346b5ea660d40c (diff) | |
download | linux-fa10f413091a43f801f82b3cf484f15d6fc9266f.tar.gz linux-fa10f413091a43f801f82b3cf484f15d6fc9266f.tar.bz2 linux-fa10f413091a43f801f82b3cf484f15d6fc9266f.zip |
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 <puneet.gupta@amd.com>
Signed-off-by: Puneet Gupta <puneet.gupta@amd.com>
Co-developed-by: Nipun Gupta <nipun.gupta@amd.com>
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Link: https://lore.kernel.org/r/20231017160505.10640-8-abhijit.gangurde@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 7056751c29b1..2b28faca9585 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1458,6 +1458,10 @@ static int do_cdx_entry(const char *filename, void *symval, { DEF_FIELD(symval, cdx_device_id, vendor); DEF_FIELD(symval, cdx_device_id, device); + DEF_FIELD(symval, cdx_device_id, subvendor); + DEF_FIELD(symval, cdx_device_id, subdevice); + DEF_FIELD(symval, cdx_device_id, class); + DEF_FIELD(symval, cdx_device_id, class_mask); DEF_FIELD(symval, cdx_device_id, override_only); switch (override_only) { @@ -1475,6 +1479,10 @@ static int do_cdx_entry(const char *filename, void *symval, ADD(alias, "v", vendor != CDX_ANY_ID, vendor); ADD(alias, "d", device != CDX_ANY_ID, device); + ADD(alias, "sv", subvendor != CDX_ANY_ID, subvendor); + ADD(alias, "sd", subdevice != CDX_ANY_ID, subdevice); + ADD(alias, "c", class_mask == 0xFFFFFF, class); + return 1; } |