aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2013-07-03 08:48:39 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-15 07:57:00 -0400
commit8b5301c5ff2568236c6e3b3d0c93a3e4194ec3f5 (patch)
treea6db532020f53f2689e6e583a5d3f5f17a80913a
parent1696d9dc57e062ce5200f6a42a6aaada15b434bb (diff)
platform / thinkpad: Remove deprecated hotkey_report_mode parameter
It is somewhat strange that the default value to support the depracated interface is set (1). Anyway this has existed for years. The previous patch already removed the functionality to still export events through /proc. Now this param is useless and should vanish too. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Matthew Garrett <matthew.garrett@nebula.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt73
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c29
2 files changed, 6 insertions, 96 deletions
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index cf7bc6cb9719..86c52360ffe7 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -329,20 +329,6 @@ sysfs notes:
329 329
330 This attribute has poll()/select() support. 330 This attribute has poll()/select() support.
331 331
332 hotkey_report_mode:
333 Returns the state of the procfs ACPI event report mode
334 filter for hot keys. If it is set to 1 (the default),
335 all hot key presses are reported both through the input
336 layer and also as ACPI events through procfs (but not
337 through netlink). If it is set to 2, hot key presses
338 are reported only through the input layer.
339
340 This attribute is read-only in kernels 2.6.23 or later,
341 and read-write on earlier kernels.
342
343 May return -EPERM (write access locked out by module
344 parameter) or -EACCES (read-only).
345
346 wakeup_reason: 332 wakeup_reason:
347 Set to 1 if the system is waking up because the user 333 Set to 1 if the system is waking up because the user
348 requested a bay ejection. Set to 2 if the system is 334 requested a bay ejection. Set to 2 if the system is
@@ -518,24 +504,21 @@ SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A
518Non hotkey ACPI HKEY event map: 504Non hotkey ACPI HKEY event map:
519------------------------------- 505-------------------------------
520 506
521Events that are not propagated by the driver, except for legacy
522compatibility purposes when hotkey_report_mode is set to 1:
523
5240x5001 Lid closed
5250x5002 Lid opened
5260x5009 Tablet swivel: switched to tablet mode
5270x500A Tablet swivel: switched to normal mode
5280x7000 Radio Switch may have changed state
529
530Events that are never propagated by the driver: 507Events that are never propagated by the driver:
531 508
5320x2304 System is waking up from suspend to undock 5090x2304 System is waking up from suspend to undock
5330x2305 System is waking up from suspend to eject bay 5100x2305 System is waking up from suspend to eject bay
5340x2404 System is waking up from hibernation to undock 5110x2404 System is waking up from hibernation to undock
5350x2405 System is waking up from hibernation to eject bay 5120x2405 System is waking up from hibernation to eject bay
5130x5001 Lid closed
5140x5002 Lid opened
5150x5009 Tablet swivel: switched to tablet mode
5160x500A Tablet swivel: switched to normal mode
5360x5010 Brightness level changed/control event 5170x5010 Brightness level changed/control event
5370x6000 KEYBOARD: Numlock key pressed 5180x6000 KEYBOARD: Numlock key pressed
5380x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED) 5190x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED)
5200x7000 Radio Switch may have changed state
521
539 522
540Events that are propagated by the driver to userspace: 523Events that are propagated by the driver to userspace:
541 524
@@ -574,50 +557,6 @@ operating system is to force either an immediate suspend or hibernate
574cycle, or a system shutdown. Obviously, something is very wrong if this 557cycle, or a system shutdown. Obviously, something is very wrong if this
575happens. 558happens.
576 559
577Compatibility notes:
578
579ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
580supported the input layer, and sent events over the procfs ACPI event
581interface.
582
583To avoid sending duplicate events over the input layer and the ACPI
584event interface, thinkpad-acpi 0.16 implements a module parameter
585(hotkey_report_mode), and also a sysfs device attribute with the same
586name.
587
588Make no mistake here: userspace is expected to switch to using the input
589layer interface of thinkpad-acpi, together with the ACPI netlink event
590interface in kernels 2.6.23 and later, or with the ACPI procfs event
591interface in kernels 2.6.22 and earlier.
592
593If no hotkey_report_mode module parameter is specified (or it is set to
594zero), the driver defaults to mode 1 (see below), and on kernels 2.6.22
595and earlier, also allows one to change the hotkey_report_mode through
596sysfs. In kernels 2.6.23 and later, where the netlink ACPI event
597interface is available, hotkey_report_mode cannot be changed through
598sysfs (it is read-only).
599
600If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
601be changed later through sysfs (any writes will return -EPERM to signal
602that hotkey_report_mode was locked. On 2.6.23 and later, where
603hotkey_report_mode cannot be changed at all, writes will return -EACCES).
604
605hotkey_report_mode set to 1 makes the driver export through the procfs
606ACPI event interface all hot key presses (which are *also* sent to the
607input layer). This is a legacy compatibility behaviour, and it is also
608the default mode of operation for the driver.
609
610hotkey_report_mode set to 2 makes the driver filter out the hot key
611presses from the procfs ACPI event interface, so these events will only
612be sent through the input layer. Userspace that has been updated to use
613the thinkpad-acpi input layer interface should set hotkey_report_mode to
6142.
615
616Hot key press events are never sent to the ACPI netlink event interface.
617Really up-to-date userspace under kernel 2.6.23 and later is to use the
618netlink interface and the input layer interface, and don't bother at all
619with hotkey_report_mode.
620
621 560
622Brightness hotkey notes: 561Brightness hotkey notes:
623 562
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index e946c0d58a97..be67e5e28d18 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2022,8 +2022,6 @@ static u32 hotkey_driver_mask; /* events needed by the driver */
2022static u32 hotkey_user_mask; /* events visible to userspace */ 2022static u32 hotkey_user_mask; /* events visible to userspace */
2023static u32 hotkey_acpi_mask; /* events enabled in firmware */ 2023static u32 hotkey_acpi_mask; /* events enabled in firmware */
2024 2024
2025static unsigned int hotkey_report_mode;
2026
2027static u16 *hotkey_keycode_map; 2025static u16 *hotkey_keycode_map;
2028 2026
2029static struct attribute_set *hotkey_dev_attributes; 2027static struct attribute_set *hotkey_dev_attributes;
@@ -2878,18 +2876,6 @@ static void hotkey_tablet_mode_notify_change(void)
2878 "hotkey_tablet_mode"); 2876 "hotkey_tablet_mode");
2879} 2877}
2880 2878
2881/* sysfs hotkey report_mode -------------------------------------------- */
2882static ssize_t hotkey_report_mode_show(struct device *dev,
2883 struct device_attribute *attr,
2884 char *buf)
2885{
2886 return snprintf(buf, PAGE_SIZE, "%d\n",
2887 (hotkey_report_mode != 0) ? hotkey_report_mode : 1);
2888}
2889
2890static struct device_attribute dev_attr_hotkey_report_mode =
2891 __ATTR(hotkey_report_mode, S_IRUGO, hotkey_report_mode_show, NULL);
2892
2893/* sysfs wakeup reason (pollable) -------------------------------------- */ 2879/* sysfs wakeup reason (pollable) -------------------------------------- */
2894static ssize_t hotkey_wakeup_reason_show(struct device *dev, 2880static ssize_t hotkey_wakeup_reason_show(struct device *dev,
2895 struct device_attribute *attr, 2881 struct device_attribute *attr,
@@ -2931,7 +2917,6 @@ static struct attribute *hotkey_attributes[] __initdata = {
2931 &dev_attr_hotkey_enable.attr, 2917 &dev_attr_hotkey_enable.attr,
2932 &dev_attr_hotkey_bios_enabled.attr, 2918 &dev_attr_hotkey_bios_enabled.attr,
2933 &dev_attr_hotkey_bios_mask.attr, 2919 &dev_attr_hotkey_bios_mask.attr,
2934 &dev_attr_hotkey_report_mode.attr,
2935 &dev_attr_hotkey_wakeup_reason.attr, 2920 &dev_attr_hotkey_wakeup_reason.attr,
2936 &dev_attr_hotkey_wakeup_hotunplug_complete.attr, 2921 &dev_attr_hotkey_wakeup_hotunplug_complete.attr,
2937 &dev_attr_hotkey_mask.attr, 2922 &dev_attr_hotkey_mask.attr,
@@ -3435,11 +3420,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3435 "initial masks: user=0x%08x, fw=0x%08x, poll=0x%08x\n", 3420 "initial masks: user=0x%08x, fw=0x%08x, poll=0x%08x\n",
3436 hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask); 3421 hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask);
3437 3422
3438 dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
3439 "legacy ibm/hotkey event reporting over procfs %s\n",
3440 (hotkey_report_mode < 2) ?
3441 "enabled" : "disabled");
3442
3443 tpacpi_inputdev->open = &hotkey_inputdev_open; 3423 tpacpi_inputdev->open = &hotkey_inputdev_open;
3444 tpacpi_inputdev->close = &hotkey_inputdev_close; 3424 tpacpi_inputdev->close = &hotkey_inputdev_close;
3445 3425
@@ -8829,11 +8809,6 @@ module_param(brightness_enable, uint, 0444);
8829MODULE_PARM_DESC(brightness_enable, 8809MODULE_PARM_DESC(brightness_enable,
8830 "Enables backlight control when 1, disables when 0"); 8810 "Enables backlight control when 1, disables when 0");
8831 8811
8832module_param(hotkey_report_mode, uint, 0444);
8833MODULE_PARM_DESC(hotkey_report_mode,
8834 "used for backwards compatibility with userspace, "
8835 "see documentation");
8836
8837#ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT 8812#ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT
8838module_param_named(volume_mode, volume_mode, uint, 0444); 8813module_param_named(volume_mode, volume_mode, uint, 0444);
8839MODULE_PARM_DESC(volume_mode, 8814MODULE_PARM_DESC(volume_mode,
@@ -8964,10 +8939,6 @@ static int __init thinkpad_acpi_module_init(void)
8964 8939
8965 tpacpi_lifecycle = TPACPI_LIFE_INIT; 8940 tpacpi_lifecycle = TPACPI_LIFE_INIT;
8966 8941
8967 /* Parameter checking */
8968 if (hotkey_report_mode > 2)
8969 return -EINVAL;
8970
8971 /* Driver-level probe */ 8942 /* Driver-level probe */
8972 8943
8973 ret = get_thinkpad_model_data(&thinkpad_id); 8944 ret = get_thinkpad_model_data(&thinkpad_id);