Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal fixes from Eduardo Valentin:
"Specifics in this pull request:

- Fixes in mediatek and OF thermal drivers

- Fixes in power_allocator governor

- More fixes of unsigned to int type change in thermal_core.c.

These change have been CI tested using KernelCI bot. \o/"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
thermal: fix Mediatek thermal controller build
thermal: consistently use int for trip temp
thermal: fix mtk_thermal build dependency
thermal: minor mtk_thermal.c cleanups
thermal: power_allocator: req_range multiplication should be a 64 bit type
thermal: of: add __init attribute

+12 -11
+2
drivers/thermal/Kconfig
··· 376 376 tristate "Temperature sensor driver for mediatek SoCs" 377 377 depends on ARCH_MEDIATEK || COMPILE_TEST 378 378 depends on HAS_IOMEM 379 + depends on NVMEM || NVMEM=n 380 + depends on RESET_CONTROLLER 379 381 default y 380 382 help 381 383 Enable this option if you want to have support for thermal management
+1 -2
drivers/thermal/mtk_thermal.c
··· 27 27 #include <linux/thermal.h> 28 28 #include <linux/reset.h> 29 29 #include <linux/types.h> 30 - #include <linux/nvmem-consumer.h> 31 30 32 31 /* AUXADC Registers */ 33 32 #define AUXADC_CON0_V 0x000 ··· 618 619 619 620 module_platform_driver(mtk_thermal_driver); 620 621 621 - MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de"); 622 + MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); 622 623 MODULE_AUTHOR("Hanyi Wu <hanyi.wu@mediatek.com>"); 623 624 MODULE_DESCRIPTION("Mediatek thermal driver"); 624 625 MODULE_LICENSE("GPL v2");
+2 -2
drivers/thermal/of-thermal.c
··· 803 803 * otherwise, it returns a corresponding ERR_PTR(). Caller must 804 804 * check the return value with help of IS_ERR() helper. 805 805 */ 806 - static struct __thermal_zone * 807 - thermal_of_build_thermal_zone(struct device_node *np) 806 + static struct __thermal_zone 807 + __init *thermal_of_build_thermal_zone(struct device_node *np) 808 808 { 809 809 struct device_node *child = NULL, *gchild; 810 810 struct __thermal_zone *tz;
+1 -1
drivers/thermal/power_allocator.c
··· 301 301 capped_extra_power = 0; 302 302 extra_power = 0; 303 303 for (i = 0; i < num_actors; i++) { 304 - u64 req_range = req_power[i] * power_range; 304 + u64 req_range = (u64)req_power[i] * power_range; 305 305 306 306 granted_power[i] = DIV_ROUND_CLOSEST_ULL(req_range, 307 307 total_req_power);
+4 -4
drivers/thermal/thermal_core.c
··· 688 688 { 689 689 struct thermal_zone_device *tz = to_thermal_zone(dev); 690 690 int trip, ret; 691 - unsigned long temperature; 691 + int temperature; 692 692 693 693 if (!tz->ops->set_trip_temp) 694 694 return -EPERM; ··· 696 696 if (!sscanf(attr->attr.name, "trip_point_%d_temp", &trip)) 697 697 return -EINVAL; 698 698 699 - if (kstrtoul(buf, 10, &temperature)) 699 + if (kstrtoint(buf, 10, &temperature)) 700 700 return -EINVAL; 701 701 702 702 ret = tz->ops->set_trip_temp(tz, trip, temperature); ··· 899 899 { 900 900 struct thermal_zone_device *tz = to_thermal_zone(dev); 901 901 int ret = 0; 902 - unsigned long temperature; 902 + int temperature; 903 903 904 - if (kstrtoul(buf, 10, &temperature)) 904 + if (kstrtoint(buf, 10, &temperature)) 905 905 return -EINVAL; 906 906 907 907 if (!tz->ops->set_emul_temp) {
+2 -2
include/linux/thermal.h
··· 352 352 353 353 struct thermal_trip { 354 354 struct device_node *np; 355 - unsigned long int temperature; 356 - unsigned long int hysteresis; 355 + int temperature; 356 + int hysteresis; 357 357 enum thermal_trip_type type; 358 358 }; 359 359