summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel/pmt/features.c
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2025-07-02 19:28:19 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-07-03 11:09:25 +0300
commit8a67d4b49bbdebcd255abde9e652092c3de3b657 (patch)
tree6f13cba823bd957ac2fe10103956a5ef5e838879 /drivers/platform/x86/intel/pmt/features.c
parentb0631f8a5740c55b52d02174cc4c9c84cc7a16a1 (diff)
platform/x86/intel/vsec: Add device links to enforce dependencies
New Intel VSEC features will have dependencies on other features, requiring certain supplier drivers to be probed before their consumers. To enforce this dependency ordering, introduce device links using device_link_add(), ensuring that suppliers are fully registered before consumers are probed. - Add device link tracking by storing supplier devices and tracking their state. - Implement intel_vsec_link_devices() to establish links between suppliers and consumers based on feature dependencies. - Add get_consumer_dependencies() to retrieve supplier-consumer relationships. - Modify feature registration logic: * Consumers now check that all required suppliers are registered before being initialized. * suppliers_ready() verifies that all required supplier devices are available. - Prevent potential null consumer name issue in sysfs: - Use dev_set_name() when creating auxiliary devices to ensure a unique, non-null consumer name. - Update intel_vsec_pci_probe() to loop up to the number of possible features or when all devices are registered, whichever comes first. - Introduce VSEC_CAP_UNUSED to prevent sub-features (registered via exported APIs) from being mistakenly linked. Signed-off-by: David E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20250703022832.1302928-5-david.e.box@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/features.c')
0 files changed, 0 insertions, 0 deletions