diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/olpc/olpc-ec.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 4 | ||||
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 16 | ||||
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 12 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 40 | ||||
-rw-r--r-- | drivers/platform/x86/wmi.c | 10 |
9 files changed, 13 insertions, 76 deletions
diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c index 0f9f8596b300..f9119525f557 100644 --- a/drivers/platform/olpc/olpc-ec.c +++ b/drivers/platform/olpc/olpc-ec.c | |||
@@ -330,7 +330,7 @@ static int __init olpc_ec_init_module(void) | |||
330 | return platform_driver_register(&olpc_ec_plat_driver); | 330 | return platform_driver_register(&olpc_ec_plat_driver); |
331 | } | 331 | } |
332 | 332 | ||
333 | module_init(olpc_ec_init_module); | 333 | arch_initcall(olpc_ec_init_module); |
334 | 334 | ||
335 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); | 335 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
336 | MODULE_LICENSE("GPL"); | 336 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 8e268da6fdbd..0e9c169b42f8 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -1543,7 +1543,6 @@ static void asus_acpi_notify(struct acpi_device *device, u32 event) | |||
1543 | 1543 | ||
1544 | /* TODO Find a better way to handle events count. */ | 1544 | /* TODO Find a better way to handle events count. */ |
1545 | count = asus->event_count[event % 128]++; | 1545 | count = asus->event_count[event % 128]++; |
1546 | acpi_bus_generate_proc_event(asus->device, event, count); | ||
1547 | acpi_bus_generate_netlink_event(asus->device->pnp.device_class, | 1546 | acpi_bus_generate_netlink_event(asus->device->pnp.device_class, |
1548 | dev_name(&asus->device->dev), event, | 1547 | dev_name(&asus->device->dev), event, |
1549 | count); | 1548 | count); |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 5d26e70bed6c..a6afd4108beb 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -1269,7 +1269,6 @@ static void eeepc_acpi_notify(struct acpi_device *device, u32 event) | |||
1269 | if (event > ACPI_MAX_SYS_NOTIFY) | 1269 | if (event > ACPI_MAX_SYS_NOTIFY) |
1270 | return; | 1270 | return; |
1271 | count = eeepc->event_count[event % 128]++; | 1271 | count = eeepc->event_count[event % 128]++; |
1272 | acpi_bus_generate_proc_event(device, event, count); | ||
1273 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 1272 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
1274 | dev_name(&device->dev), event, | 1273 | dev_name(&device->dev), event, |
1275 | count); | 1274 | count); |
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 1c9386e7c58c..52b8a97efde1 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -773,8 +773,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event) | |||
773 | else | 773 | else |
774 | set_lcd_level(newb); | 774 | set_lcd_level(newb); |
775 | } | 775 | } |
776 | acpi_bus_generate_proc_event(fujitsu->dev, | ||
777 | ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS, 0); | ||
778 | keycode = KEY_BRIGHTNESSUP; | 776 | keycode = KEY_BRIGHTNESSUP; |
779 | } else if (oldb > newb) { | 777 | } else if (oldb > newb) { |
780 | if (disable_brightness_adjust != 1) { | 778 | if (disable_brightness_adjust != 1) { |
@@ -783,8 +781,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event) | |||
783 | else | 781 | else |
784 | set_lcd_level(newb); | 782 | set_lcd_level(newb); |
785 | } | 783 | } |
786 | acpi_bus_generate_proc_event(fujitsu->dev, | ||
787 | ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS, 0); | ||
788 | keycode = KEY_BRIGHTNESSDOWN; | 784 | keycode = KEY_BRIGHTNESSDOWN; |
789 | } | 785 | } |
790 | break; | 786 | break; |
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 97bb05edcb5a..d6970f47ae72 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -53,7 +53,6 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); | |||
53 | #define HPWMI_ALS_QUERY 0x3 | 53 | #define HPWMI_ALS_QUERY 0x3 |
54 | #define HPWMI_HARDWARE_QUERY 0x4 | 54 | #define HPWMI_HARDWARE_QUERY 0x4 |
55 | #define HPWMI_WIRELESS_QUERY 0x5 | 55 | #define HPWMI_WIRELESS_QUERY 0x5 |
56 | #define HPWMI_BIOS_QUERY 0x9 | ||
57 | #define HPWMI_HOTKEY_QUERY 0xc | 56 | #define HPWMI_HOTKEY_QUERY 0xc |
58 | #define HPWMI_WIRELESS2_QUERY 0x1b | 57 | #define HPWMI_WIRELESS2_QUERY 0x1b |
59 | #define HPWMI_POSTCODEERROR_QUERY 0x2a | 58 | #define HPWMI_POSTCODEERROR_QUERY 0x2a |
@@ -293,19 +292,6 @@ static int hp_wmi_tablet_state(void) | |||
293 | return (state & 0x4) ? 1 : 0; | 292 | return (state & 0x4) ? 1 : 0; |
294 | } | 293 | } |
295 | 294 | ||
296 | static int hp_wmi_enable_hotkeys(void) | ||
297 | { | ||
298 | int ret; | ||
299 | int query = 0x6e; | ||
300 | |||
301 | ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &query, sizeof(query), | ||
302 | 0); | ||
303 | |||
304 | if (ret) | ||
305 | return -EINVAL; | ||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | static int hp_wmi_set_block(void *data, bool blocked) | 295 | static int hp_wmi_set_block(void *data, bool blocked) |
310 | { | 296 | { |
311 | enum hp_wmi_radio r = (enum hp_wmi_radio) data; | 297 | enum hp_wmi_radio r = (enum hp_wmi_radio) data; |
@@ -1009,8 +995,6 @@ static int __init hp_wmi_init(void) | |||
1009 | err = hp_wmi_input_setup(); | 995 | err = hp_wmi_input_setup(); |
1010 | if (err) | 996 | if (err) |
1011 | return err; | 997 | return err; |
1012 | |||
1013 | hp_wmi_enable_hotkeys(); | ||
1014 | } | 998 | } |
1015 | 999 | ||
1016 | if (bios_capable) { | 1000 | if (bios_capable) { |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 4add9a31bf60..984253da365d 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -464,9 +464,6 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) | |||
464 | "error getting hotkey status\n")); | 464 | "error getting hotkey status\n")); |
465 | return; | 465 | return; |
466 | } | 466 | } |
467 | |||
468 | acpi_bus_generate_proc_event(pcc->device, HKEY_NOTIFY, result); | ||
469 | |||
470 | if (!sparse_keymap_report_event(hotk_input_dev, | 467 | if (!sparse_keymap_report_event(hotk_input_dev, |
471 | result & 0xf, result & 0x80, false)) | 468 | result & 0xf, result & 0x80, false)) |
472 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 469 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 2ac045f27f10..d3fd52036fd6 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -1275,9 +1275,6 @@ static void sony_nc_notify(struct acpi_device *device, u32 event) | |||
1275 | ev_type = HOTKEY; | 1275 | ev_type = HOTKEY; |
1276 | sony_laptop_report_input_event(real_ev); | 1276 | sony_laptop_report_input_event(real_ev); |
1277 | } | 1277 | } |
1278 | |||
1279 | acpi_bus_generate_proc_event(sony_nc_acpi_device, ev_type, real_ev); | ||
1280 | |||
1281 | acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class, | 1278 | acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class, |
1282 | dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev); | 1279 | dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev); |
1283 | } | 1280 | } |
@@ -2440,7 +2437,10 @@ static ssize_t sony_nc_gfx_switch_status_show(struct device *dev, | |||
2440 | if (pos < 0) | 2437 | if (pos < 0) |
2441 | return pos; | 2438 | return pos; |
2442 | 2439 | ||
2443 | return snprintf(buffer, PAGE_SIZE, "%s\n", pos ? "speed" : "stamina"); | 2440 | return snprintf(buffer, PAGE_SIZE, "%s\n", |
2441 | pos == SPEED ? "speed" : | ||
2442 | pos == STAMINA ? "stamina" : | ||
2443 | pos == AUTO ? "auto" : "unknown"); | ||
2444 | } | 2444 | } |
2445 | 2445 | ||
2446 | static int sony_nc_gfx_switch_setup(struct platform_device *pd, | 2446 | static int sony_nc_gfx_switch_setup(struct platform_device *pd, |
@@ -4243,7 +4243,6 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id) | |||
4243 | 4243 | ||
4244 | found: | 4244 | found: |
4245 | sony_laptop_report_input_event(device_event); | 4245 | sony_laptop_report_input_event(device_event); |
4246 | acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event); | ||
4247 | sonypi_compat_report_event(device_event); | 4246 | sonypi_compat_report_event(device_event); |
4248 | return IRQ_HANDLED; | 4247 | return IRQ_HANDLED; |
4249 | } | 4248 | } |
@@ -4320,7 +4319,8 @@ static int sony_pic_add(struct acpi_device *device) | |||
4320 | goto err_free_resources; | 4319 | goto err_free_resources; |
4321 | } | 4320 | } |
4322 | 4321 | ||
4323 | if (sonypi_compat_init()) | 4322 | result = sonypi_compat_init(); |
4323 | if (result) | ||
4324 | goto err_remove_input; | 4324 | goto err_remove_input; |
4325 | 4325 | ||
4326 | /* request io port */ | 4326 | /* request io port */ |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 54d31c0a9840..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 */ | |||
2022 | static u32 hotkey_user_mask; /* events visible to userspace */ | 2022 | static u32 hotkey_user_mask; /* events visible to userspace */ |
2023 | static u32 hotkey_acpi_mask; /* events enabled in firmware */ | 2023 | static u32 hotkey_acpi_mask; /* events enabled in firmware */ |
2024 | 2024 | ||
2025 | static unsigned int hotkey_report_mode; | ||
2026 | |||
2027 | static u16 *hotkey_keycode_map; | 2025 | static u16 *hotkey_keycode_map; |
2028 | 2026 | ||
2029 | static struct attribute_set *hotkey_dev_attributes; | 2027 | static struct attribute_set *hotkey_dev_attributes; |
@@ -2282,10 +2280,6 @@ static struct tp_acpi_drv_struct ibm_hotkey_acpidriver; | |||
2282 | static void tpacpi_hotkey_send_key(unsigned int scancode) | 2280 | static void tpacpi_hotkey_send_key(unsigned int scancode) |
2283 | { | 2281 | { |
2284 | tpacpi_input_send_key_masked(scancode); | 2282 | tpacpi_input_send_key_masked(scancode); |
2285 | if (hotkey_report_mode < 2) { | ||
2286 | acpi_bus_generate_proc_event(ibm_hotkey_acpidriver.device, | ||
2287 | 0x80, TP_HKEY_EV_HOTKEY_BASE + scancode); | ||
2288 | } | ||
2289 | } | 2283 | } |
2290 | 2284 | ||
2291 | static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) | 2285 | static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) |
@@ -2882,18 +2876,6 @@ static void hotkey_tablet_mode_notify_change(void) | |||
2882 | "hotkey_tablet_mode"); | 2876 | "hotkey_tablet_mode"); |
2883 | } | 2877 | } |
2884 | 2878 | ||
2885 | /* sysfs hotkey report_mode -------------------------------------------- */ | ||
2886 | static ssize_t hotkey_report_mode_show(struct device *dev, | ||
2887 | struct device_attribute *attr, | ||
2888 | char *buf) | ||
2889 | { | ||
2890 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
2891 | (hotkey_report_mode != 0) ? hotkey_report_mode : 1); | ||
2892 | } | ||
2893 | |||
2894 | static struct device_attribute dev_attr_hotkey_report_mode = | ||
2895 | __ATTR(hotkey_report_mode, S_IRUGO, hotkey_report_mode_show, NULL); | ||
2896 | |||
2897 | /* sysfs wakeup reason (pollable) -------------------------------------- */ | 2879 | /* sysfs wakeup reason (pollable) -------------------------------------- */ |
2898 | static ssize_t hotkey_wakeup_reason_show(struct device *dev, | 2880 | static ssize_t hotkey_wakeup_reason_show(struct device *dev, |
2899 | struct device_attribute *attr, | 2881 | struct device_attribute *attr, |
@@ -2935,7 +2917,6 @@ static struct attribute *hotkey_attributes[] __initdata = { | |||
2935 | &dev_attr_hotkey_enable.attr, | 2917 | &dev_attr_hotkey_enable.attr, |
2936 | &dev_attr_hotkey_bios_enabled.attr, | 2918 | &dev_attr_hotkey_bios_enabled.attr, |
2937 | &dev_attr_hotkey_bios_mask.attr, | 2919 | &dev_attr_hotkey_bios_mask.attr, |
2938 | &dev_attr_hotkey_report_mode.attr, | ||
2939 | &dev_attr_hotkey_wakeup_reason.attr, | 2920 | &dev_attr_hotkey_wakeup_reason.attr, |
2940 | &dev_attr_hotkey_wakeup_hotunplug_complete.attr, | 2921 | &dev_attr_hotkey_wakeup_hotunplug_complete.attr, |
2941 | &dev_attr_hotkey_mask.attr, | 2922 | &dev_attr_hotkey_mask.attr, |
@@ -3439,11 +3420,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
3439 | "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", |
3440 | hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask); | 3421 | hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask); |
3441 | 3422 | ||
3442 | dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY, | ||
3443 | "legacy ibm/hotkey event reporting over procfs %s\n", | ||
3444 | (hotkey_report_mode < 2) ? | ||
3445 | "enabled" : "disabled"); | ||
3446 | |||
3447 | tpacpi_inputdev->open = &hotkey_inputdev_open; | 3423 | tpacpi_inputdev->open = &hotkey_inputdev_open; |
3448 | tpacpi_inputdev->close = &hotkey_inputdev_close; | 3424 | tpacpi_inputdev->close = &hotkey_inputdev_close; |
3449 | 3425 | ||
@@ -3737,13 +3713,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
3737 | "event happened to %s\n", TPACPI_MAIL); | 3713 | "event happened to %s\n", TPACPI_MAIL); |
3738 | } | 3714 | } |
3739 | 3715 | ||
3740 | /* Legacy events */ | ||
3741 | if (!ignore_acpi_ev && | ||
3742 | (send_acpi_ev || hotkey_report_mode < 2)) { | ||
3743 | acpi_bus_generate_proc_event(ibm->acpi->device, | ||
3744 | event, hkey); | ||
3745 | } | ||
3746 | |||
3747 | /* netlink events */ | 3716 | /* netlink events */ |
3748 | if (!ignore_acpi_ev && send_acpi_ev) { | 3717 | if (!ignore_acpi_ev && send_acpi_ev) { |
3749 | acpi_bus_generate_netlink_event( | 3718 | acpi_bus_generate_netlink_event( |
@@ -8840,11 +8809,6 @@ module_param(brightness_enable, uint, 0444); | |||
8840 | MODULE_PARM_DESC(brightness_enable, | 8809 | MODULE_PARM_DESC(brightness_enable, |
8841 | "Enables backlight control when 1, disables when 0"); | 8810 | "Enables backlight control when 1, disables when 0"); |
8842 | 8811 | ||
8843 | module_param(hotkey_report_mode, uint, 0444); | ||
8844 | MODULE_PARM_DESC(hotkey_report_mode, | ||
8845 | "used for backwards compatibility with userspace, " | ||
8846 | "see documentation"); | ||
8847 | |||
8848 | #ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT | 8812 | #ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT |
8849 | module_param_named(volume_mode, volume_mode, uint, 0444); | 8813 | module_param_named(volume_mode, volume_mode, uint, 0444); |
8850 | MODULE_PARM_DESC(volume_mode, | 8814 | MODULE_PARM_DESC(volume_mode, |
@@ -8975,10 +8939,6 @@ static int __init thinkpad_acpi_module_init(void) | |||
8975 | 8939 | ||
8976 | tpacpi_lifecycle = TPACPI_LIFE_INIT; | 8940 | tpacpi_lifecycle = TPACPI_LIFE_INIT; |
8977 | 8941 | ||
8978 | /* Parameter checking */ | ||
8979 | if (hotkey_report_mode > 2) | ||
8980 | return -EINVAL; | ||
8981 | |||
8982 | /* Driver-level probe */ | 8942 | /* Driver-level probe */ |
8983 | 8943 | ||
8984 | ret = get_thinkpad_model_data(&thinkpad_id); | 8944 | ret = get_thinkpad_model_data(&thinkpad_id); |
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index b13344c59808..6e02c953d888 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -693,11 +693,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
693 | 693 | ||
694 | return sprintf(buf, "wmi:%s\n", guid_string); | 694 | return sprintf(buf, "wmi:%s\n", guid_string); |
695 | } | 695 | } |
696 | static DEVICE_ATTR_RO(modalias); | ||
696 | 697 | ||
697 | static struct device_attribute wmi_dev_attrs[] = { | 698 | static struct attribute *wmi_attrs[] = { |
698 | __ATTR_RO(modalias), | 699 | &dev_attr_modalias.attr, |
699 | __ATTR_NULL | 700 | NULL, |
700 | }; | 701 | }; |
702 | ATTRIBUTE_GROUPS(wmi); | ||
701 | 703 | ||
702 | static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) | 704 | static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) |
703 | { | 705 | { |
@@ -732,7 +734,7 @@ static struct class wmi_class = { | |||
732 | .name = "wmi", | 734 | .name = "wmi", |
733 | .dev_release = wmi_dev_free, | 735 | .dev_release = wmi_dev_free, |
734 | .dev_uevent = wmi_dev_uevent, | 736 | .dev_uevent = wmi_dev_uevent, |
735 | .dev_attrs = wmi_dev_attrs, | 737 | .dev_groups = wmi_groups, |
736 | }; | 738 | }; |
737 | 739 | ||
738 | static int wmi_create_device(const struct guid_block *gblock, | 740 | static int wmi_create_device(const struct guid_block *gblock, |