diff options
author | Amit Kucheria <amit.kucheria@linaro.org> | 2019-10-31 21:37:28 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-11-07 09:00:26 +0300 |
commit | 7c938f4837ab469183e1281d8525ab428f996e76 (patch) | |
tree | 8a263b2d4761fd58b0af176e0a3008769b896c0a /drivers/thermal/qcom/tsens.c | |
parent | 3795ad5e2669082ff4e4b5a2c9e002a0e8fe66b2 (diff) | |
download | linux-7c938f4837ab469183e1281d8525ab428f996e76.tar.xz |
drivers: thermal: tsens: Add debugfs support
Dump some basic version info and sensor details into debugfs. Example
from qcs404 below:
--(/sys/kernel/debug) $ ls tsens/
4a9000.thermal-sensor version
--(/sys/kernel/debug) $ cat tsens/version
1.4.0
--(/sys/kernel/debug) $ cat tsens/4a9000.thermal-sensor/sensors
max: 11
num: 10
id slope offset
------------------------
0 3200 404000
1 3200 404000
2 3200 404000
3 3200 404000
4 3200 404000
5 3200 404000
6 3200 404000
7 3200 404000
8 3200 404000
9 3200 404000
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/16e39c1bbfc18b5cf6274620cd72cc63205f53a5.1572526427.git.amit.kucheria@linaro.org
Diffstat (limited to 'drivers/thermal/qcom/tsens.c')
-rw-r--r-- | drivers/thermal/qcom/tsens.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 06c6bbd69a1a..772aa76b50e1 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -3,6 +3,7 @@ * Copyright (c) 2015, The Linux Foundation. All rights reserved. */ +#include <linux/debugfs.h> #include <linux/err.h> #include <linux/module.h> #include <linux/of.h> @@ -176,6 +177,7 @@ static int tsens_remove(struct platform_device *pdev) { struct tsens_priv *priv = platform_get_drvdata(pdev); + debugfs_remove_recursive(priv->debug_root); if (priv->ops->disable) priv->ops->disable(priv); |