rockchip: sync upstream patch

This commit is contained in:
CN_SZTL
2020-11-29 12:22:40 +08:00
parent 951df49a9f
commit 10867f5772

View File

@@ -1,31 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From d27970b82a0f552f70e76fab154855b3192aac23 Mon Sep 17 00:00:00 2001
From: Stefan Schaeckeler <schaecsn@gmx.net>
Date: Wed, 11 Dec 2019 22:17:02 -0800
Subject: [RESEND PATCH] thermal: rockchip: enable hwmon
Subject: thermal: rockchip: Enable hwmon
By default, of-based thermal drivers do not enable hwmon.
Explicitly enable hwmon for both, the soc and gpu temperature
sensor.
Signed-off-by: Stefan Schaeckeler <schaecsn@gmx.net>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191212061702.BFE2D6E85603@corona.crabdance.com
---
drivers/thermal/rockchip_thermal.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 343c2f5c5a25..e47c60010259 100644
index 9ed8085bb7924..7c1a8bccdcba6 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -19,6 +19,8 @@
#include <linux/mfd/syscon.h>
#include <linux/pinctrl/consumer.h>
@@ -58,6 +58,8 @@ enum adc_sort_mode {
ADC_INCREMENT,
};
+#include "thermal_hwmon.h"
+
/**
* If the temperature over a period of time High,
* the resulting TSHUT gave CRU module,let it reset the entire chip,
@@ -1321,8 +1323,15 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
* The max sensors is two in rockchip SoCs.
* Two sensors: CPU and GPU sensor.
@@ -1331,8 +1333,15 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
thermal->chip->control(thermal->regs, true);
@@ -42,7 +45,7 @@ index 343c2f5c5a25..e47c60010259 100644
platform_set_drvdata(pdev, thermal);
@@ -1344,6 +1353,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev)
@@ -1354,6 +1363,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev)
for (i = 0; i < thermal->chip->chn_num; i++) {
struct rockchip_thermal_sensor *sensor = &thermal->sensors[i];
@@ -50,3 +53,6 @@ index 343c2f5c5a25..e47c60010259 100644
rockchip_thermal_toggle_sensor(sensor, false);
}
--
cgit 1.2.3-1.el7