• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/acpi/

Lines Matching refs:hotk

68  * Flags for hotk status
112 * about the hotk device
116 acpi_handle handle; //the handle of the hotk device
117 char status; //status of the hotk, for LEDs, ...
421 * available before the hotk
426 static struct asus_hotk *hotk;
499 hotk->methods->name);
506 if (read_acpi_int(hotk->handle, "SFUN", &temp))
516 if (read_acpi_int(hotk->handle, "ASYM", &temp))
560 return (hotk->status & ledmask) ? 1 : 0;
589 hotk->status =
590 (led_out) ? (hotk->status | ledmask) : (hotk->status & ~ledmask);
595 if (!write_acpi_int(hotk->handle, ledname, led_out, NULL))
610 read_led(hotk->methods->mled_status, MLED_ON));
617 return write_led(buffer, count, hotk->methods->mt_mled, MLED_ON, 1);
627 return sprintf(page, "0x%08x\n", hotk->ledd_status);
639 (hotk->handle, hotk->methods->mt_ledd, value, NULL))
643 hotk->ledd_status = (u32) value;
656 read_led(hotk->methods->wled_status, WLED_ON));
663 return write_led(buffer, count, hotk->methods->mt_wled, WLED_ON, 0);
673 return sprintf(page, "%d\n", read_led(hotk->methods->bt_status, BT_ON));
682 return write_led(buffer, count, hotk->methods->mt_bt_switch, BT_ON, 0);
693 read_led(hotk->methods->tled_status, TLED_ON));
700 return write_led(buffer, count, hotk->methods->mt_tled, TLED_ON, 0);
707 if (hotk->model != L3H) {
709 if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
713 if (hotk->model == L2D)
735 acpi_evaluate_object(NULL, hotk->methods->lcd_status,
755 if (hotk->model != L3H) {
758 hotk->methods->mt_lcd_switch,
762 (hotk->handle, hotk->methods->mt_lcd_switch, 0x07,
798 if (hotk->methods->brightness_get) { /* SPLV/GPLV laptop */
799 if (!read_acpi_int(hotk->handle, hotk->methods->brightness_get,
803 } else if (hotk->methods->brightness_status) { /* For D1 for example */
804 if (!read_acpi_int(NULL, hotk->methods->brightness_status,
809 value = hotk->brightness;
822 if (hotk->methods->brightness_set) {
823 if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set,
835 hotk->methods->brightness_up :
836 hotk->methods->brightness_down,
878 if (!write_acpi_int(hotk->handle, hotk->methods->display_set,
894 if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value))
979 if (hotk->methods->mt_wled) {
984 if (hotk->methods->mt_ledd) {
989 if (hotk->methods->mt_mled) {
994 if (hotk->methods->mt_tled) {
999 if (hotk->methods->mt_bt_switch) {
1008 if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status) {
1013 if ((hotk->methods->brightness_up && hotk->methods->brightness_down) ||
1014 (hotk->methods->brightness_get && hotk->methods->brightness_set)) {
1019 if (hotk->methods->display_set) {
1031 if (hotk->methods->mt_wled)
1033 if (hotk->methods->mt_mled)
1035 if (hotk->methods->mt_tled)
1037 if (hotk->methods->mt_ledd)
1039 if (hotk->methods->mt_bt_switch)
1041 if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status)
1043 if ((hotk->methods->brightness_up
1044 && hotk->methods->brightness_down)
1045 || (hotk->methods->brightness_get
1046 && hotk->methods->brightness_set))
1048 if (hotk->methods->display_set)
1057 if (!hotk)
1061 hotk->brightness = (event & ~((u32) BR_UP));
1063 hotk->brightness = (event & ~((u32) BR_DOWN));
1066 acpi_bus_generate_event(hotk->device, event,
1067 hotk->event_count[event % 128]++);
1136 * This function is used to initialize the hotk with right values. In this
1137 * method, we can make all the detection we want, and modify the hotk struct
1160 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
1166 if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result))
1192 hotk->model = asus_model_match(string);
1193 if (hotk->model == END_MODEL) { /* match failed */
1196 hotk->model = P30;
1200 hotk->model = M2E;
1206 hotk->methods = &model_conf[hotk->model];
1209 hotk->methods = &model_conf[hotk->model];
1214 hotk->methods->lcd_status = NULL;
1218 hotk->methods->lcd_status = "\\BLFG";
1223 hotk->methods->mt_mled = NULL;
1226 hotk->methods->mt_wled = NULL;
1231 hotk->methods->mt_wled = "WLED";
1235 hotk->methods->mled_status = NULL;
1248 result = acpi_bus_get_status(hotk->device);
1252 if (hotk->device->status.present) {
1275 hotk = kzalloc(sizeof(struct asus_hotk), GFP_KERNEL);
1276 if (!hotk)
1279 hotk->handle = device->handle;
1282 acpi_driver_data(device) = hotk;
1283 hotk->device = device;
1294 * We install the handler, it will receive the hotk in parameter, so, we
1295 * could add other data to the hotk struct
1297 status = acpi_install_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY,
1298 asus_hotk_notify, hotk);
1302 /* For laptops without GPLV: init the hotk->brightness value */
1303 if ((!hotk->methods->brightness_get)
1304 && (!hotk->methods->brightness_status)
1305 && (hotk->methods->brightness_up && hotk->methods->brightness_down)) {
1307 acpi_evaluate_object(NULL, hotk->methods->brightness_down,
1314 hotk->methods->brightness_up,
1325 hotk->ledd_status = 0xFFF;
1329 kfree(hotk);
1342 status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY,
1349 kfree(hotk);