From: Kurt Borja <kuurtb@gmail.com>
To: kuurtb@gmail.com
Cc: W_Armin@gmx.de, hdegoede@redhat.com,
ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: [PATCH v11 4/5] alienware-wmi: added force module parameters
Date: Tue, 29 Oct 2024 21:11:49 -0300 [thread overview]
Message-ID: <20241030001148.7623-2-kuurtb@gmail.com> (raw)
In-Reply-To: <20241030000904.7205-2-kuurtb@gmail.com>
Added force_platform_profile and force_gmode unsafe module parameters,
allowing users to force `thermal` and `gmode` quirks respectively.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
---
v11:
- Removed unnecessary 'alienware-wmi' in pr_warn
v10:
- Introduced
---
drivers/platform/x86/dell/alienware-wmi.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index 1d62c2ce7..d74c6edef 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -42,6 +42,14 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS("wmi:" LEGACY_CONTROL_GUID);
MODULE_ALIAS("wmi:" WMAX_CONTROL_GUID);
+static bool force_platform_profile;
+module_param_unsafe(force_platform_profile, bool, 0);
+MODULE_PARM_DESC(force_platform_profile, "Forces auto-detecting thermal profiles without checking if WMI thermal backend is available");
+
+static bool force_gmode;
+module_param_unsafe(force_gmode, bool, 0);
+MODULE_PARM_DESC(force_gmode, "Forces G-Mode when performance profile is selected");
+
enum INTERFACE_FLAGS {
LEGACY,
WMAX,
@@ -1075,6 +1083,16 @@ static int __init alienware_wmi_init(void)
if (quirks == NULL)
quirks = &quirk_unknown;
+ if (force_platform_profile)
+ quirks->thermal = true;
+
+ if (force_gmode) {
+ if (quirks->thermal)
+ quirks->gmode = true;
+ else
+ pr_warn("force_gmode requieres platform profile support");
+ }
+
ret = platform_driver_register(&platform_driver);
if (ret)
goto fail_platform_driver;
--
2.47.0
next prev parent reply other threads:[~2024-10-30 0:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 0:09 [PATCH v11 0/5] Dell AWCC platform_profile support Kurt Borja
2024-10-30 0:10 ` [PATCH v11 1/5] alienware-wmi: fixed indentation and clean up Kurt Borja
2024-10-30 0:10 ` [PATCH v11 2/5] alienware-wmi: alienware_wmax_command() is now input size agnostic Kurt Borja
2024-10-30 0:11 ` [PATCH v11 3/5] alienware-wmi: added platform profile support Kurt Borja
2024-10-30 0:11 ` Kurt Borja [this message]
2024-10-30 0:12 ` [PATCH v11 5/5] alienware-wmi: WMAX interface documentation Kurt Borja
2024-10-30 12:10 ` [PATCH v11 0/5] Dell AWCC platform_profile support Ilpo Järvinen
2024-10-30 14:41 ` Kurt Borja
2024-10-30 19:54 ` Armin Wolf
2024-10-30 23:56 ` Kurt Borja
2024-10-31 9:34 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030001148.7623-2-kuurtb@gmail.com \
--to=kuurtb@gmail.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.