Hi,
On 9/17/20 3:28 PM, Bastien Nocera wrote:
On Thu, 2020-09-17 at 15:24 +0200, Hans de Goede wrote:
Hi,
On 9/17/20 3:02 PM, Barnabás Pőcze wrote:
Hi
2020. szeptember 17., csütörtök 13:22 keltezéssel, Hans de Goede
írta:
[...]
I guess we should also add an optional lap_mode sysfs attribute
to the class-device, to have all the info for the Thinkpads in
one place.
[...]
Excuse my ignorance, but why does "lap_mode" need to be here?
I understand the implications of it regarding performance, but
I think it would be more sense to export it via the hwmon (or
something similar) subsystem? What am I missing?
Well hwmon has very clearly defined sensor types, like voltage,
fan-speed and temperature. lap_mode does not match any of them.
Also registering another-type class device just for the lap_mode
boolean seems overkill, esp. since lap_mode is inherently coupled
to the performance-profile stuff.
There's proximity sensors in the IIO subsystem which this could use
But this is not a proximity sensor, it is a state determined by
the firmware based on several data sources, which may or may not
include a proximity sensor and which may or may not include an
accelerometer + who knows what else.
But with the earlier discussed splitting of the value
sysfs-attr into a configure_value (rw) and actual_value(ro)
attributes I don't think we need lap_mode inside the
system_performance_profile class at all. We already have
a thinkpad_acpi specific sysfs attribute exporting this, and
since this is AFAIK a thinkpad specific thing, just leaving
it there is probably the best solution.
Regards,
Hans