]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd/hsmp: Use dev_groups in the driver structure
authorSuma Hegde <suma.hegde@amd.com>
Mon, 21 Oct 2024 11:14:27 +0000 (11:14 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 25 Oct 2024 14:29:33 +0000 (17:29 +0300)
commitc1691730d9ffb8e813018235ad1b9754104cf67b
tree747ced37dd8c717c648cd6c8ac137aed3ccb51d2
parent4fc0366ef83f493c63ecf732cbb7ed49edd62072
platform/x86/amd/hsmp: Use dev_groups in the driver structure

Move out of device_add_group() variants, instead assign static array of
attribute groups to .dev_groups in platform_driver structure.
Then use is_visible to enable only the necessary files on the platform.

.read() and .is_bin_visibile() have slightly different
implemetations on ACPI and non-ACPI system, so move them
to respective files.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Link: https://lore.kernel.org/r/20241021111428.2676884-10-suma.hegde@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp/acpi.c
drivers/platform/x86/amd/hsmp/hsmp.c
drivers/platform/x86/amd/hsmp/hsmp.h
drivers/platform/x86/amd/hsmp/plat.c