Merge branches 'for-rc' and 'thermal-core' into next
This commit is contained in:
@@ -326,84 +326,6 @@ config DA9062_THERMAL
|
|||||||
zone.
|
zone.
|
||||||
Compatible with the DA9062 and DA9061 PMICs.
|
Compatible with the DA9062 and DA9061 PMICs.
|
||||||
|
|
||||||
config INTEL_POWERCLAMP
|
|
||||||
tristate "Intel PowerClamp idle injection driver"
|
|
||||||
depends on THERMAL
|
|
||||||
depends on X86
|
|
||||||
depends on CPU_SUP_INTEL
|
|
||||||
help
|
|
||||||
Enable this to enable Intel PowerClamp idle injection driver. This
|
|
||||||
enforce idle time which results in more package C-state residency. The
|
|
||||||
user interface is exposed via generic thermal framework.
|
|
||||||
|
|
||||||
config X86_PKG_TEMP_THERMAL
|
|
||||||
tristate "X86 package temperature thermal driver"
|
|
||||||
depends on X86_THERMAL_VECTOR
|
|
||||||
select THERMAL_GOV_USER_SPACE
|
|
||||||
select THERMAL_WRITABLE_TRIPS
|
|
||||||
default m
|
|
||||||
help
|
|
||||||
Enable this to register CPU digital sensor for package temperature as
|
|
||||||
thermal zone. Each package will have its own thermal zone. There are
|
|
||||||
two trip points which can be set by user to get notifications via thermal
|
|
||||||
notification methods.
|
|
||||||
|
|
||||||
config INTEL_SOC_DTS_IOSF_CORE
|
|
||||||
tristate
|
|
||||||
depends on X86 && PCI
|
|
||||||
select IOSF_MBI
|
|
||||||
help
|
|
||||||
This is becoming a common feature for Intel SoCs to expose the additional
|
|
||||||
digital temperature sensors (DTSs) using side band interface (IOSF). This
|
|
||||||
implements the common set of helper functions to register, get temperature
|
|
||||||
and get/set thresholds on DTSs.
|
|
||||||
|
|
||||||
config INTEL_SOC_DTS_THERMAL
|
|
||||||
tristate "Intel SoCs DTS thermal driver"
|
|
||||||
depends on X86 && PCI && ACPI
|
|
||||||
select INTEL_SOC_DTS_IOSF_CORE
|
|
||||||
select THERMAL_WRITABLE_TRIPS
|
|
||||||
help
|
|
||||||
Enable this to register Intel SoCs (e.g. Bay Trail) platform digital
|
|
||||||
temperature sensor (DTS). These SoCs have two additional DTSs in
|
|
||||||
addition to DTSs on CPU cores. Each DTS will be registered as a
|
|
||||||
thermal zone. There are two trip points. One of the trip point can
|
|
||||||
be set by user mode programs to get notifications via Linux thermal
|
|
||||||
notification methods.The other trip is a critical trip point, which
|
|
||||||
was set by the driver based on the TJ MAX temperature.
|
|
||||||
|
|
||||||
config INTEL_QUARK_DTS_THERMAL
|
|
||||||
tristate "Intel Quark DTS thermal driver"
|
|
||||||
depends on X86_INTEL_QUARK
|
|
||||||
help
|
|
||||||
Enable this to register Intel Quark SoC (e.g. X1000) platform digital
|
|
||||||
temperature sensor (DTS). For X1000 SoC, it has one on-die DTS.
|
|
||||||
The DTS will be registered as a thermal zone. There are two trip points:
|
|
||||||
hot & critical. The critical trip point default value is set by
|
|
||||||
underlying BIOS/Firmware.
|
|
||||||
|
|
||||||
menu "ACPI INT340X thermal drivers"
|
|
||||||
source drivers/thermal/int340x_thermal/Kconfig
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
config INTEL_BXT_PMIC_THERMAL
|
|
||||||
tristate "Intel Broxton PMIC thermal driver"
|
|
||||||
depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP
|
|
||||||
help
|
|
||||||
Select this driver for Intel Broxton PMIC with ADC channels monitoring
|
|
||||||
system temperature measurements and alerts.
|
|
||||||
This driver is used for monitoring the ADC channels of PMIC and handles
|
|
||||||
the alert trip point interrupts and notifies the thermal framework with
|
|
||||||
the trip point and temperature details of the zone.
|
|
||||||
|
|
||||||
config INTEL_PCH_THERMAL
|
|
||||||
tristate "Intel PCH Thermal Reporting Driver"
|
|
||||||
depends on X86 && PCI
|
|
||||||
help
|
|
||||||
Enable this to support thermal reporting on certain intel PCHs.
|
|
||||||
Thermal reporting device will provide temperature reading,
|
|
||||||
programmable trip points and other information.
|
|
||||||
|
|
||||||
config MTK_THERMAL
|
config MTK_THERMAL
|
||||||
tristate "Temperature sensor driver for mediatek SoCs"
|
tristate "Temperature sensor driver for mediatek SoCs"
|
||||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||||
@@ -415,6 +337,11 @@ config MTK_THERMAL
|
|||||||
Enable this option if you want to have support for thermal management
|
Enable this option if you want to have support for thermal management
|
||||||
controller present in Mediatek SoCs
|
controller present in Mediatek SoCs
|
||||||
|
|
||||||
|
menu "Intel thermal drivers"
|
||||||
|
depends on X86 || X86_INTEL_QUARK || COMPILE_TEST
|
||||||
|
source "drivers/thermal/intel/Kconfig"
|
||||||
|
endmenu
|
||||||
|
|
||||||
menu "Broadcom thermal drivers"
|
menu "Broadcom thermal drivers"
|
||||||
depends on ARCH_BCM || ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST
|
depends on ARCH_BCM || ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST
|
||||||
source "drivers/thermal/broadcom/Kconfig"
|
source "drivers/thermal/broadcom/Kconfig"
|
||||||
@@ -447,17 +374,6 @@ config TANGO_THERMAL
|
|||||||
|
|
||||||
source "drivers/thermal/tegra/Kconfig"
|
source "drivers/thermal/tegra/Kconfig"
|
||||||
|
|
||||||
config QCOM_SPMI_TEMP_ALARM
|
|
||||||
tristate "Qualcomm SPMI PMIC Temperature Alarm"
|
|
||||||
depends on OF && SPMI && IIO
|
|
||||||
select REGMAP_SPMI
|
|
||||||
help
|
|
||||||
This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP)
|
|
||||||
PMIC devices. It shows up in sysfs as a thermal sensor with multiple
|
|
||||||
trip points. The temperature reported by the thermal sensor reflects the
|
|
||||||
real time die temperature if an ADC is present or an estimate of the
|
|
||||||
temperature based upon the over temperature stage value.
|
|
||||||
|
|
||||||
config GENERIC_ADC_THERMAL
|
config GENERIC_ADC_THERMAL
|
||||||
tristate "Generic ADC based thermal sensor"
|
tristate "Generic ADC based thermal sensor"
|
||||||
depends on IIO
|
depends on IIO
|
||||||
|
@@ -29,7 +29,6 @@ thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o
|
|||||||
|
|
||||||
# platform thermal drivers
|
# platform thermal drivers
|
||||||
obj-y += broadcom/
|
obj-y += broadcom/
|
||||||
obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o
|
|
||||||
obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o
|
obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o
|
||||||
obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
|
obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
|
||||||
obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o
|
obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o
|
||||||
@@ -44,15 +43,8 @@ obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o
|
|||||||
obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o
|
obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o
|
||||||
obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o
|
obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o
|
||||||
obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o
|
obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o
|
||||||
obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o
|
obj-y += intel/
|
||||||
obj-$(CONFIG_X86_PKG_TEMP_THERMAL) += x86_pkg_temp_thermal.o
|
|
||||||
obj-$(CONFIG_INTEL_SOC_DTS_IOSF_CORE) += intel_soc_dts_iosf.o
|
|
||||||
obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o
|
|
||||||
obj-$(CONFIG_INTEL_QUARK_DTS_THERMAL) += intel_quark_dts_thermal.o
|
|
||||||
obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/
|
obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/
|
||||||
obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/
|
|
||||||
obj-$(CONFIG_INTEL_BXT_PMIC_THERMAL) += intel_bxt_pmic_thermal.o
|
|
||||||
obj-$(CONFIG_INTEL_PCH_THERMAL) += intel_pch_thermal.o
|
|
||||||
obj-y += st/
|
obj-y += st/
|
||||||
obj-$(CONFIG_QCOM_TSENS) += qcom/
|
obj-$(CONFIG_QCOM_TSENS) += qcom/
|
||||||
obj-y += tegra/
|
obj-y += tegra/
|
||||||
|
77
drivers/thermal/intel/Kconfig
Normal file
77
drivers/thermal/intel/Kconfig
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
config INTEL_POWERCLAMP
|
||||||
|
tristate "Intel PowerClamp idle injection driver"
|
||||||
|
depends on THERMAL
|
||||||
|
depends on X86
|
||||||
|
depends on CPU_SUP_INTEL
|
||||||
|
help
|
||||||
|
Enable this to enable Intel PowerClamp idle injection driver. This
|
||||||
|
enforce idle time which results in more package C-state residency. The
|
||||||
|
user interface is exposed via generic thermal framework.
|
||||||
|
|
||||||
|
config X86_PKG_TEMP_THERMAL
|
||||||
|
tristate "X86 package temperature thermal driver"
|
||||||
|
depends on X86_THERMAL_VECTOR
|
||||||
|
select THERMAL_GOV_USER_SPACE
|
||||||
|
select THERMAL_WRITABLE_TRIPS
|
||||||
|
default m
|
||||||
|
help
|
||||||
|
Enable this to register CPU digital sensor for package temperature as
|
||||||
|
thermal zone. Each package will have its own thermal zone. There are
|
||||||
|
two trip points which can be set by user to get notifications via thermal
|
||||||
|
notification methods.
|
||||||
|
|
||||||
|
config INTEL_SOC_DTS_IOSF_CORE
|
||||||
|
tristate
|
||||||
|
depends on X86 && PCI
|
||||||
|
select IOSF_MBI
|
||||||
|
help
|
||||||
|
This is becoming a common feature for Intel SoCs to expose the additional
|
||||||
|
digital temperature sensors (DTSs) using side band interface (IOSF). This
|
||||||
|
implements the common set of helper functions to register, get temperature
|
||||||
|
and get/set thresholds on DTSs.
|
||||||
|
|
||||||
|
config INTEL_SOC_DTS_THERMAL
|
||||||
|
tristate "Intel SoCs DTS thermal driver"
|
||||||
|
depends on X86 && PCI && ACPI
|
||||||
|
select INTEL_SOC_DTS_IOSF_CORE
|
||||||
|
select THERMAL_WRITABLE_TRIPS
|
||||||
|
help
|
||||||
|
Enable this to register Intel SoCs (e.g. Bay Trail) platform digital
|
||||||
|
temperature sensor (DTS). These SoCs have two additional DTSs in
|
||||||
|
addition to DTSs on CPU cores. Each DTS will be registered as a
|
||||||
|
thermal zone. There are two trip points. One of the trip point can
|
||||||
|
be set by user mode programs to get notifications via Linux thermal
|
||||||
|
notification methods.The other trip is a critical trip point, which
|
||||||
|
was set by the driver based on the TJ MAX temperature.
|
||||||
|
|
||||||
|
config INTEL_QUARK_DTS_THERMAL
|
||||||
|
tristate "Intel Quark DTS thermal driver"
|
||||||
|
depends on X86_INTEL_QUARK
|
||||||
|
help
|
||||||
|
Enable this to register Intel Quark SoC (e.g. X1000) platform digital
|
||||||
|
temperature sensor (DTS). For X1000 SoC, it has one on-die DTS.
|
||||||
|
The DTS will be registered as a thermal zone. There are two trip points:
|
||||||
|
hot & critical. The critical trip point default value is set by
|
||||||
|
underlying BIOS/Firmware.
|
||||||
|
|
||||||
|
menu "ACPI INT340X thermal drivers"
|
||||||
|
source drivers/thermal/intel/int340x_thermal/Kconfig
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config INTEL_BXT_PMIC_THERMAL
|
||||||
|
tristate "Intel Broxton PMIC thermal driver"
|
||||||
|
depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP
|
||||||
|
help
|
||||||
|
Select this driver for Intel Broxton PMIC with ADC channels monitoring
|
||||||
|
system temperature measurements and alerts.
|
||||||
|
This driver is used for monitoring the ADC channels of PMIC and handles
|
||||||
|
the alert trip point interrupts and notifies the thermal framework with
|
||||||
|
the trip point and temperature details of the zone.
|
||||||
|
|
||||||
|
config INTEL_PCH_THERMAL
|
||||||
|
tristate "Intel PCH Thermal Reporting Driver"
|
||||||
|
depends on X86 && PCI
|
||||||
|
help
|
||||||
|
Enable this to support thermal reporting on certain intel PCHs.
|
||||||
|
Thermal reporting device will provide temperature reading,
|
||||||
|
programmable trip points and other information.
|
12
drivers/thermal/intel/Makefile
Normal file
12
drivers/thermal/intel/Makefile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
#
|
||||||
|
# Makefile for various Intel thermal drivers.
|
||||||
|
|
||||||
|
obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o
|
||||||
|
obj-$(CONFIG_X86_PKG_TEMP_THERMAL) += x86_pkg_temp_thermal.o
|
||||||
|
obj-$(CONFIG_INTEL_SOC_DTS_IOSF_CORE) += intel_soc_dts_iosf.o
|
||||||
|
obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o
|
||||||
|
obj-$(CONFIG_INTEL_QUARK_DTS_THERMAL) += intel_quark_dts_thermal.o
|
||||||
|
obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/
|
||||||
|
obj-$(CONFIG_INTEL_BXT_PMIC_THERMAL) += intel_bxt_pmic_thermal.o
|
||||||
|
obj-$(CONFIG_INTEL_PCH_THERMAL) += intel_pch_thermal.o
|
@@ -48,8 +48,7 @@ static ssize_t available_uuids_show(struct device *dev,
|
|||||||
struct device_attribute *attr,
|
struct device_attribute *attr,
|
||||||
char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct int3400_thermal_priv *priv = dev_get_drvdata(dev);
|
||||||
struct int3400_thermal_priv *priv = platform_get_drvdata(pdev);
|
|
||||||
int i;
|
int i;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
|
||||||
@@ -68,8 +67,7 @@ static ssize_t available_uuids_show(struct device *dev,
|
|||||||
static ssize_t current_uuid_show(struct device *dev,
|
static ssize_t current_uuid_show(struct device *dev,
|
||||||
struct device_attribute *devattr, char *buf)
|
struct device_attribute *devattr, char *buf)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct int3400_thermal_priv *priv = dev_get_drvdata(dev);
|
||||||
struct int3400_thermal_priv *priv = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
if (priv->uuid_bitmap & (1 << priv->current_uuid_index))
|
if (priv->uuid_bitmap & (1 << priv->current_uuid_index))
|
||||||
return sprintf(buf, "%s\n",
|
return sprintf(buf, "%s\n",
|
||||||
@@ -82,8 +80,7 @@ static ssize_t current_uuid_store(struct device *dev,
|
|||||||
struct device_attribute *attr,
|
struct device_attribute *attr,
|
||||||
const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct int3400_thermal_priv *priv = dev_get_drvdata(dev);
|
||||||
struct int3400_thermal_priv *priv = platform_get_drvdata(pdev);
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) {
|
for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) {
|
@@ -9,3 +9,14 @@ config QCOM_TSENS
|
|||||||
thermal zone device via the mode file results in disabling the sensor.
|
thermal zone device via the mode file results in disabling the sensor.
|
||||||
Also able to set threshold temperature for both hot and cold and update
|
Also able to set threshold temperature for both hot and cold and update
|
||||||
when a threshold is reached.
|
when a threshold is reached.
|
||||||
|
|
||||||
|
config QCOM_SPMI_TEMP_ALARM
|
||||||
|
tristate "Qualcomm SPMI PMIC Temperature Alarm"
|
||||||
|
depends on OF && SPMI && IIO
|
||||||
|
select REGMAP_SPMI
|
||||||
|
help
|
||||||
|
This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP)
|
||||||
|
PMIC devices. It shows up in sysfs as a thermal sensor with multiple
|
||||||
|
trip points. The temperature reported by the thermal sensor reflects the
|
||||||
|
real time die temperature if an ADC is present or an estimate of the
|
||||||
|
temperature based upon the over temperature stage value.
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o
|
obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o
|
||||||
qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o
|
qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o
|
||||||
|
obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/thermal.h>
|
#include <linux/thermal.h>
|
||||||
|
|
||||||
#include "thermal_core.h"
|
#include "../thermal_core.h"
|
||||||
|
|
||||||
#define QPNP_TM_REG_TYPE 0x04
|
#define QPNP_TM_REG_TYPE 0x04
|
||||||
#define QPNP_TM_REG_SUBTYPE 0x05
|
#define QPNP_TM_REG_SUBTYPE 0x05
|
@@ -1327,8 +1327,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
|
static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct rockchip_thermal_data *thermal = dev_get_drvdata(dev);
|
||||||
struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev);
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < thermal->chip->chn_num; i++)
|
for (i = 0; i < thermal->chip->chn_num; i++)
|
||||||
@@ -1346,8 +1345,7 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int __maybe_unused rockchip_thermal_resume(struct device *dev)
|
static int __maybe_unused rockchip_thermal_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct rockchip_thermal_data *thermal = dev_get_drvdata(dev);
|
||||||
struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev);
|
|
||||||
int i;
|
int i;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@@ -1376,7 +1374,7 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
|
|||||||
id, thermal->regs,
|
id, thermal->regs,
|
||||||
thermal->tshut_temp);
|
thermal->tshut_temp);
|
||||||
if (error)
|
if (error)
|
||||||
dev_err(&pdev->dev, "%s: invalid tshut=%d, error=%d\n",
|
dev_err(dev, "%s: invalid tshut=%d, error=%d\n",
|
||||||
__func__, thermal->tshut_temp, error);
|
__func__, thermal->tshut_temp, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,8 +56,7 @@ static struct thermal_zone_device_ops ops = {
|
|||||||
|
|
||||||
static int __maybe_unused spear_thermal_suspend(struct device *dev)
|
static int __maybe_unused spear_thermal_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct thermal_zone_device *spear_thermal = dev_get_drvdata(dev);
|
||||||
struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev);
|
|
||||||
struct spear_thermal_dev *stdev = spear_thermal->devdata;
|
struct spear_thermal_dev *stdev = spear_thermal->devdata;
|
||||||
unsigned int actual_mask = 0;
|
unsigned int actual_mask = 0;
|
||||||
|
|
||||||
@@ -73,15 +72,14 @@ static int __maybe_unused spear_thermal_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int __maybe_unused spear_thermal_resume(struct device *dev)
|
static int __maybe_unused spear_thermal_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct thermal_zone_device *spear_thermal = dev_get_drvdata(dev);
|
||||||
struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev);
|
|
||||||
struct spear_thermal_dev *stdev = spear_thermal->devdata;
|
struct spear_thermal_dev *stdev = spear_thermal->devdata;
|
||||||
unsigned int actual_mask = 0;
|
unsigned int actual_mask = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
ret = clk_enable(stdev->clk);
|
ret = clk_enable(stdev->clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Can't enable clock\n");
|
dev_err(dev, "Can't enable clock\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -277,8 +277,7 @@ EXPORT_SYMBOL_GPL(st_thermal_unregister);
|
|||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int st_thermal_suspend(struct device *dev)
|
static int st_thermal_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct st_thermal_sensor *sensor = dev_get_drvdata(dev);
|
||||||
struct st_thermal_sensor *sensor = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return st_thermal_sensor_off(sensor);
|
return st_thermal_sensor_off(sensor);
|
||||||
}
|
}
|
||||||
@@ -286,8 +285,7 @@ static int st_thermal_suspend(struct device *dev)
|
|||||||
static int st_thermal_resume(struct device *dev)
|
static int st_thermal_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct st_thermal_sensor *sensor = dev_get_drvdata(dev);
|
||||||
struct st_thermal_sensor *sensor = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
ret = st_thermal_sensor_on(sensor);
|
ret = st_thermal_sensor_on(sensor);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@@ -207,8 +207,7 @@ MODULE_DEVICE_TABLE(of, zx2967_thermal_id_table);
|
|||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int zx2967_thermal_suspend(struct device *dev)
|
static int zx2967_thermal_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct zx2967_thermal_priv *priv = dev_get_drvdata(dev);
|
||||||
struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
if (priv && priv->clk_topcrm)
|
if (priv && priv->clk_topcrm)
|
||||||
clk_disable_unprepare(priv->clk_topcrm);
|
clk_disable_unprepare(priv->clk_topcrm);
|
||||||
@@ -221,8 +220,7 @@ static int zx2967_thermal_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int zx2967_thermal_resume(struct device *dev)
|
static int zx2967_thermal_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct zx2967_thermal_priv *priv = dev_get_drvdata(dev);
|
||||||
struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev);
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = clk_prepare_enable(priv->clk_topcrm);
|
error = clk_prepare_enable(priv->clk_topcrm);
|
||||||
|
Reference in New Issue
Block a user