diff options
| author | Zhang Rui <rui.zhang@intel.com> | 2018-12-07 03:49:50 -0500 |
|---|---|---|
| committer | Zhang Rui <rui.zhang@intel.com> | 2018-12-07 03:49:50 -0500 |
| commit | eaaa598c0a285ef3b0efa54e711a385269fe50ce (patch) | |
| tree | 6e33bb0f35d84eae9fc0cc8b88dae1570231eafe /drivers | |
| parent | 68000a0d983f539c95ebe5dccd4f29535c7ac0af (diff) | |
| parent | 72e9baf997286610a2a3109e79fdb528590c5523 (diff) | |
Merge branches 'for-rc' and 'thermal-core' into next
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thermal/Kconfig | 94 | ||||
| -rw-r--r-- | drivers/thermal/Makefile | 10 | ||||
| -rw-r--r-- | drivers/thermal/intel/Kconfig | 77 | ||||
| -rw-r--r-- | drivers/thermal/intel/Makefile | 12 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/Kconfig (renamed from drivers/thermal/int340x_thermal/Kconfig) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/Makefile (renamed from drivers/thermal/int340x_thermal/Makefile) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c (renamed from drivers/thermal/int340x_thermal/acpi_thermal_rel.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.h (renamed from drivers/thermal/int340x_thermal/acpi_thermal_rel.h) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3400_thermal.c (renamed from drivers/thermal/int340x_thermal/int3400_thermal.c) | 9 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3402_thermal.c (renamed from drivers/thermal/int340x_thermal/int3402_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3403_thermal.c (renamed from drivers/thermal/int340x_thermal/int3403_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3406_thermal.c (renamed from drivers/thermal/int340x_thermal/int3406_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c (renamed from drivers/thermal/int340x_thermal/int340x_thermal_zone.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h (renamed from drivers/thermal/int340x_thermal/int340x_thermal_zone.h) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/processor_thermal_device.c (renamed from drivers/thermal/int340x_thermal/processor_thermal_device.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_bxt_pmic_thermal.c (renamed from drivers/thermal/intel_bxt_pmic_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_pch_thermal.c (renamed from drivers/thermal/intel_pch_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_powerclamp.c (renamed from drivers/thermal/intel_powerclamp.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_quark_dts_thermal.c (renamed from drivers/thermal/intel_quark_dts_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_soc_dts_iosf.c (renamed from drivers/thermal/intel_soc_dts_iosf.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_soc_dts_iosf.h (renamed from drivers/thermal/intel_soc_dts_iosf.h) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_soc_dts_thermal.c (renamed from drivers/thermal/intel_soc_dts_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/intel/x86_pkg_temp_thermal.c (renamed from drivers/thermal/x86_pkg_temp_thermal.c) | 0 | ||||
| -rw-r--r-- | drivers/thermal/qcom/Kconfig | 11 | ||||
| -rw-r--r-- | drivers/thermal/qcom/Makefile | 1 | ||||
| -rw-r--r-- | drivers/thermal/qcom/qcom-spmi-temp-alarm.c (renamed from drivers/thermal/qcom-spmi-temp-alarm.c) | 2 | ||||
| -rw-r--r-- | drivers/thermal/rockchip_thermal.c | 8 | ||||
| -rw-r--r-- | drivers/thermal/spear_thermal.c | 8 | ||||
| -rw-r--r-- | drivers/thermal/st/st_thermal.c | 6 | ||||
| -rw-r--r-- | drivers/thermal/zx2967_thermal.c | 6 |
30 files changed, 121 insertions, 123 deletions
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 5422523c03f8..344f6459862b 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig | |||
| @@ -326,84 +326,6 @@ config DA9062_THERMAL | |||
| 326 | zone. | 326 | zone. |
| 327 | Compatible with the DA9062 and DA9061 PMICs. | 327 | Compatible with the DA9062 and DA9061 PMICs. |
| 328 | 328 | ||
| 329 | config INTEL_POWERCLAMP | ||
| 330 | tristate "Intel PowerClamp idle injection driver" | ||
| 331 | depends on THERMAL | ||
| 332 | depends on X86 | ||
| 333 | depends on CPU_SUP_INTEL | ||
| 334 | help | ||
| 335 | Enable this to enable Intel PowerClamp idle injection driver. This | ||
| 336 | enforce idle time which results in more package C-state residency. The | ||
| 337 | user interface is exposed via generic thermal framework. | ||
| 338 | |||
| 339 | config X86_PKG_TEMP_THERMAL | ||
| 340 | tristate "X86 package temperature thermal driver" | ||
| 341 | depends on X86_THERMAL_VECTOR | ||
| 342 | select THERMAL_GOV_USER_SPACE | ||
| 343 | select THERMAL_WRITABLE_TRIPS | ||
| 344 | default m | ||
| 345 | help | ||
| 346 | Enable this to register CPU digital sensor for package temperature as | ||
| 347 | thermal zone. Each package will have its own thermal zone. There are | ||
| 348 | two trip points which can be set by user to get notifications via thermal | ||
| 349 | notification methods. | ||
| 350 | |||
| 351 | config INTEL_SOC_DTS_IOSF_CORE | ||
| 352 | tristate | ||
| 353 | depends on X86 && PCI | ||
| 354 | select IOSF_MBI | ||
| 355 | help | ||
| 356 | This is becoming a common feature for Intel SoCs to expose the additional | ||
| 357 | digital temperature sensors (DTSs) using side band interface (IOSF). This | ||
| 358 | implements the common set of helper functions to register, get temperature | ||
| 359 | and get/set thresholds on DTSs. | ||
| 360 | |||
| 361 | config INTEL_SOC_DTS_THERMAL | ||
| 362 | tristate "Intel SoCs DTS thermal driver" | ||
| 363 | depends on X86 && PCI && ACPI | ||
| 364 | select INTEL_SOC_DTS_IOSF_CORE | ||
| 365 | select THERMAL_WRITABLE_TRIPS | ||
| 366 | help | ||
| 367 | Enable this to register Intel SoCs (e.g. Bay Trail) platform digital | ||
| 368 | temperature sensor (DTS). These SoCs have two additional DTSs in | ||
| 369 | addition to DTSs on CPU cores. Each DTS will be registered as a | ||
| 370 | thermal zone. There are two trip points. One of the trip point can | ||
| 371 | be set by user mode programs to get notifications via Linux thermal | ||
| 372 | notification methods.The other trip is a critical trip point, which | ||
| 373 | was set by the driver based on the TJ MAX temperature. | ||
| 374 | |||
| 375 | config INTEL_QUARK_DTS_THERMAL | ||
| 376 | tristate "Intel Quark DTS thermal driver" | ||
| 377 | depends on X86_INTEL_QUARK | ||
| 378 | help | ||
| 379 | Enable this to register Intel Quark SoC (e.g. X1000) platform digital | ||
| 380 | temperature sensor (DTS). For X1000 SoC, it has one on-die DTS. | ||
| 381 | The DTS will be registered as a thermal zone. There are two trip points: | ||
| 382 | hot & critical. The critical trip point default value is set by | ||
| 383 | underlying BIOS/Firmware. | ||
| 384 | |||
| 385 | menu "ACPI INT340X thermal drivers" | ||
| 386 | source drivers/thermal/int340x_thermal/Kconfig | ||
| 387 | endmenu | ||
| 388 | |||
| 389 | config INTEL_BXT_PMIC_THERMAL | ||
| 390 | tristate "Intel Broxton PMIC thermal driver" | ||
| 391 | depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP | ||
| 392 | help | ||
| 393 | Select this driver for Intel Broxton PMIC with ADC channels monitoring | ||
| 394 | system temperature measurements and alerts. | ||
| 395 | This driver is used for monitoring the ADC channels of PMIC and handles | ||
| 396 | the alert trip point interrupts and notifies the thermal framework with | ||
| 397 | the trip point and temperature details of the zone. | ||
| 398 | |||
| 399 | config INTEL_PCH_THERMAL | ||
| 400 | tristate "Intel PCH Thermal Reporting Driver" | ||
| 401 | depends on X86 && PCI | ||
| 402 | help | ||
| 403 | Enable this to support thermal reporting on certain intel PCHs. | ||
| 404 | Thermal reporting device will provide temperature reading, | ||
| 405 | programmable trip points and other information. | ||
| 406 | |||
| 407 | config MTK_THERMAL | 329 | config MTK_THERMAL |
| 408 | tristate "Temperature sensor driver for mediatek SoCs" | 330 | tristate "Temperature sensor driver for mediatek SoCs" |
| 409 | depends on ARCH_MEDIATEK || COMPILE_TEST | 331 | depends on ARCH_MEDIATEK || COMPILE_TEST |
| @@ -415,6 +337,11 @@ config MTK_THERMAL | |||
| 415 | Enable this option if you want to have support for thermal management | 337 | Enable this option if you want to have support for thermal management |
| 416 | controller present in Mediatek SoCs | 338 | controller present in Mediatek SoCs |
| 417 | 339 | ||
| 340 | menu "Intel thermal drivers" | ||
| 341 | depends on X86 || X86_INTEL_QUARK || COMPILE_TEST | ||
| 342 | source "drivers/thermal/intel/Kconfig" | ||
| 343 | endmenu | ||
| 344 | |||
| 418 | menu "Broadcom thermal drivers" | 345 | menu "Broadcom thermal drivers" |
| 419 | depends on ARCH_BCM || ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST | 346 | depends on ARCH_BCM || ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST |
| 420 | source "drivers/thermal/broadcom/Kconfig" | 347 | source "drivers/thermal/broadcom/Kconfig" |
| @@ -447,17 +374,6 @@ config TANGO_THERMAL | |||
| 447 | 374 | ||
| 448 | source "drivers/thermal/tegra/Kconfig" | 375 | source "drivers/thermal/tegra/Kconfig" |
| 449 | 376 | ||
| 450 | config QCOM_SPMI_TEMP_ALARM | ||
| 451 | tristate "Qualcomm SPMI PMIC Temperature Alarm" | ||
| 452 | depends on OF && SPMI && IIO | ||
| 453 | select REGMAP_SPMI | ||
| 454 | help | ||
| 455 | This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP) | ||
| 456 | PMIC devices. It shows up in sysfs as a thermal sensor with multiple | ||
| 457 | trip points. The temperature reported by the thermal sensor reflects the | ||
| 458 | real time die temperature if an ADC is present or an estimate of the | ||
| 459 | temperature based upon the over temperature stage value. | ||
| 460 | |||
| 461 | config GENERIC_ADC_THERMAL | 377 | config GENERIC_ADC_THERMAL |
| 462 | tristate "Generic ADC based thermal sensor" | 378 | tristate "Generic ADC based thermal sensor" |
| 463 | depends on IIO | 379 | depends on IIO |
diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index 82bb50dc6423..486d682be047 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile | |||
| @@ -29,7 +29,6 @@ thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o | |||
| 29 | 29 | ||
| 30 | # platform thermal drivers | 30 | # platform thermal drivers |
| 31 | obj-y += broadcom/ | 31 | obj-y += broadcom/ |
| 32 | obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o | ||
| 33 | obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o | 32 | obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o |
| 34 | obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o | 33 | obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o |
| 35 | obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o | 34 | obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o |
| @@ -44,15 +43,8 @@ obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o | |||
| 44 | obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o | 43 | obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o |
| 45 | obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o | 44 | obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o |
| 46 | obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o | 45 | obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o |
| 47 | obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o | 46 | obj-y += intel/ |
| 48 | obj-$(CONFIG_X86_PKG_TEMP_THERMAL) += x86_pkg_temp_thermal.o | ||
| 49 | obj-$(CONFIG_INTEL_SOC_DTS_IOSF_CORE) += intel_soc_dts_iosf.o | ||
| 50 | obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o | ||
| 51 | obj-$(CONFIG_INTEL_QUARK_DTS_THERMAL) += intel_quark_dts_thermal.o | ||
| 52 | obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ | 47 | obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ |
| 53 | obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/ | ||
| 54 | obj-$(CONFIG_INTEL_BXT_PMIC_THERMAL) += intel_bxt_pmic_thermal.o | ||
| 55 | obj-$(CONFIG_INTEL_PCH_THERMAL) += intel_pch_thermal.o | ||
| 56 | obj-y += st/ | 48 | obj-y += st/ |
| 57 | obj-$(CONFIG_QCOM_TSENS) += qcom/ | 49 | obj-$(CONFIG_QCOM_TSENS) += qcom/ |
| 58 | obj-y += tegra/ | 50 | obj-y += tegra/ |
diff --git a/drivers/thermal/intel/Kconfig b/drivers/thermal/intel/Kconfig new file mode 100644 index 000000000000..9c06d4ad7c97 --- /dev/null +++ b/drivers/thermal/intel/Kconfig | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | config INTEL_POWERCLAMP | ||
| 2 | tristate "Intel PowerClamp idle injection driver" | ||
| 3 | depends on THERMAL | ||
| 4 | depends on X86 | ||
| 5 | depends on CPU_SUP_INTEL | ||
| 6 | help | ||
| 7 | Enable this to enable Intel PowerClamp idle injection driver. This | ||
| 8 | enforce idle time which results in more package C-state residency. The | ||
| 9 | user interface is exposed via generic thermal framework. | ||
| 10 | |||
| 11 | config X86_PKG_TEMP_THERMAL | ||
| 12 | tristate "X86 package temperature thermal driver" | ||
| 13 | depends on X86_THERMAL_VECTOR | ||
| 14 | select THERMAL_GOV_USER_SPACE | ||
| 15 | select THERMAL_WRITABLE_TRIPS | ||
| 16 | default m | ||
| 17 | help | ||
| 18 | Enable this to register CPU digital sensor for package temperature as | ||
| 19 | thermal zone. Each package will have its own thermal zone. There are | ||
| 20 | two trip points which can be set by user to get notifications via thermal | ||
| 21 | notification methods. | ||
| 22 | |||
| 23 | config INTEL_SOC_DTS_IOSF_CORE | ||
| 24 | tristate | ||
| 25 | depends on X86 && PCI | ||
| 26 | select IOSF_MBI | ||
| 27 | help | ||
| 28 | This is becoming a common feature for Intel SoCs to expose the additional | ||
| 29 | digital temperature sensors (DTSs) using side band interface (IOSF). This | ||
| 30 | implements the common set of helper functions to register, get temperature | ||
| 31 | and get/set thresholds on DTSs. | ||
| 32 | |||
| 33 | config INTEL_SOC_DTS_THERMAL | ||
| 34 | tristate "Intel SoCs DTS thermal driver" | ||
| 35 | depends on X86 && PCI && ACPI | ||
| 36 | select INTEL_SOC_DTS_IOSF_CORE | ||
| 37 | select THERMAL_WRITABLE_TRIPS | ||
| 38 | help | ||
| 39 | Enable this to register Intel SoCs (e.g. Bay Trail) platform digital | ||
| 40 | temperature sensor (DTS). These SoCs have two additional DTSs in | ||
| 41 | addition to DTSs on CPU cores. Each DTS will be registered as a | ||
| 42 | thermal zone. There are two trip points. One of the trip point can | ||
| 43 | be set by user mode programs to get notifications via Linux thermal | ||
| 44 | notification methods.The other trip is a critical trip point, which | ||
| 45 | was set by the driver based on the TJ MAX temperature. | ||
| 46 | |||
| 47 | config INTEL_QUARK_DTS_THERMAL | ||
| 48 | tristate "Intel Quark DTS thermal driver" | ||
| 49 | depends on X86_INTEL_QUARK | ||
| 50 | help | ||
| 51 | Enable this to register Intel Quark SoC (e.g. X1000) platform digital | ||
| 52 | temperature sensor (DTS). For X1000 SoC, it has one on-die DTS. | ||
| 53 | The DTS will be registered as a thermal zone. There are two trip points: | ||
| 54 | hot & critical. The critical trip point default value is set by | ||
| 55 | underlying BIOS/Firmware. | ||
| 56 | |||
| 57 | menu "ACPI INT340X thermal drivers" | ||
| 58 | source drivers/thermal/intel/int340x_thermal/Kconfig | ||
| 59 | endmenu | ||
| 60 | |||
| 61 | config INTEL_BXT_PMIC_THERMAL | ||
| 62 | tristate "Intel Broxton PMIC thermal driver" | ||
| 63 | depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP | ||
| 64 | help | ||
| 65 | Select this driver for Intel Broxton PMIC with ADC channels monitoring | ||
| 66 | system temperature measurements and alerts. | ||
| 67 | This driver is used for monitoring the ADC channels of PMIC and handles | ||
| 68 | the alert trip point interrupts and notifies the thermal framework with | ||
| 69 | the trip point and temperature details of the zone. | ||
| 70 | |||
| 71 | config INTEL_PCH_THERMAL | ||
| 72 | tristate "Intel PCH Thermal Reporting Driver" | ||
| 73 | depends on X86 && PCI | ||
| 74 | help | ||
| 75 | Enable this to support thermal reporting on certain intel PCHs. | ||
| 76 | Thermal reporting device will provide temperature reading, | ||
| 77 | programmable trip points and other information. | ||
diff --git a/drivers/thermal/intel/Makefile b/drivers/thermal/intel/Makefile new file mode 100644 index 000000000000..0d9736ced5d4 --- /dev/null +++ b/drivers/thermal/intel/Makefile | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | ||
| 2 | # | ||
| 3 | # Makefile for various Intel thermal drivers. | ||
| 4 | |||
| 5 | obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o | ||
| 6 | obj-$(CONFIG_X86_PKG_TEMP_THERMAL) += x86_pkg_temp_thermal.o | ||
| 7 | obj-$(CONFIG_INTEL_SOC_DTS_IOSF_CORE) += intel_soc_dts_iosf.o | ||
| 8 | obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o | ||
| 9 | obj-$(CONFIG_INTEL_QUARK_DTS_THERMAL) += intel_quark_dts_thermal.o | ||
| 10 | obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/ | ||
| 11 | obj-$(CONFIG_INTEL_BXT_PMIC_THERMAL) += intel_bxt_pmic_thermal.o | ||
| 12 | obj-$(CONFIG_INTEL_PCH_THERMAL) += intel_pch_thermal.o | ||
diff --git a/drivers/thermal/int340x_thermal/Kconfig b/drivers/thermal/intel/int340x_thermal/Kconfig index 0582bd12a239..0582bd12a239 100644 --- a/drivers/thermal/int340x_thermal/Kconfig +++ b/drivers/thermal/intel/int340x_thermal/Kconfig | |||
diff --git a/drivers/thermal/int340x_thermal/Makefile b/drivers/thermal/intel/int340x_thermal/Makefile index 287eb0a1476d..287eb0a1476d 100644 --- a/drivers/thermal/int340x_thermal/Makefile +++ b/drivers/thermal/intel/int340x_thermal/Makefile | |||
diff --git a/drivers/thermal/int340x_thermal/acpi_thermal_rel.c b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c index 45e7e5cbdffb..45e7e5cbdffb 100644 --- a/drivers/thermal/int340x_thermal/acpi_thermal_rel.c +++ b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c | |||
diff --git a/drivers/thermal/int340x_thermal/acpi_thermal_rel.h b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.h index 58822575fd54..58822575fd54 100644 --- a/drivers/thermal/int340x_thermal/acpi_thermal_rel.h +++ b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.h | |||
diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index e26b01c05e82..61ca7ce3624e 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c | |||
| @@ -48,8 +48,7 @@ static ssize_t available_uuids_show(struct device *dev, | |||
| 48 | struct device_attribute *attr, | 48 | struct device_attribute *attr, |
| 49 | char *buf) | 49 | char *buf) |
| 50 | { | 50 | { |
| 51 | struct platform_device *pdev = to_platform_device(dev); | 51 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 52 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 53 | int i; | 52 | int i; |
| 54 | int length = 0; | 53 | int length = 0; |
| 55 | 54 | ||
| @@ -68,8 +67,7 @@ static ssize_t available_uuids_show(struct device *dev, | |||
| 68 | static ssize_t current_uuid_show(struct device *dev, | 67 | static ssize_t current_uuid_show(struct device *dev, |
| 69 | struct device_attribute *devattr, char *buf) | 68 | struct device_attribute *devattr, char *buf) |
| 70 | { | 69 | { |
| 71 | struct platform_device *pdev = to_platform_device(dev); | 70 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 72 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 73 | 71 | ||
| 74 | if (priv->uuid_bitmap & (1 << priv->current_uuid_index)) | 72 | if (priv->uuid_bitmap & (1 << priv->current_uuid_index)) |
| 75 | return sprintf(buf, "%s\n", | 73 | return sprintf(buf, "%s\n", |
| @@ -82,8 +80,7 @@ static ssize_t current_uuid_store(struct device *dev, | |||
| 82 | struct device_attribute *attr, | 80 | struct device_attribute *attr, |
| 83 | const char *buf, size_t count) | 81 | const char *buf, size_t count) |
| 84 | { | 82 | { |
| 85 | struct platform_device *pdev = to_platform_device(dev); | 83 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 86 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 87 | int i; | 84 | int i; |
| 88 | 85 | ||
| 89 | for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) { | 86 | for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) { |
diff --git a/drivers/thermal/int340x_thermal/int3402_thermal.c b/drivers/thermal/intel/int340x_thermal/int3402_thermal.c index 8e90b3151a42..8e90b3151a42 100644 --- a/drivers/thermal/int340x_thermal/int3402_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3402_thermal.c | |||
diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c index 0c19fcd56a0d..0c19fcd56a0d 100644 --- a/drivers/thermal/int340x_thermal/int3403_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c | |||
diff --git a/drivers/thermal/int340x_thermal/int3406_thermal.c b/drivers/thermal/intel/int340x_thermal/int3406_thermal.c index f69ab026ba24..f69ab026ba24 100644 --- a/drivers/thermal/int340x_thermal/int3406_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3406_thermal.c | |||
diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 9ec27ac1856b..9ec27ac1856b 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | |||
diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.h b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h index 5f3ba4775c5c..5f3ba4775c5c 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.h +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h | |||
diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c index 284cf2c5a8fd..284cf2c5a8fd 100644 --- a/drivers/thermal/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | |||
diff --git a/drivers/thermal/intel_bxt_pmic_thermal.c b/drivers/thermal/intel/intel_bxt_pmic_thermal.c index 94cfd0064c43..94cfd0064c43 100644 --- a/drivers/thermal/intel_bxt_pmic_thermal.c +++ b/drivers/thermal/intel/intel_bxt_pmic_thermal.c | |||
diff --git a/drivers/thermal/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index 8a7f69b4b022..8a7f69b4b022 100644 --- a/drivers/thermal/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c | |||
diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index cde891c54cde..cde891c54cde 100644 --- a/drivers/thermal/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c | |||
diff --git a/drivers/thermal/intel_quark_dts_thermal.c b/drivers/thermal/intel/intel_quark_dts_thermal.c index 5d33b350da1c..5d33b350da1c 100644 --- a/drivers/thermal/intel_quark_dts_thermal.c +++ b/drivers/thermal/intel/intel_quark_dts_thermal.c | |||
diff --git a/drivers/thermal/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index e0813dfaa278..e0813dfaa278 100644 --- a/drivers/thermal/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c | |||
diff --git a/drivers/thermal/intel_soc_dts_iosf.h b/drivers/thermal/intel/intel_soc_dts_iosf.h index 625e37bf93dc..625e37bf93dc 100644 --- a/drivers/thermal/intel_soc_dts_iosf.h +++ b/drivers/thermal/intel/intel_soc_dts_iosf.h | |||
diff --git a/drivers/thermal/intel_soc_dts_thermal.c b/drivers/thermal/intel/intel_soc_dts_thermal.c index d748527d7a38..d748527d7a38 100644 --- a/drivers/thermal/intel_soc_dts_thermal.c +++ b/drivers/thermal/intel/intel_soc_dts_thermal.c | |||
diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c index 1ef937d799e4..1ef937d799e4 100644 --- a/drivers/thermal/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c | |||
diff --git a/drivers/thermal/qcom/Kconfig b/drivers/thermal/qcom/Kconfig index be32e5abce3c..cdb455ffd575 100644 --- a/drivers/thermal/qcom/Kconfig +++ b/drivers/thermal/qcom/Kconfig | |||
| @@ -9,3 +9,14 @@ config QCOM_TSENS | |||
| 9 | thermal zone device via the mode file results in disabling the sensor. | 9 | thermal zone device via the mode file results in disabling the sensor. |
| 10 | Also able to set threshold temperature for both hot and cold and update | 10 | Also able to set threshold temperature for both hot and cold and update |
| 11 | when a threshold is reached. | 11 | when a threshold is reached. |
| 12 | |||
| 13 | config QCOM_SPMI_TEMP_ALARM | ||
| 14 | tristate "Qualcomm SPMI PMIC Temperature Alarm" | ||
| 15 | depends on OF && SPMI && IIO | ||
| 16 | select REGMAP_SPMI | ||
| 17 | help | ||
| 18 | This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP) | ||
| 19 | PMIC devices. It shows up in sysfs as a thermal sensor with multiple | ||
| 20 | trip points. The temperature reported by the thermal sensor reflects the | ||
| 21 | real time die temperature if an ADC is present or an estimate of the | ||
| 22 | temperature based upon the over temperature stage value. | ||
diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile index a821929ede0b..717a08600bb5 100644 --- a/drivers/thermal/qcom/Makefile +++ b/drivers/thermal/qcom/Makefile | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o | 1 | obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o |
| 2 | qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o | 2 | qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o |
| 3 | obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o | ||
diff --git a/drivers/thermal/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c index b2d5d5bf4a9b..c1fd71dbab3e 100644 --- a/drivers/thermal/qcom-spmi-temp-alarm.c +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <linux/regmap.h> | 23 | #include <linux/regmap.h> |
| 24 | #include <linux/thermal.h> | 24 | #include <linux/thermal.h> |
| 25 | 25 | ||
| 26 | #include "thermal_core.h" | 26 | #include "../thermal_core.h" |
| 27 | 27 | ||
| 28 | #define QPNP_TM_REG_TYPE 0x04 | 28 | #define QPNP_TM_REG_TYPE 0x04 |
| 29 | #define QPNP_TM_REG_SUBTYPE 0x05 | 29 | #define QPNP_TM_REG_SUBTYPE 0x05 |
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index f36375d5a16c..9c7643d62ed7 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c | |||
| @@ -1327,8 +1327,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev) | |||
| 1327 | 1327 | ||
| 1328 | static int __maybe_unused rockchip_thermal_suspend(struct device *dev) | 1328 | static int __maybe_unused rockchip_thermal_suspend(struct device *dev) |
| 1329 | { | 1329 | { |
| 1330 | struct platform_device *pdev = to_platform_device(dev); | 1330 | struct rockchip_thermal_data *thermal = dev_get_drvdata(dev); |
| 1331 | struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); | ||
| 1332 | int i; | 1331 | int i; |
| 1333 | 1332 | ||
| 1334 | for (i = 0; i < thermal->chip->chn_num; i++) | 1333 | for (i = 0; i < thermal->chip->chn_num; i++) |
| @@ -1346,8 +1345,7 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev) | |||
| 1346 | 1345 | ||
| 1347 | static int __maybe_unused rockchip_thermal_resume(struct device *dev) | 1346 | static int __maybe_unused rockchip_thermal_resume(struct device *dev) |
| 1348 | { | 1347 | { |
| 1349 | struct platform_device *pdev = to_platform_device(dev); | 1348 | struct rockchip_thermal_data *thermal = dev_get_drvdata(dev); |
| 1350 | struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); | ||
| 1351 | int i; | 1349 | int i; |
| 1352 | int error; | 1350 | int error; |
| 1353 | 1351 | ||
| @@ -1376,7 +1374,7 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev) | |||
| 1376 | id, thermal->regs, | 1374 | id, thermal->regs, |
| 1377 | thermal->tshut_temp); | 1375 | thermal->tshut_temp); |
| 1378 | if (error) | 1376 | if (error) |
| 1379 | dev_err(&pdev->dev, "%s: invalid tshut=%d, error=%d\n", | 1377 | dev_err(dev, "%s: invalid tshut=%d, error=%d\n", |
| 1380 | __func__, thermal->tshut_temp, error); | 1378 | __func__, thermal->tshut_temp, error); |
| 1381 | } | 1379 | } |
| 1382 | 1380 | ||
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c index 81b35aace9de..8b9d567134d0 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c | |||
| @@ -56,8 +56,7 @@ static struct thermal_zone_device_ops ops = { | |||
| 56 | 56 | ||
| 57 | static int __maybe_unused spear_thermal_suspend(struct device *dev) | 57 | static int __maybe_unused spear_thermal_suspend(struct device *dev) |
| 58 | { | 58 | { |
| 59 | struct platform_device *pdev = to_platform_device(dev); | 59 | struct thermal_zone_device *spear_thermal = dev_get_drvdata(dev); |
| 60 | struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); | ||
| 61 | struct spear_thermal_dev *stdev = spear_thermal->devdata; | 60 | struct spear_thermal_dev *stdev = spear_thermal->devdata; |
| 62 | unsigned int actual_mask = 0; | 61 | unsigned int actual_mask = 0; |
| 63 | 62 | ||
| @@ -73,15 +72,14 @@ static int __maybe_unused spear_thermal_suspend(struct device *dev) | |||
| 73 | 72 | ||
| 74 | static int __maybe_unused spear_thermal_resume(struct device *dev) | 73 | static int __maybe_unused spear_thermal_resume(struct device *dev) |
| 75 | { | 74 | { |
| 76 | struct platform_device *pdev = to_platform_device(dev); | 75 | struct thermal_zone_device *spear_thermal = dev_get_drvdata(dev); |
| 77 | struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); | ||
| 78 | struct spear_thermal_dev *stdev = spear_thermal->devdata; | 76 | struct spear_thermal_dev *stdev = spear_thermal->devdata; |
| 79 | unsigned int actual_mask = 0; | 77 | unsigned int actual_mask = 0; |
| 80 | int ret = 0; | 78 | int ret = 0; |
| 81 | 79 | ||
| 82 | ret = clk_enable(stdev->clk); | 80 | ret = clk_enable(stdev->clk); |
| 83 | if (ret) { | 81 | if (ret) { |
| 84 | dev_err(&pdev->dev, "Can't enable clock\n"); | 82 | dev_err(dev, "Can't enable clock\n"); |
| 85 | return ret; | 83 | return ret; |
| 86 | } | 84 | } |
| 87 | 85 | ||
diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c index be637e6b01d2..b2bbdf6eb02b 100644 --- a/drivers/thermal/st/st_thermal.c +++ b/drivers/thermal/st/st_thermal.c | |||
| @@ -277,8 +277,7 @@ EXPORT_SYMBOL_GPL(st_thermal_unregister); | |||
| 277 | #ifdef CONFIG_PM_SLEEP | 277 | #ifdef CONFIG_PM_SLEEP |
| 278 | static int st_thermal_suspend(struct device *dev) | 278 | static int st_thermal_suspend(struct device *dev) |
| 279 | { | 279 | { |
| 280 | struct platform_device *pdev = to_platform_device(dev); | 280 | struct st_thermal_sensor *sensor = dev_get_drvdata(dev); |
| 281 | struct st_thermal_sensor *sensor = platform_get_drvdata(pdev); | ||
| 282 | 281 | ||
| 283 | return st_thermal_sensor_off(sensor); | 282 | return st_thermal_sensor_off(sensor); |
| 284 | } | 283 | } |
| @@ -286,8 +285,7 @@ static int st_thermal_suspend(struct device *dev) | |||
| 286 | static int st_thermal_resume(struct device *dev) | 285 | static int st_thermal_resume(struct device *dev) |
| 287 | { | 286 | { |
| 288 | int ret; | 287 | int ret; |
| 289 | struct platform_device *pdev = to_platform_device(dev); | 288 | struct st_thermal_sensor *sensor = dev_get_drvdata(dev); |
| 290 | struct st_thermal_sensor *sensor = platform_get_drvdata(pdev); | ||
| 291 | 289 | ||
| 292 | ret = st_thermal_sensor_on(sensor); | 290 | ret = st_thermal_sensor_on(sensor); |
| 293 | if (ret) | 291 | if (ret) |
diff --git a/drivers/thermal/zx2967_thermal.c b/drivers/thermal/zx2967_thermal.c index 6acce0bce7c0..145ebf371598 100644 --- a/drivers/thermal/zx2967_thermal.c +++ b/drivers/thermal/zx2967_thermal.c | |||
| @@ -207,8 +207,7 @@ MODULE_DEVICE_TABLE(of, zx2967_thermal_id_table); | |||
| 207 | #ifdef CONFIG_PM_SLEEP | 207 | #ifdef CONFIG_PM_SLEEP |
| 208 | static int zx2967_thermal_suspend(struct device *dev) | 208 | static int zx2967_thermal_suspend(struct device *dev) |
| 209 | { | 209 | { |
| 210 | struct platform_device *pdev = to_platform_device(dev); | 210 | struct zx2967_thermal_priv *priv = dev_get_drvdata(dev); |
| 211 | struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 212 | 211 | ||
| 213 | if (priv && priv->clk_topcrm) | 212 | if (priv && priv->clk_topcrm) |
| 214 | clk_disable_unprepare(priv->clk_topcrm); | 213 | clk_disable_unprepare(priv->clk_topcrm); |
| @@ -221,8 +220,7 @@ static int zx2967_thermal_suspend(struct device *dev) | |||
| 221 | 220 | ||
| 222 | static int zx2967_thermal_resume(struct device *dev) | 221 | static int zx2967_thermal_resume(struct device *dev) |
| 223 | { | 222 | { |
| 224 | struct platform_device *pdev = to_platform_device(dev); | 223 | struct zx2967_thermal_priv *priv = dev_get_drvdata(dev); |
| 225 | struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 226 | int error; | 224 | int error; |
| 227 | 225 | ||
| 228 | error = clk_prepare_enable(priv->clk_topcrm); | 226 | error = clk_prepare_enable(priv->clk_topcrm); |
