From 33e678d47d1f3e8d485d38c87bc494ad7bf697f0 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 3 Apr 2018 15:19:03 +0530 Subject: thermal: Shorten name of sysfs callbacks The naming isn't consistent across all sysfs callbacks in the thermal core, some have a short name like type_show() and others have long names like thermal_cooling_device_weight_show(). This patch tries to make it consistent by shortening the name of sysfs callbacks. Some of the sysfs files are named similarly for both thermal zone and cooling device (like: type) and to avoid name clash between their show/store routines, the cooling device specific sysfs callbacks are prefixed with "cdev_". Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui --- drivers/thermal/thermal_core.c | 6 ++-- drivers/thermal/thermal_core.h | 13 +++----- drivers/thermal/thermal_sysfs.c | 74 +++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 59 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d64325e078db..649fd2a04823 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -736,7 +736,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, sysfs_attr_init(&dev->attr.attr); dev->attr.attr.name = dev->attr_name; dev->attr.attr.mode = 0444; - dev->attr.show = thermal_cooling_device_trip_point_show; + dev->attr.show = trip_point_show; result = device_create_file(&tz->device, &dev->attr); if (result) goto remove_symbol_link; @@ -745,8 +745,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, sysfs_attr_init(&dev->weight_attr.attr); dev->weight_attr.attr.name = dev->weight_attr_name; dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO; - dev->weight_attr.show = thermal_cooling_device_weight_show; - dev->weight_attr.store = thermal_cooling_device_weight_store; + dev->weight_attr.show = weight_show; + dev->weight_attr.store = weight_store; result = device_create_file(&tz->device, &dev->weight_attr); if (result) goto remove_trip_file; diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 5e4150261500..eddee27c1d06 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -75,15 +75,10 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *); void thermal_cooling_device_setup_sysfs(struct thermal_cooling_device *); void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev); /* used only at binding time */ -ssize_t -thermal_cooling_device_trip_point_show(struct device *, - struct device_attribute *, char *); -ssize_t thermal_cooling_device_weight_show(struct device *, - struct device_attribute *, char *); - -ssize_t thermal_cooling_device_weight_store(struct device *, - struct device_attribute *, - const char *, size_t); +ssize_t trip_point_show(struct device *, struct device_attribute *, char *); +ssize_t weight_show(struct device *, struct device_attribute *, char *); +ssize_t weight_store(struct device *, struct device_attribute *, const char *, + size_t); #ifdef CONFIG_THERMAL_STATISTICS void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 23b5e0a709b0..ba1df6953da6 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -668,17 +668,15 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *tz) /* sys I/F for cooling device */ static ssize_t -thermal_cooling_device_type_show(struct device *dev, - struct device_attribute *attr, char *buf) +cdev_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); return sprintf(buf, "%s\n", cdev->type); } -static ssize_t -thermal_cooling_device_max_state_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t max_state_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); unsigned long state; @@ -690,9 +688,8 @@ thermal_cooling_device_max_state_show(struct device *dev, return sprintf(buf, "%ld\n", state); } -static ssize_t -thermal_cooling_device_cur_state_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t cur_state_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); unsigned long state; @@ -705,9 +702,8 @@ thermal_cooling_device_cur_state_show(struct device *dev, } static ssize_t -thermal_cooling_device_cur_state_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +cur_state_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct thermal_cooling_device *cdev = to_cooling_device(dev); unsigned long state; @@ -726,13 +722,10 @@ thermal_cooling_device_cur_state_store(struct device *dev, return count; } -static struct device_attribute dev_attr_cdev_type = -__ATTR(type, 0444, thermal_cooling_device_type_show, NULL); -static DEVICE_ATTR(max_state, 0444, - thermal_cooling_device_max_state_show, NULL); -static DEVICE_ATTR(cur_state, 0644, - thermal_cooling_device_cur_state_show, - thermal_cooling_device_cur_state_store); +static struct device_attribute +dev_attr_cdev_type = __ATTR(type, 0444, cdev_type_show, NULL); +static DEVICE_ATTR(max_state, 0444, max_state_show, NULL); +static DEVICE_ATTR(cur_state, 0644, cur_state_show, cur_state_store); static struct attribute *cooling_device_attrs[] = { &dev_attr_cdev_type.attr, @@ -791,10 +784,8 @@ unlock: spin_unlock(&stats->lock); } -static ssize_t -thermal_cooling_device_total_trans_show(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t total_trans_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); struct cooling_dev_stats *stats = cdev->stats; @@ -808,9 +799,8 @@ thermal_cooling_device_total_trans_show(struct device *dev, } static ssize_t -thermal_cooling_device_time_in_state_show(struct device *dev, - struct device_attribute *attr, - char *buf) +time_in_state_ms_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); struct cooling_dev_stats *stats = cdev->stats; @@ -830,9 +820,8 @@ thermal_cooling_device_time_in_state_show(struct device *dev, } static ssize_t -thermal_cooling_device_reset_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +reset_store(struct device *dev, struct device_attribute *attr, const char *buf, + size_t count) { struct thermal_cooling_device *cdev = to_cooling_device(dev); struct cooling_dev_stats *stats = cdev->stats; @@ -853,10 +842,8 @@ thermal_cooling_device_reset_store(struct device *dev, return count; } -static ssize_t -thermal_cooling_device_trans_table_show(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t trans_table_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); struct cooling_dev_stats *stats = cdev->stats; @@ -899,13 +886,10 @@ thermal_cooling_device_trans_table_show(struct device *dev, return len; } -static DEVICE_ATTR(total_trans, 0444, thermal_cooling_device_total_trans_show, - NULL); -static DEVICE_ATTR(time_in_state_ms, 0444, - thermal_cooling_device_time_in_state_show, NULL); -static DEVICE_ATTR(reset, 0200, NULL, thermal_cooling_device_reset_store); -static DEVICE_ATTR(trans_table, 0444, - thermal_cooling_device_trans_table_show, NULL); +static DEVICE_ATTR(total_trans, 0444, total_trans_show, NULL); +static DEVICE_ATTR(time_in_state_ms, 0444, time_in_state_ms_show, NULL); +static DEVICE_ATTR(reset, 0200, NULL, reset_store); +static DEVICE_ATTR(trans_table, 0444, trans_table_show, NULL); static struct attribute *cooling_device_stats_attrs[] = { &dev_attr_total_trans.attr, @@ -980,8 +964,7 @@ void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev) /* these helper will be used only at the time of bindig */ ssize_t -thermal_cooling_device_trip_point_show(struct device *dev, - struct device_attribute *attr, char *buf) +trip_point_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_instance *instance; @@ -995,8 +978,7 @@ thermal_cooling_device_trip_point_show(struct device *dev, } ssize_t -thermal_cooling_device_weight_show(struct device *dev, - struct device_attribute *attr, char *buf) +weight_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_instance *instance; @@ -1005,10 +987,8 @@ thermal_cooling_device_weight_show(struct device *dev, return sprintf(buf, "%d\n", instance->weight); } -ssize_t -thermal_cooling_device_weight_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +ssize_t weight_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct thermal_instance *instance; int ret, weight; -- cgit v1.2.3 From e76a4386b2f57e187d617bef947feda9e84d422f Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 3 Apr 2018 15:19:04 +0530 Subject: thermal: Use DEVICE_ATTR_{RO|RW|WO}() variants Use the DEVICE_ATTR_{RO|RW|WO}() variants instead of DEVICE_ATTR(). Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui --- drivers/thermal/thermal_sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index ba1df6953da6..721726565fef 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -381,7 +381,7 @@ sustainable_power_store(struct device *dev, struct device_attribute *devattr, \ return count; \ } \ - static DEVICE_ATTR(name, S_IWUSR | S_IRUGO, name##_show, name##_store) + static DEVICE_ATTR_RW(name) create_s32_tzp_attr(k_po); create_s32_tzp_attr(k_pu); @@ -724,8 +724,8 @@ cur_state_store(struct device *dev, struct device_attribute *attr, static struct device_attribute dev_attr_cdev_type = __ATTR(type, 0444, cdev_type_show, NULL); -static DEVICE_ATTR(max_state, 0444, max_state_show, NULL); -static DEVICE_ATTR(cur_state, 0644, cur_state_show, cur_state_store); +static DEVICE_ATTR_RO(max_state); +static DEVICE_ATTR_RW(cur_state); static struct attribute *cooling_device_attrs[] = { &dev_attr_cdev_type.attr, @@ -886,10 +886,10 @@ static ssize_t trans_table_show(struct device *dev, return len; } -static DEVICE_ATTR(total_trans, 0444, total_trans_show, NULL); -static DEVICE_ATTR(time_in_state_ms, 0444, time_in_state_ms_show, NULL); -static DEVICE_ATTR(reset, 0200, NULL, reset_store); -static DEVICE_ATTR(trans_table, 0444, trans_table_show, NULL); +static DEVICE_ATTR_RO(total_trans); +static DEVICE_ATTR_RO(time_in_state_ms); +static DEVICE_ATTR_WO(reset); +static DEVICE_ATTR_RO(trans_table); static struct attribute *cooling_device_stats_attrs[] = { &dev_attr_total_trans.attr, -- cgit v1.2.3 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(-) 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 7e3c03817feccdf2b26722993825dc09377908b4 Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Mon, 7 May 2018 11:52:29 -0600 Subject: drivers: thermal: Update license to SPDX format Update licences format for core thermal files. Signed-off-by: Lina Iyer Acked-by: Daniel Lezcano Signed-off-by: Zhang Rui --- drivers/thermal/of-thermal.c | 19 +------------------ drivers/thermal/thermal_core.c | 5 +---- drivers/thermal/thermal_core.h | 17 +---------------- drivers/thermal/thermal_helpers.c | 5 +---- drivers/thermal/thermal_hwmon.c | 17 +---------------- drivers/thermal/thermal_hwmon.h | 17 +---------------- drivers/thermal/thermal_sysfs.c | 5 +---- include/linux/thermal.h | 17 +---------------- 8 files changed, 8 insertions(+), 94 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index e09f0354a4bc..eea2fce82bf7 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -1,26 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * of-thermal.c - Generic Thermal Management device tree support. * * Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Eduardo Valentin - * - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include #include diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 649fd2a04823..6ab982309e6a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1,13 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * thermal.c - Generic Thermal Management Sysfs support. * * Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Zhang Rui * Copyright (C) 2008 Sujith Thomas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index eddee27c1d06..0df190ed82a7 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -1,24 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * thermal_core.h * * Copyright (C) 2012 Intel Corp * Author: Durgadoss R - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #ifndef __THERMAL_CORE_H__ diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c index eb03d7e099bb..2ba756af76b7 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * thermal_helpers.c - helper functions to handle thermal devices * @@ -7,10 +8,6 @@ * Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Zhang Rui * Copyright (C) 2008 Sujith Thomas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c index c4a508a124dc..11278836ed12 100644 --- a/drivers/thermal/thermal_hwmon.c +++ b/drivers/thermal/thermal_hwmon.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * thermal_hwmon.c - Generic Thermal Management hwmon support. * @@ -8,22 +9,6 @@ * * Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Eduardo Valentin - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include #include diff --git a/drivers/thermal/thermal_hwmon.h b/drivers/thermal/thermal_hwmon.h index c798fdb2ae43..019f6f88224e 100644 --- a/drivers/thermal/thermal_hwmon.h +++ b/drivers/thermal/thermal_hwmon.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * thermal_hwmon.h - Generic Thermal Management hwmon support. * @@ -8,22 +9,6 @@ * * Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Eduardo Valentin - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #ifndef __THERMAL_HWMON_H__ #define __THERMAL_HWMON_H__ diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 721726565fef..2241ceae7d7f 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * thermal.c - sysfs interface of thermal devices * @@ -7,10 +8,6 @@ * Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Zhang Rui * Copyright (C) 2008 Sujith Thomas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 7834be668d80..5f4705f46c2f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -1,25 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * thermal.h ($Revision: 0 $) * * Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Zhang Rui * Copyright (C) 2008 Sujith Thomas - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #ifndef __THERMAL_H__ -- 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(+) 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