From d8e3a61318b9b18b56680bd62e93afbafae16263 Mon Sep 17 00:00:00 2001 From: Srinivas Pandruvada Date: Fri, 25 May 2018 18:10:10 -0700 Subject: thermal: int340x: Prevent error in reading trip hysteresis attribute Some of the INT340X devices may not have hysteresis defined in the ACPI definition. In that case reading trip hysteresis results in error. This spams logs of user space utilities. In this case instead of returning error, just return hysteresis as 0, which is correct as there is no hysteresis defined for the device. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui --- drivers/thermal/int340x_thermal/int340x_thermal_zone.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c index 145a5c53ff5c..dfdf6dbc2ddc 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c @@ -147,9 +147,9 @@ static int int340x_thermal_get_trip_hyst(struct thermal_zone_device *zone, status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL, &hyst); if (ACPI_FAILURE(status)) - return -EIO; - - *temp = hyst * 100; + *temp = 0; + else + *temp = hyst * 100; return 0; } -- cgit v1.2.3 From ce7d35fa4e60b08ed3f3c568e9fa6cdabf753e7e Mon Sep 17 00:00:00 2001 From: Sumeet Pawnikar Date: Mon, 7 May 2018 23:55:28 +0530 Subject: thermal: int340x: processor_thermal: Add GeminiLake support Added PCI device id of GeminiLake thermal device. Signed-off-by: Sumeet Pawnikar Signed-off-by: Zhang Rui --- drivers/thermal/int340x_thermal/processor_thermal_device.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c index 80bbf9ce2fb6..284cf2c5a8fd 100644 --- a/drivers/thermal/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c @@ -43,6 +43,9 @@ #define PCI_DEVICE_ID_PROC_BXTX_THERMAL 0x4A8C #define PCI_DEVICE_ID_PROC_BXTP_THERMAL 0x5A8C +/* GeminiLake thermal reporting device */ +#define PCI_DEVICE_ID_PROC_GLK_THERMAL 0x318C + struct power_config { u32 index; u32 min_uw; @@ -467,6 +470,7 @@ static const struct pci_device_id proc_thermal_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_BXTP_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CNL_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CFL_THERMAL)}, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_GLK_THERMAL)}, { 0, }, }; -- cgit v1.2.3