linux/drivers/thermal
Sumeet Pawnikar 82b1ec794d thermal: core: Increase maximum number of trip points
On one of the Chrome system, if we define more than 12 trip points,
probe for thermal sensor fails with
"int3403 thermal: probe of INTC1046:03 failed with error -22"
and throws an error as
"thermal_sys: Error: Incorrect number of thermal trips".

The thermal_zone_device_register() interface needs maximum
number of trip points supported in a zone as an argument.
This number can't exceed THERMAL_MAX_TRIPS, which is currently
set to 12. To address this issue, THERMAL_MAX_TRIPS value
has to be increased.

This interface also has an argument to specify a mask of trips
which are writable. This mask is defined as an int.
This mask sets the ceiling for increasing maximum number of
supported trips. With the current implementation, maximum number
of trips can be supported is 31.

Also, THERMAL_MAX_TRIPS macro is used in one place only.
So, remove THERMAL_MAX_TRIPS macro and compare num_trips
directly with using a macro BITS_PER_TYPE(int)-1.

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-09-30 19:50:10 +02:00
..
broadcom thermal/drivers/broadcom: Switch to new of API 2022-08-17 14:09:38 +02:00
intel thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P 2022-08-03 19:11:38 +02:00
qcom thermal/drivers/qcom/spmi-adc-tm5: Remove unnecessary print function dev_err() 2022-08-17 14:09:39 +02:00
samsung thermal/drivers/samsung: Switch to new of thermal API 2022-08-17 14:09:39 +02:00
st thermal/drivers/st: Switch to new of API 2022-08-17 14:09:38 +02:00
tegra thermal/drivers/tegra: Switch to new of API 2022-08-17 14:09:38 +02:00
ti-soc-thermal thermal/drivers/ti-soc: Switch to new of API 2022-08-17 14:09:38 +02:00
amlogic_thermal.c thermal/drivers/amlogic: Switch to new of API 2022-08-17 14:09:38 +02:00
armada_thermal.c thermal/drivers/armada: Switch to new of API 2022-08-17 14:09:38 +02:00
cpufreq_cooling.c Thermal control updates for 5.20-rc1 2022-08-02 11:27:53 -07:00
cpuidle_cooling.c thermal/drivers/cpuidle_cooling: Fix use after error 2021-04-15 13:21:26 +02:00
da9062-thermal.c thermal/core: Remove ms based delay fields 2021-01-19 22:23:49 +01:00
db8500_thermal.c thermal/drivers/db8500: Switch to new of API 2022-08-17 14:09:38 +02:00
devfreq_cooling.c Thermal control updates for 5.20-rc1 2022-08-02 11:27:53 -07:00
dove_thermal.c thermal: Explicitly enable non-changing thermal zone devices 2020-06-29 20:26:37 +02:00
gov_bang_bang.c thermal/core: Move the thermal zone lock out of the governors 2022-08-17 14:09:39 +02:00
gov_fair_share.c thermal/core: Move the thermal zone lock out of the governors 2022-08-17 14:09:39 +02:00
gov_power_allocator.c thermal/core: Move the thermal zone lock out of the governors 2022-08-17 14:09:39 +02:00
gov_step_wise.c thermal/core: Move the thermal zone lock out of the governors 2022-08-17 14:09:39 +02:00
gov_user_space.c thermal: gov_user_space: Do not lock thermal zone mutex 2022-08-30 20:18:47 +02:00
hisi_thermal.c thermal/drivers/hisilicon: Switch to new of API 2022-08-17 14:09:38 +02:00
imx8mm_thermal.c thermal/drivers/imx: Switch to new of API 2022-08-17 14:09:38 +02:00
imx_sc_thermal.c thermal/drivers/imx: Switch to new of API 2022-08-17 14:09:38 +02:00
imx_thermal.c thermal/drivers/imx: Implement runtime PM support 2021-11-30 15:42:28 +01:00
k3_bandgap.c thermal/drivers/banggap: Switch to new of API 2022-08-17 14:09:38 +02:00
k3_j72xx_bandgap.c thermal/drivers/banggap: Switch to new of API 2022-08-17 14:09:38 +02:00
Kconfig thermal: Drop obsolete dependency on COMPILE_TEST 2022-08-03 19:15:31 +02:00
khadas_mcu_fan.c thermal/core: Make cooling device state change private 2021-01-19 22:31:10 +01:00
kirkwood_thermal.c thermal: Explicitly enable non-changing thermal zone devices 2020-06-29 20:26:37 +02:00
Makefile thermal: k3_j72xx_bandgap: Add the bandgap driver support 2022-05-19 12:11:53 +02:00
max77620_thermal.c thermal/drivers/maxim: Switch to new of API 2022-08-17 14:09:38 +02:00
mtk_thermal.c thermal/drivers/mtk: Switch to new of API 2022-08-17 14:09:38 +02:00
qoriq_thermal.c thermal/drivers/qoriq: Switch to new of API 2022-08-17 14:09:38 +02:00
rcar_gen3_thermal.c thermal/drivers/rcar: Switch to new of API 2022-08-17 14:09:38 +02:00
rcar_thermal.c thermal/drivers/rcar: Switch to new of API 2022-08-17 14:09:38 +02:00
rockchip_thermal.c thermal/drivers/rockchip: Switch to new of API 2022-08-17 14:09:37 +02:00
rzg2l_thermal.c thermal/drivers/rzg2l: Switch to new of API 2022-08-17 14:09:38 +02:00
spear_thermal.c thermal: Explicitly enable non-changing thermal zone devices 2020-06-29 20:26:37 +02:00
sprd_thermal.c thermal/drivers/sprd: Switch to new of API 2022-08-17 14:09:38 +02:00
sun8i_thermal.c thermal/drivers/sun8i: Switch to new of API 2022-08-17 14:09:38 +02:00
thermal_core.c thermal: core: Increase maximum number of trip points 2022-09-30 19:50:10 +02:00
thermal_core.h thermal/core: Move the mutex inside the thermal_zone_device_update() function 2022-08-17 14:09:39 +02:00
thermal_helpers.c thermal/core: Move the mutex inside the thermal_zone_device_update() function 2022-08-17 14:09:39 +02:00
thermal_hwmon.c thermal: move from strlcpy() with unused retval to strscpy() 2022-08-31 21:13:35 +02:00
thermal_hwmon.h thermal_hwmon: Add devres wrapper for thermal_add_hwmon_sysfs() 2020-01-27 10:24:32 +01:00
thermal_mmio.c thermal/drivers/mmio: Switch to new of API 2022-08-17 14:09:37 +02:00
thermal_netlink.c thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
thermal_netlink.h thermal: netlink: Fix parameter type of thermal_genl_cpu_capability_event() stub 2022-02-07 20:45:42 +01:00
thermal_of.c thermal/of: Remove old OF code 2022-08-17 14:09:39 +02:00
thermal_sysfs.c thermal/core: Move the mutex inside the thermal_zone_device_update() function 2022-08-17 14:09:39 +02:00
thermal-generic-adc.c thermal/drivers/generic-adc: Switch to new of API 2022-08-17 14:09:37 +02:00
uniphier_thermal.c thermal/drivers/uniphier: Switch to new of API 2022-08-17 14:09:37 +02:00