Commit d56c19d0 authored by Matthias Brugger's avatar Matthias Brugger Committed by Eduardo Valentin

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: default avatarMatthias Brugger <mbrugger@suse.com>
Acked-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 03334ba8
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/thermal.h> #include <linux/thermal.h>
#include "../thermal_hwmon.h"
#define BCM2835_TS_TSENSCTL 0x00 #define BCM2835_TS_TSENSCTL 0x00
#define BCM2835_TS_TSENSSTAT 0x04 #define BCM2835_TS_TSENSSTAT 0x04
...@@ -275,6 +277,15 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) ...@@ -275,6 +277,15 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tz); 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); bcm2835_thermal_debugfs(pdev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment