aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2016-01-25 14:52:18 -0500
committerDarren Hart <dvhart@linux.intel.com>2016-03-23 13:05:37 -0400
commit7faa6a37fa106cb0cad6203e8fc2aea646cb253a (patch)
treef29c9b4684268f011d2e5caa90cd550cfdc1edeb /drivers/platform
parent33f857a441f05b68a55e1f6b3ecf1ea82d6633a4 (diff)
toshiba_acpi: Add a module parameter to disable hotkeys registration
Some laptop models have working hotkeys without the need of the driver to activate them. This patch adds a module parameter to tell the driver not to register the hotkeys. The new parameter is useful in DE less installations or where the DE does not handle the hotkeys (see bug 99501). Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/toshiba_acpi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 5ace1e0fd0bd..df1f1a76a862 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -36,6 +36,7 @@
36 36
37#include <linux/kernel.h> 37#include <linux/kernel.h>
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/moduleparam.h>
39#include <linux/init.h> 40#include <linux/init.h>
40#include <linux/types.h> 41#include <linux/types.h>
41#include <linux/proc_fs.h> 42#include <linux/proc_fs.h>
@@ -220,6 +221,10 @@ struct toshiba_acpi_dev {
220 221
221static struct toshiba_acpi_dev *toshiba_acpi; 222static struct toshiba_acpi_dev *toshiba_acpi;
222 223
224static bool disable_hotkeys;
225module_param(disable_hotkeys, bool, 0444);
226MODULE_PARM_DESC(disable_hotkeys, "Disables the hotkeys activation");
227
223static const struct acpi_device_id toshiba_device_ids[] = { 228static const struct acpi_device_id toshiba_device_ids[] = {
224 {"TOS6200", 0}, 229 {"TOS6200", 0},
225 {"TOS6207", 0}, 230 {"TOS6207", 0},
@@ -2692,6 +2697,11 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
2692 acpi_handle ec_handle; 2697 acpi_handle ec_handle;
2693 int error; 2698 int error;
2694 2699
2700 if (disable_hotkeys) {
2701 pr_info("Hotkeys disabled by module parameter\n");
2702 return 0;
2703 }
2704
2695 if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID)) { 2705 if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID)) {
2696 pr_info("WMI event detected, hotkeys will not be monitored\n"); 2706 pr_info("WMI event detected, hotkeys will not be monitored\n");
2697 return 0; 2707 return 0;