|
Lines 64-71
Link Here
|
| 64 |
#define VOLUME_CHANGED 0x04 |
64 |
#define VOLUME_CHANGED 0x04 |
| 65 |
#define MOUSE_CHANGED 0x08 |
65 |
#define MOUSE_CHANGED 0x08 |
| 66 |
/* |
66 |
/* |
| 67 |
* It is unknown which hotkey this bit is supposed to indicate, but |
67 |
* On the P8010 this indicated a backlight change event when |
| 68 |
* according to values from GSIF this is a valid flag. |
68 |
* Running under a Windows OS that is not Windows 2006 |
|
|
69 |
* We get here by overriding hw.acpi.osname |
| 69 |
*/ |
70 |
*/ |
| 70 |
#define UNKNOWN_CHANGED 0x10 |
71 |
#define UNKNOWN_CHANGED 0x10 |
| 71 |
|
72 |
|
|
Lines 84-89
Link Here
|
| 84 |
#define METHOD_RVOL 6 |
85 |
#define METHOD_RVOL 6 |
| 85 |
#define METHOD_GSIF 7 |
86 |
#define METHOD_GSIF 7 |
| 86 |
#define METHOD_GHKS 8 |
87 |
#define METHOD_GHKS 8 |
|
|
88 |
#define METHOD_GBLS 9 |
| 87 |
|
89 |
|
| 88 |
/* Notify event */ |
90 |
/* Notify event */ |
| 89 |
#define ACPI_NOTIFY_STATUS_CHANGED 0x80 |
91 |
#define ACPI_NOTIFY_STATUS_CHANGED 0x80 |
|
Lines 108-113
Link Here
|
| 108 |
/* Control methods */ |
110 |
/* Control methods */ |
| 109 |
struct int_nameval _sta, /* unused */ |
111 |
struct int_nameval _sta, /* unused */ |
| 110 |
gbll, /* brightness */ |
112 |
gbll, /* brightness */ |
|
|
113 |
gbls, /* get brightness state */ |
| 111 |
ghks, /* hotkey selector */ |
114 |
ghks, /* hotkey selector */ |
| 112 |
gbuf, /* unused (buffer?) */ |
115 |
gbuf, /* unused (buffer?) */ |
| 113 |
gmou, /* mouse */ |
116 |
gmou, /* mouse */ |
|
Lines 189-194
Link Here
|
| 189 |
.description = "Brightness level of the LCD panel" |
192 |
.description = "Brightness level of the LCD panel" |
| 190 |
}, |
193 |
}, |
| 191 |
{ |
194 |
{ |
|
|
195 |
.name = "backlight", |
| 196 |
.method = METHOD_GBLS, |
| 197 |
.description = "P8XXX Backlight State" |
| 198 |
}, |
| 199 |
{ |
| 192 |
.name = "volume", |
200 |
.name = "volume", |
| 193 |
.method = METHOD_GVOL, |
201 |
.method = METHOD_GVOL, |
| 194 |
.description = "Speakers/headphones volume level" |
202 |
.description = "Speakers/headphones volume level" |
|
Lines 358-363
Link Here
|
| 358 |
/* Setup all of the names for each control method */ |
366 |
/* Setup all of the names for each control method */ |
| 359 |
sc->_sta.name = "_STA"; |
367 |
sc->_sta.name = "_STA"; |
| 360 |
sc->gbll.name = "GBLL"; |
368 |
sc->gbll.name = "GBLL"; |
|
|
369 |
sc->gbls.name = "GBLS"; |
| 361 |
sc->ghks.name = "GHKS"; |
370 |
sc->ghks.name = "GHKS"; |
| 362 |
sc->gmou.name = "GMOU"; |
371 |
sc->gmou.name = "GMOU"; |
| 363 |
sc->gsif.name = "GSIF"; |
372 |
sc->gsif.name = "GSIF"; |
|
Lines 386-391
Link Here
|
| 386 |
case METHOD_GBLL: |
395 |
case METHOD_GBLL: |
| 387 |
exists = sc->gbll.exists; |
396 |
exists = sc->gbll.exists; |
| 388 |
break; |
397 |
break; |
|
|
398 |
case METHOD_GBLS: |
| 399 |
exists = sc->gbls.exists; |
| 400 |
break; |
| 389 |
case METHOD_GVOL: |
401 |
case METHOD_GVOL: |
| 390 |
case METHOD_MUTE: |
402 |
case METHOD_MUTE: |
| 391 |
exists = sc->gvol.exists; |
403 |
exists = sc->gvol.exists; |
|
Lines 462-467
Link Here
|
| 462 |
case METHOD_GBLL: |
474 |
case METHOD_GBLL: |
| 463 |
nv = sc->gbll; |
475 |
nv = sc->gbll; |
| 464 |
break; |
476 |
break; |
|
|
477 |
case METHOD_GBLS: |
| 478 |
nv = sc->gbls; |
| 479 |
break; |
| 465 |
case METHOD_GMOU: |
480 |
case METHOD_GMOU: |
| 466 |
nv = sc->gmou; |
481 |
nv = sc->gmou; |
| 467 |
break; |
482 |
break; |
|
Lines 519-524
Link Here
|
| 519 |
control = "SBLL"; |
534 |
control = "SBLL"; |
| 520 |
nv = sc->gbll; |
535 |
nv = sc->gbll; |
| 521 |
break; |
536 |
break; |
|
|
537 |
case METHOD_GBLS: |
| 538 |
changed = BRIGHT_CHANGED; |
| 539 |
control = "SBL2"; |
| 540 |
nv = sc->gbls; |
| 541 |
break; |
| 522 |
case METHOD_GMOU: |
542 |
case METHOD_GMOU: |
| 523 |
changed = MOUSE_CHANGED; |
543 |
changed = MOUSE_CHANGED; |
| 524 |
control = "SMOU"; |
544 |
control = "SMOU"; |
|
Lines 608-613
Link Here
|
| 608 |
} |
628 |
} |
| 609 |
|
629 |
|
| 610 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |
630 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |
|
|
631 |
sc->gbls.name, &val))) { |
| 632 |
sc->gbls.exists = 0; |
| 633 |
} else { |
| 634 |
sc->gbls.exists = 1; |
| 635 |
} |
| 636 |
|
| 637 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |
| 611 |
sc->rbll.name, &val))) { |
638 |
sc->rbll.name, &val))) { |
| 612 |
sc->rbll.exists = 0; |
639 |
sc->rbll.exists = 0; |
| 613 |
} else { |
640 |
} else { |
|
Lines 683-688
Link Here
|
| 683 |
/* Clear the modification bit */ |
710 |
/* Clear the modification bit */ |
| 684 |
sc->gmou.value &= MOUSE_SETTING_BITS; |
711 |
sc->gmou.value &= MOUSE_SETTING_BITS; |
| 685 |
|
712 |
|
|
|
713 |
/* Set the value in case it is not hardware controlled */ |
| 714 |
acpi_fujitsu_method_set(sc, METHOD_GMOU, sc->gmou.value); |
| 715 |
|
| 686 |
acpi_UserNotify("FUJITSU", sc->handle, FN_POINTER_ENABLE); |
716 |
acpi_UserNotify("FUJITSU", sc->handle, FN_POINTER_ENABLE); |
| 687 |
|
717 |
|
| 688 |
ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now %s\n", |
718 |
ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now %s\n", |
|
Lines 690-695
Link Here
|
| 690 |
} |
720 |
} |
| 691 |
} |
721 |
} |
| 692 |
|
722 |
|
|
|
723 |
/* Screen Brightness P8XXX */ |
| 724 |
if(sc->gbls.exists) { |
| 725 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |
| 726 |
sc->gbls.name, &(sc->gbls.value)))) { |
| 727 |
device_printf(sc->dev, "Couldn't query P8XXX brightness level\n"); |
| 728 |
return (FALSE); |
| 729 |
} |
| 730 |
if (changed & BRIGHT_CHANGED) { |
| 731 |
/* No state to record here. */ |
| 732 |
|
| 733 |
/* Clear the modification bit */ |
| 734 |
sc->gbls.value &= BRIGHTNESS_SETTING_BITS; |
| 735 |
|
| 736 |
/* Set the value in case it is not hardware controlled */ |
| 737 |
acpi_fujitsu_method_set(sc, METHOD_GBLS, sc->gbls.value); |
| 738 |
|
| 739 |
acpi_UserNotify("FUJITSU", sc->handle, FN_LCD_BRIGHTNESS); |
| 740 |
|
| 741 |
ACPI_VPRINT(sc->dev, acpi_sc, "P8XXX Brightness level is now %d\n", |
| 742 |
sc->gbls.value); |
| 743 |
} |
| 744 |
} |
| 745 |
|
| 693 |
/* Screen Brightness Level */ |
746 |
/* Screen Brightness Level */ |
| 694 |
if(sc->gbll.exists) { |
747 |
if(sc->gbll.exists) { |
| 695 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |
748 |
if (ACPI_FAILURE(acpi_GetInteger(sc->handle, |