Merge tag 'thermal-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / drivers / thermal / intel / int340x_thermal / processor_thermal_device_pci.c
index d749557..14e34ea 100644 (file)
@@ -233,11 +233,7 @@ static int get_trip_temp(struct proc_thermal_pci *pci_info)
        return temp;
 }
 
-static struct thermal_trip psv_trip = {
-       .type = THERMAL_TRIP_PASSIVE,
-};
-
-static struct thermal_zone_device_ops tzone_ops = {
+static const struct thermal_zone_device_ops tzone_ops = {
        .get_temp = sys_get_curr_temp,
        .set_trip_temp  = sys_set_trip_temp,
 };
@@ -251,6 +247,10 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
 {
        struct proc_thermal_device *proc_priv;
        struct proc_thermal_pci *pci_info;
+       struct thermal_trip psv_trip = {
+               .type = THERMAL_TRIP_PASSIVE,
+               .flags = THERMAL_TRIP_FLAG_RW_TEMP,
+       };
        int irq_flag = 0, irq, ret;
        bool msi_irq = false;
 
@@ -290,7 +290,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
        psv_trip.temperature = get_trip_temp(pci_info);
 
        pci_info->tzone = thermal_zone_device_register_with_trips("TCPU_PCI", &psv_trip,
-                                                       1, 1, pci_info,
+                                                       1, pci_info,
                                                        &tzone_ops,
                                                        &tzone_params, 0, 0);
        if (IS_ERR(pci_info->tzone)) {
@@ -407,6 +407,7 @@ static SIMPLE_DEV_PM_OPS(proc_thermal_pci_pm, proc_thermal_pci_suspend,
 static const struct pci_device_id proc_thermal_pci_ids[] = {
        { PCI_DEVICE_DATA(INTEL, ADL_THERMAL, PROC_THERMAL_FEATURE_RAPL |
          PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_REQ) },
+       { PCI_DEVICE_DATA(INTEL, LNLM_THERMAL, PROC_THERMAL_FEATURE_RAPL) },
        { PCI_DEVICE_DATA(INTEL, MTLP_THERMAL, PROC_THERMAL_FEATURE_RAPL |
          PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_DLVR |
          PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) },