aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-02-02 15:38:10 +0100
committerHans de Goede <hdegoede@redhat.com>2021-02-02 15:38:10 +0100
commiteffe55add04fd30ccd7700b11fa042124aa345af (patch)
tree7de6e30b2914cc41652c2d1d44c7cd36ae520cd6 /include/linux
parentplatform/x86: thinkpad_acpi: fixed warning and incorporated review comments (diff)
parentACPI: platform-profile: Fix possible deadlock in platform_profile_remove() (diff)
downloadwireguard-linux-effe55add04fd30ccd7700b11fa042124aa345af.tar.xz
wireguard-linux-effe55add04fd30ccd7700b11fa042124aa345af.zip
Merge remote-tracking branch 'linux-pm/acpi-platform' into review-hans
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_profile.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
new file mode 100644
index 000000000000..a26542d53058
--- /dev/null
+++ b/include/linux/platform_profile.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Platform profile sysfs interface
+ *
+ * See Documentation/ABI/testing/sysfs-platform_profile.rst for more
+ * information.
+ */
+
+#ifndef _PLATFORM_PROFILE_H_
+#define _PLATFORM_PROFILE_H_
+
+#include <linux/bitops.h>
+
+/*
+ * If more options are added please update profile_names
+ * array in platform-profile.c and sysfs-platform-profile.rst
+ * documentation.
+ */
+
+enum platform_profile_option {
+ PLATFORM_PROFILE_LOW_POWER,
+ PLATFORM_PROFILE_COOL,
+ PLATFORM_PROFILE_QUIET,
+ PLATFORM_PROFILE_BALANCED,
+ PLATFORM_PROFILE_PERFORMANCE,
+ PLATFORM_PROFILE_LAST, /*must always be last */
+};
+
+struct platform_profile_handler {
+ unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
+ int (*profile_get)(struct platform_profile_handler *pprof,
+ enum platform_profile_option *profile);
+ int (*profile_set)(struct platform_profile_handler *pprof,
+ enum platform_profile_option profile);
+};
+
+int platform_profile_register(struct platform_profile_handler *pprof);
+int platform_profile_remove(void);
+void platform_profile_notify(void);
+
+#endif /*_PLATFORM_PROFILE_H_*/