]> Git Repo - linux.git/commit
thermal: int340x: Mode setting with new OS handshake
authorSrinivas Pandruvada <[email protected]>
Tue, 10 May 2022 18:22:21 +0000 (11:22 -0700)
committerRafael J. Wysocki <[email protected]>
Wed, 11 May 2022 18:08:15 +0000 (20:08 +0200)
commit7b145802ba545ecf9446ce6d67d6011b73dac0e0
treedc590fd3728c1c7d61d115b322334f1c4a67fa46
parentc5eb0a61238dd6faf37f58c9ce61c9980aaffd7a
thermal: int340x: Mode setting with new OS handshake

With the new OS handshake introduced by commit: "c7ff29763989 ("thermal:
int340x: Update OS policy capability handshake")", the "enabled" thermal
zone mode doesn't work in the same way as previously.

The "enabled" mode fails with -EINVAL when the new handshake is used.

To address this issue, when the new OS UUID mask is set:

 - When the mode is "enabled", return 0 as the firmware already has the
   latest policy mask.

 - When the mode is "disabled", update the firmware with the UUID mask
   of zero.

This way, the firmware can take over the thermal control.

Also reset the OS UUID mask, which allows user space to update with new
set of policies.

Fixes: c7ff29763989 ("thermal: int340x: Update OS policy capability handshake")
Signed-off-by: Srinivas Pandruvada <[email protected]>
[ rjw: Changelog edits, removed unneeded parens ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
This page took 0.054989 seconds and 4 git commands to generate.