summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2026-03-12 18:51:43 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-03-17 18:51:15 +0200
commit353042d54d82f6c46449f0ee38c244b5a13c1fe4 (patch)
tree161bec63edde123ce4c32d1eeecd8c32973a3209 /include/linux
parentc62fd96a04e4a7b847448f97ecfe9f3fe706e7b3 (diff)
platform/x86/intel/vsec: Switch exported helpers from pci_dev to device
Preparatory refactor for ACPI-enumerated PMT endpoints. Several exported PMT/VSEC interfaces and structs carried struct pci_dev * even though callers only need a generic struct device. Move those to struct device * so the same APIs work for PCI and ACPI parents. Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: David E. Box <david.e.box@linux.intel.com> Link: https://patch.msgid.link/20260313015202.3660072-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 'include/linux')
-rw-r--r--include/linux/intel_vsec.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h
index 49a746ec0128..4eecb2a6bac4 100644
--- a/include/linux/intel_vsec.h
+++ b/include/linux/intel_vsec.h
@@ -29,6 +29,7 @@
#define INTEL_DVSEC_TABLE_OFFSET(x) ((x) & GENMASK(31, 3))
#define TABLE_OFFSET_SHIFT 3
+struct device;
struct pci_dev;
struct resource;
@@ -82,14 +83,14 @@ enum intel_vsec_quirks {
* struct pmt_callbacks - Callback infrastructure for PMT devices
* @read_telem: when specified, called by client driver to access PMT
* data (instead of direct copy).
- * * pdev: PCI device reference for the callback's use
+ * * dev: device reference for the callback's use
* * guid: ID of data to acccss
* * data: buffer for the data to be copied
* * off: offset into the requested buffer
* * count: size of buffer
*/
struct pmt_callbacks {
- int (*read_telem)(struct pci_dev *pdev, u32 guid, u64 *data, loff_t off, u32 count);
+ int (*read_telem)(struct device *dev, u32 guid, u64 *data, loff_t off, u32 count);
};
struct vsec_feature_dependency {
@@ -122,7 +123,7 @@ struct intel_vsec_platform_info {
/**
* struct intel_vsec_device - Auxbus specific device information
* @auxdev: auxbus device struct for auxbus access
- * @pcidev: pci device associated with the device
+ * @dev: struct device associated with the device
* @resource: any resources shared by the parent
* @ida: id reference
* @num_resources: number of resources
@@ -135,7 +136,7 @@ struct intel_vsec_platform_info {
*/
struct intel_vsec_device {
struct auxiliary_device auxdev;
- struct pci_dev *pcidev;
+ struct device *dev;
struct resource *resource;
struct ida *ida;
int num_resources;
@@ -199,13 +200,13 @@ static inline struct intel_vsec_device *auxdev_to_ivdev(struct auxiliary_device
}
#if IS_ENABLED(CONFIG_INTEL_VSEC)
-int intel_vsec_register(struct pci_dev *pdev,
+int intel_vsec_register(struct device *dev,
const struct intel_vsec_platform_info *info);
int intel_vsec_set_mapping(struct oobmsm_plat_info *plat_info,
struct intel_vsec_device *vsec_dev);
struct oobmsm_plat_info *intel_vsec_get_mapping(struct pci_dev *pdev);
#else
-static inline int intel_vsec_register(struct pci_dev *pdev,
+static inline int intel_vsec_register(struct device *dev,
const struct intel_vsec_platform_info *info)
{
return -ENODEV;