lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectparent device of thermal cooling device
Date
Hello,

i am currently working on integrating an hwmon driver (dell_smm_hwmon) into the thermal subsystem.
While doing that, i noticed that when registering cooling devices, the thermal subsystem
does not allow passing a parent device, so there is no "device/" symlink being created.

This creates problems for example when a thermal driver is instantiated multiple times while
creating cooling devices with the same type. Without the "device/" symlink, userspace is
unable to tell which cooling device belongs to which device.

The acpi fan driver is already inserting a symlink between the cooling device and the ACPI device
to avoid such issues, but such a symlink could be created automatically by allowing the driver
to pass a parent device when registering with the thermal subsystem.

Two approaches are possible:

1. Pass a separate device struct as parent device to __thermal_cooling_device_register().

2. Replace the device tree node argument with a parent device and use the device tree node
from this device.

Which approach would be the more feasible one?

Armin Wolf

\
 
 \ /
  Last update: 2022-04-27 01:09    [W:0.025 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site