drivers: thermal: tsens: Add debugfs support
authorAmit Kucheria <amit.kucheria@linaro.org>
Thu, 31 Oct 2019 18:37:28 +0000 (00:07 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 7 Nov 2019 06:00:26 +0000 (07:00 +0100)
commit7c938f4837ab469183e1281d8525ab428f996e76
tree8a263b2d4761fd58b0af176e0a3008769b896c0a
parent3795ad5e2669082ff4e4b5a2c9e002a0e8fe66b2
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
drivers/thermal/qcom/tsens-common.c
drivers/thermal/qcom/tsens.c
drivers/thermal/qcom/tsens.h