linux-samsung-r9q2/include/linux/platform_data/x86
Luke D. Jones 0f0ac158d2 platform/x86: asus-wmi: Add support for custom fan curves
Add support for custom fan curves found on some ASUS ROG laptops.

These laptops have the ability to set a custom curve for the CPU
and GPU fans via two ACPI methods.

This patch adds two pwm<N> attributes to the hwmon sysfs,
pwm1 for CPU fan, pwm2 for GPU fan. Both are under the hwmon of the
name `asus_custom_fan_curve`. There is no safety check of the set
fan curves - this must be done in userspace.

The fans have settings [1,2,3] under pwm<N>_enable:
1. Enable and write settings out
2. Disable and use factory fan mode
3. Same as 2, additionally restoring default factory curve.

Use of 2 means that the curve the user has set is still stored and
won't be erased, but the laptop will be using its default auto-fan
mode. Re-enabling the manual mode then activates the curves again.

Notes:
- pwm<N>_enable = 0 is an invalid setting.
- pwm is actually a percentage and is scaled on writing to device.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20211024033705.5595-2-luke@ljones.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-11-16 10:56:53 +01:00
..
apple.h treewide: Consolidate Apple DMI checks 2017-08-03 23:26:22 +02:00
asus-wmi.h platform/x86: asus-wmi: Add support for custom fan curves 2021-11-16 10:56:53 +01:00
clk-lpss.h clk: x86: Rename clk-lpt to more specific clk-lpss-atom 2021-07-27 14:03:47 -07:00
clk-pmc-atom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
intel-spi.h mtd: spi-nor: intel-spi: Move platform data header to x86 subfolder 2021-03-08 08:32:31 +02:00
pmc_atom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
soc.h ASoC: Intel: Move soc_intel_is_foo() helpers to a generic header 2021-10-19 17:31:24 +02:00