[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c56e3ae9-835f-4a23-f8e1-764a9a8c3e84@gmx.de>
Date: Wed, 27 Apr 2022 01:08:05 +0200
From: Armin Wolf <W_Armin@....de>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Amit Kucheria <amitk@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: parent device of thermal cooling device
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
Powered by blists - more mailing lists