diff options
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 24 | 
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 6fe82f805ea8..b3808ad77278 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -10318,6 +10318,7 @@ static atomic_t dytc_ignore_event = ATOMIC_INIT(0);  static DEFINE_MUTEX(dytc_mutex);  static int dytc_capabilities;  static bool dytc_mmc_get_available; +static int profile_force;  static int convert_dytc_to_profile(int funcmode, int dytcmode,  		enum platform_profile_option *profile) @@ -10580,6 +10581,21 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)  	if (err)  		return err; +	/* Check if user wants to override the profile selection */ +	if (profile_force) { +		switch (profile_force) { +		case -1: +			dytc_capabilities = 0; +			break; +		case 1: +			dytc_capabilities = BIT(DYTC_FC_MMC); +			break; +		case 2: +			dytc_capabilities = BIT(DYTC_FC_PSC); +			break; +		} +		pr_debug("Profile selection forced: 0x%x\n", dytc_capabilities); +	}  	if (dytc_capabilities & BIT(DYTC_FC_MMC)) { /* MMC MODE */  		pr_debug("MMC is supported\n");  		/* @@ -10593,11 +10609,6 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)  				dytc_mmc_get_available = true;  		}  	} else if (dytc_capabilities & BIT(DYTC_FC_PSC)) { /* PSC MODE */ -		/* Support for this only works on AMD platforms */ -		if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) { -			dbg_printk(TPACPI_DBG_INIT, "PSC not support on Intel platforms\n"); -			return -ENODEV; -		}  		pr_debug("PSC is supported\n");  	} else {  		dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n"); @@ -11646,6 +11657,9 @@ MODULE_PARM_DESC(uwb_state,  		 "Initial state of the emulated UWB switch");  #endif +module_param(profile_force, int, 0444); +MODULE_PARM_DESC(profile_force, "Force profile mode. -1=off, 1=MMC, 2=PSC"); +  static void thinkpad_acpi_module_exit(void)  {  	struct ibm_struct *ibm, *itmp;  | 
