mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
6d957f1e16
Add interface to get resources and platform data. This will avoid code duplication. These interfaces includes: - Get resource count - Get resource at an index Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20230202010738.2186174-7-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
30 lines
866 B
C
30 lines
866 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* intel_tpmi.h: Intel TPMI core external interface
|
|
*/
|
|
|
|
#ifndef _INTEL_TPMI_H_
|
|
#define _INTEL_TPMI_H_
|
|
|
|
/**
|
|
* struct intel_tpmi_plat_info - Platform information for a TPMI device instance
|
|
* @package_id: CPU Package id
|
|
* @bus_number: PCI bus number
|
|
* @device_number: PCI device number
|
|
* @function_number: PCI function number
|
|
*
|
|
* Structure to store platform data for a TPMI device instance. This
|
|
* struct is used to return data via tpmi_get_platform_data().
|
|
*/
|
|
struct intel_tpmi_plat_info {
|
|
u8 package_id;
|
|
u8 bus_number;
|
|
u8 device_number;
|
|
u8 function_number;
|
|
};
|
|
|
|
struct intel_tpmi_plat_info *tpmi_get_platform_data(struct auxiliary_device *auxdev);
|
|
struct resource *tpmi_get_resource_at_index(struct auxiliary_device *auxdev, int index);
|
|
int tpmi_get_resource_count(struct auxiliary_device *auxdev);
|
|
|
|
#endif
|