1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * intel_tpmi.h: Intel TPMI core external interface 4 */ 5 6 #ifndef _INTEL_TPMI_H_ 7 #define _INTEL_TPMI_H_ 8 9 #include <linux/bitfield.h> 10 11 #define TPMI_VERSION_INVALID 0xff 12 #define TPMI_MINOR_VERSION(val) FIELD_GET(GENMASK(4, 0), val) 13 #define TPMI_MAJOR_VERSION(val) FIELD_GET(GENMASK(7, 5), val) 14 15 /** 16 * struct intel_tpmi_plat_info - Platform information for a TPMI device instance 17 * @package_id: CPU Package id 18 * @bus_number: PCI bus number 19 * @device_number: PCI device number 20 * @function_number: PCI function number 21 * 22 * Structure to store platform data for a TPMI device instance. This 23 * struct is used to return data via tpmi_get_platform_data(). 24 */ 25 struct intel_tpmi_plat_info { 26 u8 package_id; 27 u8 bus_number; 28 u8 device_number; 29 u8 function_number; 30 }; 31 32 struct intel_tpmi_plat_info *tpmi_get_platform_data(struct auxiliary_device *auxdev); 33 struct resource *tpmi_get_resource_at_index(struct auxiliary_device *auxdev, int index); 34 int tpmi_get_resource_count(struct auxiliary_device *auxdev); 35 36 int tpmi_get_feature_status(struct auxiliary_device *auxdev, int feature_id, int *locked, 37 int *disabled); 38 #endif 39