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

thermal: intel: Select INT340X_THERMAL from INTEL_SOC_DTS_THERMAL

The IRQ used by the Intel SoC DTS thermal device for critical
overheating notification is listed in _CRS of device INT3401 which
therefore needs to be enumerated for Intel SoC DTS thermal to work.

The enumeration happens by binding the int3401_thermal driver to the
INT3401 platform device. Thus CONFIG_INT340X_THERMAL is in fact
necessary for enumerating it, so checking CONFIG_INTEL_SOC_DTS_THERMAL
in int340x_thermal_handler_attach() is pointless and INT340X_THERMAL
may as well be selected by INTEL_SOC_DTS_THERMAL.

Signed-off-by: Slawomir Rosek <srosek@google.com>
[ rjw: New subject ]
Link: https://patch.msgid.link/20251103162516.2606158-2-srosek@google.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Slawomir Rosek and committed by
Rafael J. Wysocki
13a96342 6146a0f1

+3 -7
+1 -6
drivers/acpi/dptf/int340x_thermal.c
··· 11 11 12 12 #include "../internal.h" 13 13 14 - #define INT3401_DEVICE 0X01 15 14 static const struct acpi_device_id int340x_thermal_device_ids[] = { 16 15 {"INT3400"}, 17 - {"INT3401", INT3401_DEVICE}, 16 + {"INT3401"}, 18 17 {"INT3402"}, 19 18 {"INT3403"}, 20 19 {"INT3404"}, ··· 74 75 const struct acpi_device_id *id) 75 76 { 76 77 if (IS_ENABLED(CONFIG_INT340X_THERMAL)) 77 - acpi_create_platform_device(adev, NULL); 78 - /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */ 79 - else if (IS_ENABLED(CONFIG_INTEL_SOC_DTS_THERMAL) && 80 - id->driver_data == INT3401_DEVICE) 81 78 acpi_create_platform_device(adev, NULL); 82 79 return 1; 83 80 }
+2 -1
drivers/thermal/intel/Kconfig
··· 44 44 45 45 config INTEL_SOC_DTS_THERMAL 46 46 tristate "Intel SoCs DTS thermal driver" 47 - depends on X86 && PCI && ACPI 47 + depends on X86_64 && PCI && ACPI && NET 48 + select INT340X_THERMAL 48 49 select INTEL_SOC_DTS_IOSF_CORE 49 50 help 50 51 Enable this to register Intel SoCs (e.g. Bay Trail) platform digital