platform: x86: ideapad-laptop: Add allow_v4_dytc module parameter
PATCH 1/1 platform: x86: ideapad-laptop: Add allow_v4_dytc module parameter
Add an allow_v4_dytc module parameter to allow users to easily test if DYTC version 4 platform-profiles work on their laptop.
Signed-off-by Hans de Goede <[email protected]>
--- drivers/platform/x86/ideapad-laptop.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/platform/x86/ideapad-laptop.c +14 -7
@@ -152,6 +152,10 @@ static bool no_bt_rfkill;module_param (no_bt_rfkill, bool,0444 );MODULE_PARM_DESC (no_bt_rfkill,"No rfkill for bluetooth." ); +static bool allow_v4_dytc; +module_param (allow_v4_dytc, bool,0444 ); +MODULE_PARM_DESC (allow_v4_dytc,"Enable DYTC version 4 platform-profile support." ); +/* * ACPI Helpers */
@@ -901,13 +905,16 @@ static int ideapad_dytc_profile_init(struct ideapad_private *priv) dytc_version = (output >>DYTC_QUERY_REV_BIT ) &0xF ; -if (dytc_version <5 ) { -if (dytc_version <4 || !dmi_check_system (ideapad_dytc_v4_allow_table)) { -dev_info (&priv->platform_device->dev, -"DYTC_VERSION is less than 4 or is not allowed: %d\n" , - dytc_version); -return -ENODEV ; - } +if (dytc_version <4 ) { +dev_info (&priv->platform_device->dev,"DYTC_VERSION < 4 is not supported\n" ); +return -ENODEV ; + } + +if (dytc_version <5 && + !(allow_v4_dytc ||dmi_check_system (ideapad_dytc_v4_allow_table))) { +dev_info (&priv->platform_device->dev, +"DYTC_VERSION 4 support may not work. Pass ideapad_laptop.allow_v4_dytc=Y on the kernel commandline to enable\n" ); +return -ENODEV ; } priv->dytc =kzalloc (sizeof (*priv->dytc),GFP_KERNEL );
Signature · 1 line
2.36.0
Hi,
Quoted 5 lines · Hans de Goede
Add an
allow_v4_dytcmodule parameter to allow users to easily test if DYTC version 4 platform-profiles work on their laptop.
I've added this patch to my review-hans branch now.
Regards,
Hans
Quoted 43 lines
--- drivers/platform/x86/ideapad-laptop.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)drivers/platform/x86/ideapad-laptop.c +14
-7@@ -152,6 +152,10 @@ static bool no_bt_rfkill;module_param (no_bt_rfkill, bool,0444 );MODULE_PARM_DESC (no_bt_rfkill,"No rfkill for bluetooth." ); +static bool allow_v4_dytc; +module_param (allow_v4_dytc, bool,0444 ); +MODULE_PARM_DESC (allow_v4_dytc,"Enable DYTC version 4 platform-profile support." ); +/* * ACPI Helpers */ @@ -901,13 +905,16 @@ static int ideapad_dytc_profile_init(struct ideapad_private *priv) dytc_version = (output >>DYTC_QUERY_REV_BIT ) &0xF ; -if (dytc_version <5 ) { -if (dytc_version <4 || !dmi_check_system (ideapad_dytc_v4_allow_table)) { -dev_info (&priv->platform_device->dev, -"DYTC_VERSION is less than 4 or is not allowed: %d\n" , - dytc_version); -return -ENODEV ; - } +if (dytc_version <4 ) { +dev_info (&priv->platform_device->dev,"DYTC_VERSION < 4 is not supported\n" ); +return -ENODEV ; + } + +if (dytc_version <5 && + !(allow_v4_dytc ||dmi_check_system (ideapad_dytc_v4_allow_table))) { +dev_info (&priv->platform_device->dev, +"DYTC_VERSION 4 support may not work. Pass ideapad_laptop.allow_v4_dytc=Y on the kernel commandline to enable\n" ); +return -ENODEV ; } priv->dytc =kzalloc (sizeof (*priv->dytc),GFP_KERNEL );