thermal/drivers/qcom/tsens: Rework debugfs file structure
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 22 Oct 2022 12:56:57 +0000 (14:56 +0200)
committerDaniel Lezcano <daniel.lezcano@kernel.org>
Wed, 14 Dec 2022 14:25:40 +0000 (15:25 +0100)
commit89992d95ed1046338c7866ef7bbe6de543a2af91
tree336abda699d182a1b7a97943a3936c8cb8599775
parentc7e077e921fa94e0c06c8d14af6c0504c8a5f4bd
thermal/drivers/qcom/tsens: Rework debugfs file structure

The current tsens debugfs structure is composed by:
- a tsens dir in debugfs with a version file
- a directory for each tsens istance with sensors file to dump all the
  sensors value.

This works on the assumption that we have the same version for each
istance but this assumption seems fragile and with more than one tsens
istance results in the version file not tracking each of them.

A better approach is to just create a subdirectory for each tsens
istance and put there version and sensors debugfs file.

Using this new implementation results in less code since debugfs entry
are created only on successful tsens probe.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20221022125657.22530-4-ansuelsmth@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
drivers/thermal/qcom/tsens.c