|
@@ -501,6 +501,26 @@ static inline int pld_pcie_set_wfc_mode(struct device *dev,
|
|
|
{
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+static inline int pld_pci_thermal_register(struct device *dev,
|
|
|
+ unsigned long max_state,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline void pld_pci_thermal_unregister(struct device *dev,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+static inline int pld_pci_get_thermal_state(struct device *dev,
|
|
|
+ unsigned long *thermal_state,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
#else
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0))
|
|
|
int pld_pcie_set_wfc_mode(struct device *dev,
|
|
@@ -865,6 +885,26 @@ static inline bool pld_pcie_platform_driver_support(void)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+static inline int pld_pci_thermal_register(struct device *dev,
|
|
|
+ unsigned long max_state,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+ return cnss_thermal_cdev_register(dev, max_state, mon_id);
|
|
|
+}
|
|
|
+
|
|
|
+static inline void pld_pci_thermal_unregister(struct device *dev,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+ cnss_thermal_cdev_unregister(dev, mon_id);
|
|
|
+}
|
|
|
+
|
|
|
+static inline int pld_pci_get_thermal_state(struct device *dev,
|
|
|
+ unsigned long *thermal_state,
|
|
|
+ int mon_id)
|
|
|
+{
|
|
|
+ return cnss_get_curr_therm_cdev_state(dev, thermal_state, mon_id);
|
|
|
+}
|
|
|
+
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
|
|
static inline bool pld_pcie_is_direct_link_supported(struct device *dev)
|
|
|
{
|