diff mbox series

[v2,5/7] thermal/core: Prepare sanitizing thermal class sysfs content

Message ID 20230410205305.1649678-6-daniel.lezcano@linaro.org
State New
Headers show
Series Thermal zone device structure encapsulation | expand

Commit Message

Daniel Lezcano April 10, 2023, 8:53 p.m. UTC
Some drivers are accessing the thermal zone device structure to create
specific entries in /sys/class/thermal regardless the documentation.

It is questionable as the specific information should be in the
driver's sysfs directory, not the framework it is dealing with.

It has been long time these specific attributes were added in the
thermal sysfs directory and are limited to the ACPI thermal driver and
the Menlon driver.

It is probable those are not really needed, so in order to figure out
if that is the case, let's create a default option disabling the
attribute in order to prepare a definitive removal.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/Kconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Rafael J. Wysocki April 11, 2023, 6:23 p.m. UTC | #1
On Mon, Apr 10, 2023 at 10:53 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> Some drivers are accessing the thermal zone device structure to create
> specific entries in /sys/class/thermal regardless the documentation.
>
> It is questionable as the specific information should be in the
> driver's sysfs directory, not the framework it is dealing with.
>
> It has been long time these specific attributes were added in the
> thermal sysfs directory and are limited to the ACPI thermal driver and
> the Menlon driver.
>
> It is probable those are not really needed, so in order to figure out
> if that is the case, let's create a default option disabling the
> attribute in order to prepare a definitive removal.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  drivers/thermal/Kconfig | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 4cd7ab707315..cca4e5cf6f30 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -33,6 +33,18 @@ config THERMAL_STATISTICS
>
>           If in doubt, say N.
>
> +config THERMAL_SYSFS_OBSOLETE_SINGULARITY
> +       bool "Enable obsolete and undocumented sysfs extra information"

I was talking about making an extra Kconfig option in the Menlow
driver to make the extra sysfs stuff depend on.

Throwing ACPI in the same bucket is a non-starter.

> +       def_bool n
> +       help
> +         Enable sysfs extra information added in the thermal zone and
> +         the driver specific sysfs directories. That could be a link
> +         to the associated thermal zone as well as a link pointing to
> +         the device from the thermal zone. By default those are
> +         disabled and are candidate for removal, if you need these
> +         information anyway, enable the option or upgrade the
> +         userspace program using them.
> +
>  config THERMAL_EMERGENCY_POWEROFF_DELAY_MS
>         int "Emergency poweroff delay in milli-seconds"
>         default 0
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 4cd7ab707315..cca4e5cf6f30 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -33,6 +33,18 @@  config THERMAL_STATISTICS
 
 	  If in doubt, say N.
 
+config THERMAL_SYSFS_OBSOLETE_SINGULARITY
+	bool "Enable obsolete and undocumented sysfs extra information"
+	def_bool n
+	help
+	  Enable sysfs extra information added in the thermal zone and
+	  the driver specific sysfs directories. That could be a link
+	  to the associated thermal zone as well as a link pointing to
+	  the device from the thermal zone. By default those are
+	  disabled and are candidate for removal, if you need these
+	  information anyway, enable the option or upgrade the
+	  userspace program using them.
+
 config THERMAL_EMERGENCY_POWEROFF_DELAY_MS
 	int "Emergency poweroff delay in milli-seconds"
 	default 0