mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
thermal: bcm2835: enable hwmon explicitly
[ Upstream commit d56c19d07e
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
295b3e2af8
commit
6a7c0215d2
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue