diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
commit | e758936e02700ff88a0b08b722a3847b95283ef2 (patch) | |
tree | 50c919bef1b459a778b85159d5929de95b6c4a01 /drivers/misc | |
parent | 239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff) | |
parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-x86/statfs.h
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/acer-wmi.c | 3 | ||||
-rw-r--r-- | drivers/misc/eeepc-laptop.c | 16 | ||||
-rw-r--r-- | drivers/misc/fujitsu-laptop.c | 7 | ||||
-rw-r--r-- | drivers/misc/hp-wmi.c | 91 | ||||
-rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 3 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 1 |
6 files changed, 79 insertions, 42 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index c6c77a505ec1..d8b0d326e452 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
@@ -1189,7 +1189,7 @@ static int create_debugfs(void) | |||
1189 | return 0; | 1189 | return 0; |
1190 | 1190 | ||
1191 | error_debugfs: | 1191 | error_debugfs: |
1192 | remove_debugfs(); | 1192 | remove_debugfs(); |
1193 | return -ENOMEM; | 1193 | return -ENOMEM; |
1194 | } | 1194 | } |
1195 | 1195 | ||
@@ -1272,6 +1272,7 @@ error_platform_register: | |||
1272 | static void __exit acer_wmi_exit(void) | 1272 | static void __exit acer_wmi_exit(void) |
1273 | { | 1273 | { |
1274 | remove_sysfs(acer_platform_device); | 1274 | remove_sysfs(acer_platform_device); |
1275 | remove_debugfs(); | ||
1275 | platform_device_del(acer_platform_device); | 1276 | platform_device_del(acer_platform_device); |
1276 | platform_driver_unregister(&acer_platform_driver); | 1277 | platform_driver_unregister(&acer_platform_driver); |
1277 | 1278 | ||
diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c index facdb9893c84..1ee8501e90f1 100644 --- a/drivers/misc/eeepc-laptop.c +++ b/drivers/misc/eeepc-laptop.c | |||
@@ -450,12 +450,14 @@ static int eeepc_get_fan_pwm(void) | |||
450 | int value = 0; | 450 | int value = 0; |
451 | 451 | ||
452 | read_acpi_int(NULL, EEEPC_EC_FAN_PWM, &value); | 452 | read_acpi_int(NULL, EEEPC_EC_FAN_PWM, &value); |
453 | value = value * 255 / 100; | ||
453 | return (value); | 454 | return (value); |
454 | } | 455 | } |
455 | 456 | ||
456 | static void eeepc_set_fan_pwm(int value) | 457 | static void eeepc_set_fan_pwm(int value) |
457 | { | 458 | { |
458 | value = SENSORS_LIMIT(value, 0, 100); | 459 | value = SENSORS_LIMIT(value, 0, 255); |
460 | value = value * 100 / 255; | ||
459 | ec_write(EEEPC_EC_SC02, value); | 461 | ec_write(EEEPC_EC_SC02, value); |
460 | } | 462 | } |
461 | 463 | ||
@@ -520,15 +522,23 @@ static ssize_t show_sys_hwmon(int (*get)(void), char *buf) | |||
520 | static SENSOR_DEVICE_ATTR(_name, _mode, show_##_name, store_##_name, 0); | 522 | static SENSOR_DEVICE_ATTR(_name, _mode, show_##_name, store_##_name, 0); |
521 | 523 | ||
522 | EEEPC_CREATE_SENSOR_ATTR(fan1_input, S_IRUGO, eeepc_get_fan_rpm, NULL); | 524 | EEEPC_CREATE_SENSOR_ATTR(fan1_input, S_IRUGO, eeepc_get_fan_rpm, NULL); |
523 | EEEPC_CREATE_SENSOR_ATTR(fan1_pwm, S_IRUGO | S_IWUSR, | 525 | EEEPC_CREATE_SENSOR_ATTR(pwm1, S_IRUGO | S_IWUSR, |
524 | eeepc_get_fan_pwm, eeepc_set_fan_pwm); | 526 | eeepc_get_fan_pwm, eeepc_set_fan_pwm); |
525 | EEEPC_CREATE_SENSOR_ATTR(pwm1_enable, S_IRUGO | S_IWUSR, | 527 | EEEPC_CREATE_SENSOR_ATTR(pwm1_enable, S_IRUGO | S_IWUSR, |
526 | eeepc_get_fan_ctrl, eeepc_set_fan_ctrl); | 528 | eeepc_get_fan_ctrl, eeepc_set_fan_ctrl); |
527 | 529 | ||
530 | static ssize_t | ||
531 | show_name(struct device *dev, struct device_attribute *attr, char *buf) | ||
532 | { | ||
533 | return sprintf(buf, "eeepc\n"); | ||
534 | } | ||
535 | static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0); | ||
536 | |||
528 | static struct attribute *hwmon_attributes[] = { | 537 | static struct attribute *hwmon_attributes[] = { |
529 | &sensor_dev_attr_fan1_pwm.dev_attr.attr, | 538 | &sensor_dev_attr_pwm1.dev_attr.attr, |
530 | &sensor_dev_attr_fan1_input.dev_attr.attr, | 539 | &sensor_dev_attr_fan1_input.dev_attr.attr, |
531 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, | 540 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, |
541 | &sensor_dev_attr_name.dev_attr.attr, | ||
532 | NULL | 542 | NULL |
533 | }; | 543 | }; |
534 | 544 | ||
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c index 7a1ef6c262de..3e56203e4947 100644 --- a/drivers/misc/fujitsu-laptop.c +++ b/drivers/misc/fujitsu-laptop.c | |||
@@ -463,6 +463,13 @@ static struct dmi_system_id __initdata fujitsu_dmi_table[] = { | |||
463 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"), | 463 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"), |
464 | }, | 464 | }, |
465 | .callback = dmi_check_cb_s6410}, | 465 | .callback = dmi_check_cb_s6410}, |
466 | { | ||
467 | .ident = "FUJITSU LifeBook P8010", | ||
468 | .matches = { | ||
469 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
470 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P8010"), | ||
471 | }, | ||
472 | .callback = dmi_check_cb_s6410}, | ||
466 | {} | 473 | {} |
467 | }; | 474 | }; |
468 | 475 | ||
diff --git a/drivers/misc/hp-wmi.c b/drivers/misc/hp-wmi.c index 1dbcbcb323a2..6d407c2a4f91 100644 --- a/drivers/misc/hp-wmi.c +++ b/drivers/misc/hp-wmi.c | |||
@@ -49,6 +49,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); | |||
49 | #define HPWMI_ALS_QUERY 0x3 | 49 | #define HPWMI_ALS_QUERY 0x3 |
50 | #define HPWMI_DOCK_QUERY 0x4 | 50 | #define HPWMI_DOCK_QUERY 0x4 |
51 | #define HPWMI_WIRELESS_QUERY 0x5 | 51 | #define HPWMI_WIRELESS_QUERY 0x5 |
52 | #define HPWMI_HOTKEY_QUERY 0xc | ||
52 | 53 | ||
53 | static int __init hp_wmi_bios_setup(struct platform_device *device); | 54 | static int __init hp_wmi_bios_setup(struct platform_device *device); |
54 | static int __exit hp_wmi_bios_remove(struct platform_device *device); | 55 | static int __exit hp_wmi_bios_remove(struct platform_device *device); |
@@ -69,7 +70,7 @@ struct bios_return { | |||
69 | 70 | ||
70 | struct key_entry { | 71 | struct key_entry { |
71 | char type; /* See KE_* below */ | 72 | char type; /* See KE_* below */ |
72 | u8 code; | 73 | u16 code; |
73 | u16 keycode; | 74 | u16 keycode; |
74 | }; | 75 | }; |
75 | 76 | ||
@@ -79,7 +80,9 @@ static struct key_entry hp_wmi_keymap[] = { | |||
79 | {KE_SW, 0x01, SW_DOCK}, | 80 | {KE_SW, 0x01, SW_DOCK}, |
80 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, | 81 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, |
81 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, | 82 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, |
82 | {KE_KEY, 0x04, KEY_HELP}, | 83 | {KE_KEY, 0x20e6, KEY_PROG1}, |
84 | {KE_KEY, 0x2142, KEY_MEDIA}, | ||
85 | {KE_KEY, 0x231b, KEY_HELP}, | ||
83 | {KE_END, 0} | 86 | {KE_END, 0} |
84 | }; | 87 | }; |
85 | 88 | ||
@@ -177,9 +180,9 @@ static int hp_wmi_wifi_state(void) | |||
177 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 180 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
178 | 181 | ||
179 | if (wireless & 0x100) | 182 | if (wireless & 0x100) |
180 | return 1; | 183 | return RFKILL_STATE_UNBLOCKED; |
181 | else | 184 | else |
182 | return 0; | 185 | return RFKILL_STATE_SOFT_BLOCKED; |
183 | } | 186 | } |
184 | 187 | ||
185 | static int hp_wmi_bluetooth_state(void) | 188 | static int hp_wmi_bluetooth_state(void) |
@@ -187,9 +190,9 @@ static int hp_wmi_bluetooth_state(void) | |||
187 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 190 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
188 | 191 | ||
189 | if (wireless & 0x10000) | 192 | if (wireless & 0x10000) |
190 | return 1; | 193 | return RFKILL_STATE_UNBLOCKED; |
191 | else | 194 | else |
192 | return 0; | 195 | return RFKILL_STATE_SOFT_BLOCKED; |
193 | } | 196 | } |
194 | 197 | ||
195 | static int hp_wmi_wwan_state(void) | 198 | static int hp_wmi_wwan_state(void) |
@@ -197,9 +200,9 @@ static int hp_wmi_wwan_state(void) | |||
197 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 200 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
198 | 201 | ||
199 | if (wireless & 0x1000000) | 202 | if (wireless & 0x1000000) |
200 | return 1; | 203 | return RFKILL_STATE_UNBLOCKED; |
201 | else | 204 | else |
202 | return 0; | 205 | return RFKILL_STATE_SOFT_BLOCKED; |
203 | } | 206 | } |
204 | 207 | ||
205 | static ssize_t show_display(struct device *dev, struct device_attribute *attr, | 208 | static ssize_t show_display(struct device *dev, struct device_attribute *attr, |
@@ -318,6 +321,9 @@ void hp_wmi_notify(u32 value, void *context) | |||
318 | 321 | ||
319 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { | 322 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { |
320 | int eventcode = *((u8 *) obj->buffer.pointer); | 323 | int eventcode = *((u8 *) obj->buffer.pointer); |
324 | if (eventcode == 0x4) | ||
325 | eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0, | ||
326 | 0); | ||
321 | key = hp_wmi_get_entry_by_scancode(eventcode); | 327 | key = hp_wmi_get_entry_by_scancode(eventcode); |
322 | if (key) { | 328 | if (key) { |
323 | switch (key->type) { | 329 | switch (key->type) { |
@@ -338,12 +344,14 @@ void hp_wmi_notify(u32 value, void *context) | |||
338 | } | 344 | } |
339 | } else if (eventcode == 0x5) { | 345 | } else if (eventcode == 0x5) { |
340 | if (wifi_rfkill) | 346 | if (wifi_rfkill) |
341 | wifi_rfkill->state = hp_wmi_wifi_state(); | 347 | rfkill_force_state(wifi_rfkill, |
348 | hp_wmi_wifi_state()); | ||
342 | if (bluetooth_rfkill) | 349 | if (bluetooth_rfkill) |
343 | bluetooth_rfkill->state = | 350 | rfkill_force_state(bluetooth_rfkill, |
344 | hp_wmi_bluetooth_state(); | 351 | hp_wmi_bluetooth_state()); |
345 | if (wwan_rfkill) | 352 | if (wwan_rfkill) |
346 | wwan_rfkill->state = hp_wmi_wwan_state(); | 353 | rfkill_force_state(wwan_rfkill, |
354 | hp_wmi_wwan_state()); | ||
347 | } else | 355 | } else |
348 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", | 356 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", |
349 | eventcode); | 357 | eventcode); |
@@ -398,6 +406,7 @@ static void cleanup_sysfs(struct platform_device *device) | |||
398 | static int __init hp_wmi_bios_setup(struct platform_device *device) | 406 | static int __init hp_wmi_bios_setup(struct platform_device *device) |
399 | { | 407 | { |
400 | int err; | 408 | int err; |
409 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | ||
401 | 410 | ||
402 | err = device_create_file(&device->dev, &dev_attr_display); | 411 | err = device_create_file(&device->dev, &dev_attr_display); |
403 | if (err) | 412 | if (err) |
@@ -412,28 +421,33 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
412 | if (err) | 421 | if (err) |
413 | goto add_sysfs_error; | 422 | goto add_sysfs_error; |
414 | 423 | ||
415 | wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN); | 424 | if (wireless & 0x1) { |
416 | wifi_rfkill->name = "hp-wifi"; | 425 | wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN); |
417 | wifi_rfkill->state = hp_wmi_wifi_state(); | 426 | wifi_rfkill->name = "hp-wifi"; |
418 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; | 427 | wifi_rfkill->state = hp_wmi_wifi_state(); |
419 | wifi_rfkill->user_claim_unsupported = 1; | 428 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; |
420 | 429 | wifi_rfkill->user_claim_unsupported = 1; | |
421 | bluetooth_rfkill = rfkill_allocate(&device->dev, | 430 | rfkill_register(wifi_rfkill); |
422 | RFKILL_TYPE_BLUETOOTH); | 431 | } |
423 | bluetooth_rfkill->name = "hp-bluetooth"; | 432 | |
424 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); | 433 | if (wireless & 0x2) { |
425 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; | 434 | bluetooth_rfkill = rfkill_allocate(&device->dev, |
426 | bluetooth_rfkill->user_claim_unsupported = 1; | 435 | RFKILL_TYPE_BLUETOOTH); |
427 | 436 | bluetooth_rfkill->name = "hp-bluetooth"; | |
428 | wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WIMAX); | 437 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); |
429 | wwan_rfkill->name = "hp-wwan"; | 438 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; |
430 | wwan_rfkill->state = hp_wmi_wwan_state(); | 439 | bluetooth_rfkill->user_claim_unsupported = 1; |
431 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; | 440 | rfkill_register(bluetooth_rfkill); |
432 | wwan_rfkill->user_claim_unsupported = 1; | 441 | } |
433 | 442 | ||
434 | rfkill_register(wifi_rfkill); | 443 | if (wireless & 0x4) { |
435 | rfkill_register(bluetooth_rfkill); | 444 | wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WWAN); |
436 | rfkill_register(wwan_rfkill); | 445 | wwan_rfkill->name = "hp-wwan"; |
446 | wwan_rfkill->state = hp_wmi_wwan_state(); | ||
447 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; | ||
448 | wwan_rfkill->user_claim_unsupported = 1; | ||
449 | rfkill_register(wwan_rfkill); | ||
450 | } | ||
437 | 451 | ||
438 | return 0; | 452 | return 0; |
439 | add_sysfs_error: | 453 | add_sysfs_error: |
@@ -445,9 +459,12 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device) | |||
445 | { | 459 | { |
446 | cleanup_sysfs(device); | 460 | cleanup_sysfs(device); |
447 | 461 | ||
448 | rfkill_unregister(wifi_rfkill); | 462 | if (wifi_rfkill) |
449 | rfkill_unregister(bluetooth_rfkill); | 463 | rfkill_unregister(wifi_rfkill); |
450 | rfkill_unregister(wwan_rfkill); | 464 | if (bluetooth_rfkill) |
465 | rfkill_unregister(bluetooth_rfkill); | ||
466 | if (wwan_rfkill) | ||
467 | rfkill_unregister(wwan_rfkill); | ||
451 | 468 | ||
452 | return 0; | 469 | return 0; |
453 | } | 470 | } |
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 23c91f5f6b61..d61cee796efd 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
@@ -445,6 +445,9 @@ static void __exit gru_exit(void) | |||
445 | int order = get_order(sizeof(struct gru_state) * | 445 | int order = get_order(sizeof(struct gru_state) * |
446 | GRU_CHIPLETS_PER_BLADE); | 446 | GRU_CHIPLETS_PER_BLADE); |
447 | 447 | ||
448 | if (!IS_UV()) | ||
449 | return; | ||
450 | |||
448 | for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++) | 451 | for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++) |
449 | free_irq(IRQ_GRU + i, NULL); | 452 | free_irq(IRQ_GRU + i, NULL); |
450 | 453 | ||
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index d3eb7903c346..6b9300779a43 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -3086,7 +3086,6 @@ static struct ibm_struct wan_driver_data = { | |||
3086 | .read = wan_read, | 3086 | .read = wan_read, |
3087 | .write = wan_write, | 3087 | .write = wan_write, |
3088 | .exit = wan_exit, | 3088 | .exit = wan_exit, |
3089 | .flags.experimental = 1, | ||
3090 | }; | 3089 | }; |
3091 | 3090 | ||
3092 | /************************************************************************* | 3091 | /************************************************************************* |