]> www.infradead.org Git - users/dwmw2/linux.git/commit
platform/x86: asus-wmi: store a min default for ppt options
authorLuke D. Jones <luke@ljones.dev>
Thu, 4 Apr 2024 00:16:48 +0000 (13:16 +1300)
committerHans de Goede <hdegoede@redhat.com>
Mon, 8 Apr 2024 16:30:27 +0000 (18:30 +0200)
commit5fc378183d94186a768d6727fe5610d34f0dc4f6
treed2813f4fdce91fa34420f4f7758110b3bc1929da
parente0ae0ecce4869f841ea7cb20fca1b2c865c13339
platform/x86: asus-wmi: store a min default for ppt options

Laptops with any of the ppt or nv tunables default to the minimum setting
on boot so we can safely assume a stored value is correct.

This patch adds storing of those values in the local struct, and enables
reading of those values back. To prevent creating a series of byte holes
in the struct the "<name>_available" bool is removed and
`asus_sysfs_is_visible()` uses the `ASUS_WMI_DEVID_<name>` directly.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240404001652.86207-6-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-wmi.c