summaryrefslogtreecommitdiff
path: root/drivers/thermal/broadcom
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2018-10-22 00:58:48 +0300
committerEduardo Valentin <edubezval@gmail.com>2019-01-02 15:47:08 +0300
commitd56c19d07e0bc3ceff366a49b7d7a2440c967b1b (patch)
tree8bccdc30d511e8459d1b8b2f6e69fd1ec271d75a /drivers/thermal/broadcom
parent03334ba8b425b2ad275c8f390cf83c7b081c3095 (diff)
downloadlinux-d56c19d07e0bc3ceff366a49b7d7a2440c967b1b.tar.xz
thermal: bcm2835: enable hwmon explicitly
By defaul of-based thermal driver do not enable hwmon. This patch does this explicitly, so that the temperature can be read through the common hwmon sysfs. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/broadcom')
-rw-r--r--drivers/thermal/broadcom/bcm2835_thermal.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 23ad4f9f2143..24b006a95142 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -27,6 +27,8 @@
#include <linux/platform_device.h>
#include <linux/thermal.h>
+#include "../thermal_hwmon.h"
+
#define BCM2835_TS_TSENSCTL 0x00
#define BCM2835_TS_TSENSSTAT 0x04
@@ -275,6 +277,15 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tz);
+ /*
+ * Thermal_zone doesn't enable hwmon as default,
+ * enable it here
+ */
+ tz->tzp->no_hwmon = false;
+ err = thermal_add_hwmon_sysfs(tz);
+ if (err)
+ goto err_tz;
+
bcm2835_thermal_debugfs(pdev);
return 0;