Thermal: int340x_thermal: expose acpi thermal relationship tables

ACPI 4.0 introduced two thermal relationship tables via _ART
(active cooling) and  _TRT (passive cooling) objects. These
tables contain many to many relationships among thermal sensors
and cooling devices.

This patch parses _ART and _TRT and makes the result available to
the userspace via an misc device interface. At the same time,
kernel drivers can also request parsing results from internal
kernel APIs.

The results include source and target devices, influence, and
sampling rate in case of _TRT. For _ART, the result shows source
device, target device, and weight percentage.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 6f93e5c..3a89292 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -223,6 +223,7 @@
 	tristate "ACPI INT340X thermal drivers"
 	depends on X86 && ACPI
 	select THERMAL_GOV_USER_SPACE
+	select ACPI_THERMAL_REL
 	help
 	  Newer laptops and tablets that use ACPI may have thermal sensors and
 	  other devices with thermal control capabilities outside the core
@@ -237,6 +238,10 @@
 	  information to allow the user to select his laptop to run without
 	  turning on the fans.
 
+config ACPI_THERMAL_REL
+	tristate
+	depends on ACPI
+
 menu "Texas Instruments thermal drivers"
 source "drivers/thermal/ti-soc-thermal/Kconfig"
 endmenu