asus 1144 drivers/hwmon/w83781d.c vendid = asus; asus 219 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus; asus 230 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus; asus 415 drivers/platform/x86/asus-laptop.c static bool asus_check_pega_lucid(struct asus_laptop *asus) asus 417 drivers/platform/x86/asus-laptop.c return !strcmp(asus->name, DEVICE_NAME_PEGA) && asus 418 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_PEGA_ENABLE, NULL) && asus 419 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_PEGA_DISABLE, NULL) && asus 420 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_PEGA_READ, NULL); asus 423 drivers/platform/x86/asus-laptop.c static int asus_pega_lucid_set(struct asus_laptop *asus, int unit, bool enable) asus 426 drivers/platform/x86/asus-laptop.c return write_acpi_int(asus->handle, method, unit); asus 429 drivers/platform/x86/asus-laptop.c static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method) asus 434 drivers/platform/x86/asus-laptop.c acpi_evaluate_integer(asus->handle, method, NULL, &val); asus 452 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(parent); asus 458 drivers/platform/x86/asus-laptop.c if (!asus->pega_acc_live) { asus 459 drivers/platform/x86/asus-laptop.c asus->pega_acc_live = true; asus 467 drivers/platform/x86/asus-laptop.c asus->pega_acc_x = pega_acc_axis(asus, asus->pega_acc_x, METHOD_XLRX); asus 468 drivers/platform/x86/asus-laptop.c asus->pega_acc_y = pega_acc_axis(asus, asus->pega_acc_y, METHOD_XLRY); asus 469 drivers/platform/x86/asus-laptop.c asus->pega_acc_z = pega_acc_axis(asus, asus->pega_acc_z, METHOD_XLRZ); asus 474 drivers/platform/x86/asus-laptop.c input_report_abs(ipd->input, ABS_X, -asus->pega_acc_x); asus 475 drivers/platform/x86/asus-laptop.c input_report_abs(ipd->input, ABS_Y, -asus->pega_acc_y); asus 476 drivers/platform/x86/asus-laptop.c input_report_abs(ipd->input, ABS_Z, asus->pega_acc_z); asus 480 drivers/platform/x86/asus-laptop.c static void pega_accel_exit(struct asus_laptop *asus) asus 482 drivers/platform/x86/asus-laptop.c if (asus->pega_accel_poll) { asus 483 drivers/platform/x86/asus-laptop.c input_unregister_polled_device(asus->pega_accel_poll); asus 484 drivers/platform/x86/asus-laptop.c input_free_polled_device(asus->pega_accel_poll); asus 486 drivers/platform/x86/asus-laptop.c asus->pega_accel_poll = NULL; asus 489 drivers/platform/x86/asus-laptop.c static int pega_accel_init(struct asus_laptop *asus) asus 494 drivers/platform/x86/asus-laptop.c if (!asus->is_pega_lucid) asus 497 drivers/platform/x86/asus-laptop.c if (acpi_check_handle(asus->handle, METHOD_XLRX, NULL) || asus 498 drivers/platform/x86/asus-laptop.c acpi_check_handle(asus->handle, METHOD_XLRY, NULL) || asus 499 drivers/platform/x86/asus-laptop.c acpi_check_handle(asus->handle, METHOD_XLRZ, NULL)) asus 513 drivers/platform/x86/asus-laptop.c ipd->input->dev.parent = &asus->platform_device->dev; asus 528 drivers/platform/x86/asus-laptop.c asus->pega_accel_poll = ipd; asus 537 drivers/platform/x86/asus-laptop.c static int asus_led_set(struct asus_laptop *asus, const char *method, asus 547 drivers/platform/x86/asus-laptop.c return write_acpi_int(asus->handle, method, value); asus 558 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; asus 561 drivers/platform/x86/asus-laptop.c queue_work(asus->led_workqueue, &led->work); asus 567 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; asus 569 drivers/platform/x86/asus-laptop.c asus_led_set(asus, led->method, led->wk); asus 580 drivers/platform/x86/asus-laptop.c static int asus_kled_lvl(struct asus_laptop *asus) asus 592 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, METHOD_KBD_LIGHT_GET, asus 601 drivers/platform/x86/asus-laptop.c static int asus_kled_set(struct asus_laptop *asus, int kblv) asus 608 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_KBD_LIGHT_SET, kblv)) { asus 619 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; asus 622 drivers/platform/x86/asus-laptop.c queue_work(asus->led_workqueue, &led->work); asus 628 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; asus 630 drivers/platform/x86/asus-laptop.c asus_kled_set(asus, led->wk); asus 636 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = led->asus; asus 638 drivers/platform/x86/asus-laptop.c return asus_kled_lvl(asus); asus 641 drivers/platform/x86/asus-laptop.c static void asus_led_exit(struct asus_laptop *asus) asus 643 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->wled.led.dev)) asus 644 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->wled.led); asus 645 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->bled.led.dev)) asus 646 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->bled.led); asus 647 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->mled.led.dev)) asus 648 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->mled.led); asus 649 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->tled.led.dev)) asus 650 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->tled.led); asus 651 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->pled.led.dev)) asus 652 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->pled.led); asus 653 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->rled.led.dev)) asus 654 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->rled.led); asus 655 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->gled.led.dev)) asus 656 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->gled.led); asus 657 drivers/platform/x86/asus-laptop.c if (!IS_ERR_OR_NULL(asus->kled.led.dev)) asus 658 drivers/platform/x86/asus-laptop.c led_classdev_unregister(&asus->kled.led); asus 659 drivers/platform/x86/asus-laptop.c if (asus->led_workqueue) { asus 660 drivers/platform/x86/asus-laptop.c destroy_workqueue(asus->led_workqueue); asus 661 drivers/platform/x86/asus-laptop.c asus->led_workqueue = NULL; asus 666 drivers/platform/x86/asus-laptop.c static int asus_led_register(struct asus_laptop *asus, asus 672 drivers/platform/x86/asus-laptop.c if (!method || acpi_check_handle(asus->handle, method, NULL)) asus 675 drivers/platform/x86/asus-laptop.c led->asus = asus; asus 683 drivers/platform/x86/asus-laptop.c return led_classdev_register(&asus->platform_device->dev, led_cdev); asus 686 drivers/platform/x86/asus-laptop.c static int asus_led_init(struct asus_laptop *asus) asus 694 drivers/platform/x86/asus-laptop.c if (asus->is_pega_lucid) asus 703 drivers/platform/x86/asus-laptop.c asus->led_workqueue = create_singlethread_workqueue("led_workqueue"); asus 704 drivers/platform/x86/asus-laptop.c if (!asus->led_workqueue) asus 707 drivers/platform/x86/asus-laptop.c if (asus->wled_type == TYPE_LED) asus 708 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->wled, "asus::wlan", asus 712 drivers/platform/x86/asus-laptop.c if (asus->bled_type == TYPE_LED) asus 713 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->bled, "asus::bluetooth", asus 717 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->mled, "asus::mail", METHOD_MLED); asus 720 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->tled, "asus::touchpad", METHOD_TLED); asus 723 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->rled, "asus::record", METHOD_RLED); asus 726 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->pled, "asus::phone", METHOD_PLED); asus 729 drivers/platform/x86/asus-laptop.c r = asus_led_register(asus, &asus->gled, "asus::gaming", METHOD_GLED); asus 732 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_KBD_LIGHT_SET, NULL) && asus 733 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_KBD_LIGHT_GET, NULL)) { asus 734 drivers/platform/x86/asus-laptop.c struct asus_led *led = &asus->kled; asus 737 drivers/platform/x86/asus-laptop.c led->asus = asus; asus 744 drivers/platform/x86/asus-laptop.c r = led_classdev_register(&asus->platform_device->dev, cdev); asus 748 drivers/platform/x86/asus-laptop.c asus_led_exit(asus); asus 757 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = bl_get_data(bd); asus 761 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, METHOD_BRIGHTNESS_GET, asus 773 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = bl_get_data(bd); asus 775 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_BRIGHTNESS_SET, value)) { asus 794 drivers/platform/x86/asus-laptop.c static int asus_backlight_notify(struct asus_laptop *asus) asus 796 drivers/platform/x86/asus-laptop.c struct backlight_device *bd = asus->backlight_device; asus 804 drivers/platform/x86/asus-laptop.c static int asus_backlight_init(struct asus_laptop *asus) asus 809 drivers/platform/x86/asus-laptop.c if (acpi_check_handle(asus->handle, METHOD_BRIGHTNESS_GET, NULL) || asus 810 drivers/platform/x86/asus-laptop.c acpi_check_handle(asus->handle, METHOD_BRIGHTNESS_SET, NULL)) asus 818 drivers/platform/x86/asus-laptop.c &asus->platform_device->dev, asus, asus 822 drivers/platform/x86/asus-laptop.c asus->backlight_device = NULL; asus 826 drivers/platform/x86/asus-laptop.c asus->backlight_device = bd; asus 833 drivers/platform/x86/asus-laptop.c static void asus_backlight_exit(struct asus_laptop *asus) asus 835 drivers/platform/x86/asus-laptop.c backlight_device_unregister(asus->backlight_device); asus 836 drivers/platform/x86/asus-laptop.c asus->backlight_device = NULL; asus 851 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 863 drivers/platform/x86/asus-laptop.c len += sprintf(page + len, "Model reference : %s\n", asus->name); asus 870 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, "SFUN", NULL, &temp); asus 882 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, "HWRS", NULL, &temp); asus 893 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, "ASYM", NULL, &temp); asus 897 drivers/platform/x86/asus-laptop.c if (asus->dsdt_info) { asus 898 drivers/platform/x86/asus-laptop.c snprintf(buf, 16, "%d", asus->dsdt_info->length); asus 900 drivers/platform/x86/asus-laptop.c snprintf(buf, 16, "%d", asus->dsdt_info->checksum); asus 902 drivers/platform/x86/asus-laptop.c snprintf(buf, 16, "%d", asus->dsdt_info->revision); asus 904 drivers/platform/x86/asus-laptop.c snprintf(buf, 7, "%s", asus->dsdt_info->oem_id); asus 906 drivers/platform/x86/asus-laptop.c snprintf(buf, 9, "%s", asus->dsdt_info->oem_table_id); asus 908 drivers/platform/x86/asus-laptop.c snprintf(buf, 16, "%x", asus->dsdt_info->oem_revision); asus 910 drivers/platform/x86/asus-laptop.c snprintf(buf, 5, "%s", asus->dsdt_info->asl_compiler_id); asus 912 drivers/platform/x86/asus-laptop.c snprintf(buf, 16, "%x", asus->dsdt_info->asl_compiler_revision); asus 920 drivers/platform/x86/asus-laptop.c static ssize_t sysfs_acpi_set(struct asus_laptop *asus, asus 930 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, method, value)) asus 941 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 943 drivers/platform/x86/asus-laptop.c return sprintf(buf, "0x%08x\n", asus->ledd_status); asus 949 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 956 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_LEDD, value)) { asus 961 drivers/platform/x86/asus-laptop.c asus->ledd_status = (u32) value; asus 969 drivers/platform/x86/asus-laptop.c static int asus_wireless_status(struct asus_laptop *asus, int mask) asus 974 drivers/platform/x86/asus-laptop.c if (!asus->have_rsts) asus 975 drivers/platform/x86/asus-laptop.c return (asus->wireless_status & mask) ? 1 : 0; asus 977 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, METHOD_WL_STATUS, asus 989 drivers/platform/x86/asus-laptop.c static int asus_wlan_set(struct asus_laptop *asus, int status) asus 991 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_WLAN, !!status)) { asus 1001 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1003 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus_wireless_status(asus, WL_RSTS)); asus 1009 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1011 drivers/platform/x86/asus-laptop.c return sysfs_acpi_set(asus, buf, count, METHOD_WLAN); asus 1018 drivers/platform/x86/asus-laptop.c static int asus_bluetooth_set(struct asus_laptop *asus, int status) asus 1020 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_BLUETOOTH, !!status)) { asus 1030 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1032 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus_wireless_status(asus, BT_RSTS)); asus 1039 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1041 drivers/platform/x86/asus-laptop.c return sysfs_acpi_set(asus, buf, count, METHOD_BLUETOOTH); asus 1048 drivers/platform/x86/asus-laptop.c static int asus_wimax_set(struct asus_laptop *asus, int status) asus 1050 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_WIMAX, !!status)) { asus 1060 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1062 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus_wireless_status(asus, WM_RSTS)); asus 1068 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1070 drivers/platform/x86/asus-laptop.c return sysfs_acpi_set(asus, buf, count, METHOD_WIMAX); asus 1077 drivers/platform/x86/asus-laptop.c static int asus_wwan_set(struct asus_laptop *asus, int status) asus 1079 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_WWAN, !!status)) { asus 1089 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1091 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus_wireless_status(asus, WW_RSTS)); asus 1097 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1099 drivers/platform/x86/asus-laptop.c return sysfs_acpi_set(asus, buf, count, METHOD_WWAN); asus 1106 drivers/platform/x86/asus-laptop.c static void asus_set_display(struct asus_laptop *asus, int value) asus 1109 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_SWITCH_DISPLAY, value)) asus 1124 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1131 drivers/platform/x86/asus-laptop.c asus_set_display(asus, value); asus 1139 drivers/platform/x86/asus-laptop.c static void asus_als_switch(struct asus_laptop *asus, int value) asus 1143 drivers/platform/x86/asus-laptop.c if (asus->is_pega_lucid) { asus 1144 drivers/platform/x86/asus-laptop.c ret = asus_pega_lucid_set(asus, PEGA_ALS, value); asus 1146 drivers/platform/x86/asus-laptop.c ret = asus_pega_lucid_set(asus, PEGA_ALS_POWER, value); asus 1148 drivers/platform/x86/asus-laptop.c ret = write_acpi_int(asus->handle, METHOD_ALS_CONTROL, value); asus 1153 drivers/platform/x86/asus-laptop.c asus->light_switch = value; asus 1159 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1161 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus->light_switch); asus 1168 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1175 drivers/platform/x86/asus-laptop.c asus_als_switch(asus, value ? 1 : 0); asus 1180 drivers/platform/x86/asus-laptop.c static void asus_als_level(struct asus_laptop *asus, int value) asus 1182 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, METHOD_ALS_LEVEL, value)) asus 1184 drivers/platform/x86/asus-laptop.c asus->light_level = value; asus 1190 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1192 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus->light_level); asus 1198 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1207 drivers/platform/x86/asus-laptop.c asus_als_level(asus, value); asus 1213 drivers/platform/x86/asus-laptop.c static int pega_int_read(struct asus_laptop *asus, int arg, int *result) asus 1216 drivers/platform/x86/asus-laptop.c int err = write_acpi_int_ret(asus->handle, METHOD_PEGA_READ, arg, asus 1231 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1234 drivers/platform/x86/asus-laptop.c err = pega_int_read(asus, PEGA_READ_ALS_H, &hi); asus 1236 drivers/platform/x86/asus-laptop.c err = pega_int_read(asus, PEGA_READ_ALS_L, &lo); asus 1246 drivers/platform/x86/asus-laptop.c static int asus_gps_status(struct asus_laptop *asus) asus 1251 drivers/platform/x86/asus-laptop.c rv = acpi_evaluate_integer(asus->handle, METHOD_GPS_STATUS, asus 1260 drivers/platform/x86/asus-laptop.c static int asus_gps_switch(struct asus_laptop *asus, int status) asus 1264 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, meth, 0x02)) asus 1272 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1274 drivers/platform/x86/asus-laptop.c return sprintf(buf, "%d\n", asus_gps_status(asus)); asus 1280 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1287 drivers/platform/x86/asus-laptop.c ret = asus_gps_switch(asus, !!value); asus 1290 drivers/platform/x86/asus-laptop.c rfkill_set_sw_state(asus->gps.rfkill, !value); asus 1300 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = data; asus 1302 drivers/platform/x86/asus-laptop.c return asus_gps_switch(asus, !blocked); asus 1312 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = rfk->asus; asus 1315 drivers/platform/x86/asus-laptop.c return asus_wlan_set(asus, !blocked); asus 1317 drivers/platform/x86/asus-laptop.c return asus_bluetooth_set(asus, !blocked); asus 1319 drivers/platform/x86/asus-laptop.c return asus_wimax_set(asus, !blocked); asus 1321 drivers/platform/x86/asus-laptop.c return asus_wwan_set(asus, !blocked); asus 1340 drivers/platform/x86/asus-laptop.c static void asus_rfkill_exit(struct asus_laptop *asus) asus 1342 drivers/platform/x86/asus-laptop.c asus_rfkill_terminate(&asus->wwan); asus 1343 drivers/platform/x86/asus-laptop.c asus_rfkill_terminate(&asus->bluetooth); asus 1344 drivers/platform/x86/asus-laptop.c asus_rfkill_terminate(&asus->wlan); asus 1345 drivers/platform/x86/asus-laptop.c asus_rfkill_terminate(&asus->gps); asus 1348 drivers/platform/x86/asus-laptop.c static int asus_rfkill_setup(struct asus_laptop *asus, struct asus_rfkill *rfk, asus 1355 drivers/platform/x86/asus-laptop.c rfk->asus = asus; asus 1356 drivers/platform/x86/asus-laptop.c rfk->rfkill = rfkill_alloc(name, &asus->platform_device->dev, asus 1370 drivers/platform/x86/asus-laptop.c static int asus_rfkill_init(struct asus_laptop *asus) asus 1374 drivers/platform/x86/asus-laptop.c if (asus->is_pega_lucid) asus 1377 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_GPS_ON, NULL) && asus 1378 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_GPS_OFF, NULL) && asus 1379 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_GPS_STATUS, NULL)) asus 1380 drivers/platform/x86/asus-laptop.c result = asus_rfkill_setup(asus, &asus->gps, "asus-gps", asus 1387 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_WLAN, NULL) && asus 1388 drivers/platform/x86/asus-laptop.c asus->wled_type == TYPE_RFKILL) asus 1389 drivers/platform/x86/asus-laptop.c result = asus_rfkill_setup(asus, &asus->wlan, "asus-wlan", asus 1395 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_BLUETOOTH, NULL) && asus 1396 drivers/platform/x86/asus-laptop.c asus->bled_type == TYPE_RFKILL) asus 1397 drivers/platform/x86/asus-laptop.c result = asus_rfkill_setup(asus, &asus->bluetooth, asus 1404 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_WWAN, NULL)) asus 1405 drivers/platform/x86/asus-laptop.c result = asus_rfkill_setup(asus, &asus->wwan, "asus-wwan", asus 1411 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_WIMAX, NULL)) asus 1412 drivers/platform/x86/asus-laptop.c result = asus_rfkill_setup(asus, &asus->wimax, "asus-wimax", asus 1420 drivers/platform/x86/asus-laptop.c asus_rfkill_exit(asus); asus 1429 drivers/platform/x86/asus-laptop.c int ret = asus_pega_lucid_set(rfk->asus, rfk->control_id, !blocked); asus 1437 drivers/platform/x86/asus-laptop.c static int pega_rfkill_setup(struct asus_laptop *asus, struct asus_rfkill *rfk, asus 1440 drivers/platform/x86/asus-laptop.c return asus_rfkill_setup(asus, rfk, name, controlid, rfkill_type, asus 1444 drivers/platform/x86/asus-laptop.c static int pega_rfkill_init(struct asus_laptop *asus) asus 1448 drivers/platform/x86/asus-laptop.c if(!asus->is_pega_lucid) asus 1451 drivers/platform/x86/asus-laptop.c ret = pega_rfkill_setup(asus, &asus->wlan, "pega-wlan", asus 1456 drivers/platform/x86/asus-laptop.c ret = pega_rfkill_setup(asus, &asus->bluetooth, "pega-bt", asus 1461 drivers/platform/x86/asus-laptop.c ret = pega_rfkill_setup(asus, &asus->wwan, "pega-wwan", asus 1466 drivers/platform/x86/asus-laptop.c asus_rfkill_exit(asus); asus 1474 drivers/platform/x86/asus-laptop.c static void asus_input_notify(struct asus_laptop *asus, int event) asus 1476 drivers/platform/x86/asus-laptop.c if (!asus->inputdev) asus 1478 drivers/platform/x86/asus-laptop.c if (!sparse_keymap_report_event(asus->inputdev, event, 1, true)) asus 1482 drivers/platform/x86/asus-laptop.c static int asus_input_init(struct asus_laptop *asus) asus 1494 drivers/platform/x86/asus-laptop.c input->dev.parent = &asus->platform_device->dev; asus 1507 drivers/platform/x86/asus-laptop.c asus->inputdev = input; asus 1515 drivers/platform/x86/asus-laptop.c static void asus_input_exit(struct asus_laptop *asus) asus 1517 drivers/platform/x86/asus-laptop.c if (asus->inputdev) asus 1518 drivers/platform/x86/asus-laptop.c input_unregister_device(asus->inputdev); asus 1519 drivers/platform/x86/asus-laptop.c asus->inputdev = NULL; asus 1527 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = acpi_driver_data(device); asus 1531 drivers/platform/x86/asus-laptop.c count = asus->event_count[event % 128]++; asus 1532 drivers/platform/x86/asus-laptop.c acpi_bus_generate_netlink_event(asus->device->pnp.device_class, asus 1533 drivers/platform/x86/asus-laptop.c dev_name(&asus->device->dev), event, asus 1544 drivers/platform/x86/asus-laptop.c if (asus->backlight_device != NULL) { asus 1546 drivers/platform/x86/asus-laptop.c asus_backlight_notify(asus); asus 1552 drivers/platform/x86/asus-laptop.c if (asus->pega_accel_poll && event == 0xEA) { asus 1553 drivers/platform/x86/asus-laptop.c kobject_uevent(&asus->pega_accel_poll->input->dev.kobj, asus 1558 drivers/platform/x86/asus-laptop.c asus_input_notify(asus, event); asus 1581 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = dev_get_drvdata(dev); asus 1582 drivers/platform/x86/asus-laptop.c acpi_handle handle = asus->handle; asus 1585 drivers/platform/x86/asus-laptop.c if (asus->is_pega_lucid) { asus 1609 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_WIMAX, NULL); asus 1612 drivers/platform/x86/asus-laptop.c supported = !acpi_check_handle(asus->handle, METHOD_WWAN, NULL); asus 1622 drivers/platform/x86/asus-laptop.c supported = asus->is_pega_lucid; asus 1640 drivers/platform/x86/asus-laptop.c static int asus_platform_init(struct asus_laptop *asus) asus 1644 drivers/platform/x86/asus-laptop.c asus->platform_device = platform_device_alloc(ASUS_LAPTOP_FILE, -1); asus 1645 drivers/platform/x86/asus-laptop.c if (!asus->platform_device) asus 1647 drivers/platform/x86/asus-laptop.c platform_set_drvdata(asus->platform_device, asus); asus 1649 drivers/platform/x86/asus-laptop.c result = platform_device_add(asus->platform_device); asus 1653 drivers/platform/x86/asus-laptop.c result = sysfs_create_group(&asus->platform_device->dev.kobj, asus 1661 drivers/platform/x86/asus-laptop.c platform_device_del(asus->platform_device); asus 1663 drivers/platform/x86/asus-laptop.c platform_device_put(asus->platform_device); asus 1667 drivers/platform/x86/asus-laptop.c static void asus_platform_exit(struct asus_laptop *asus) asus 1669 drivers/platform/x86/asus-laptop.c sysfs_remove_group(&asus->platform_device->dev.kobj, &asus_attr_group); asus 1670 drivers/platform/x86/asus-laptop.c platform_device_unregister(asus->platform_device); asus 1684 drivers/platform/x86/asus-laptop.c static int asus_laptop_get_info(struct asus_laptop *asus) asus 1699 drivers/platform/x86/asus-laptop.c status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus->dsdt_info); asus 1704 drivers/platform/x86/asus-laptop.c if (write_acpi_int_ret(asus->handle, "INIT", 0, &buffer)) { asus 1711 drivers/platform/x86/asus-laptop.c acpi_evaluate_integer(asus->handle, "BSTS", NULL, &bsts_result); asus 1719 drivers/platform/x86/asus-laptop.c if (write_acpi_int(asus->handle, "CWAP", wapf)) asus 1741 drivers/platform/x86/asus-laptop.c asus->name = kstrdup(string, GFP_KERNEL); asus 1742 drivers/platform/x86/asus-laptop.c if (!asus->name) { asus 1750 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) asus 1751 drivers/platform/x86/asus-laptop.c asus->have_rsts = true; asus 1758 drivers/platform/x86/asus-laptop.c static int asus_acpi_init(struct asus_laptop *asus) asus 1762 drivers/platform/x86/asus-laptop.c result = acpi_bus_get_status(asus->device); asus 1765 drivers/platform/x86/asus-laptop.c if (!asus->device->status.present) { asus 1770 drivers/platform/x86/asus-laptop.c result = asus_laptop_get_info(asus); asus 1775 drivers/platform/x86/asus-laptop.c asus->bled_type = TYPE_LED; asus 1777 drivers/platform/x86/asus-laptop.c asus->bled_type = TYPE_RFKILL; asus 1780 drivers/platform/x86/asus-laptop.c asus->wled_type = TYPE_LED; asus 1782 drivers/platform/x86/asus-laptop.c asus->wled_type = TYPE_RFKILL; asus 1785 drivers/platform/x86/asus-laptop.c asus_bluetooth_set(asus, !!bluetooth_status); asus 1788 drivers/platform/x86/asus-laptop.c asus_wlan_set(asus, !!wlan_status); asus 1791 drivers/platform/x86/asus-laptop.c asus_wimax_set(asus, !!wimax_status); asus 1794 drivers/platform/x86/asus-laptop.c asus_wwan_set(asus, !!wwan_status); asus 1797 drivers/platform/x86/asus-laptop.c if (!acpi_check_handle(asus->handle, METHOD_KBD_LIGHT_SET, NULL)) asus 1798 drivers/platform/x86/asus-laptop.c asus_kled_set(asus, 1); asus 1801 drivers/platform/x86/asus-laptop.c asus->ledd_status = 0xFFF; asus 1804 drivers/platform/x86/asus-laptop.c asus->light_switch = !!als_status; asus 1805 drivers/platform/x86/asus-laptop.c asus->light_level = 5; /* level 5 for sensor sensitivity */ asus 1807 drivers/platform/x86/asus-laptop.c if (asus->is_pega_lucid) { asus 1808 drivers/platform/x86/asus-laptop.c asus_als_switch(asus, asus->light_switch); asus 1809 drivers/platform/x86/asus-laptop.c } else if (!acpi_check_handle(asus->handle, METHOD_ALS_CONTROL, NULL) && asus 1810 drivers/platform/x86/asus-laptop.c !acpi_check_handle(asus->handle, METHOD_ALS_LEVEL, NULL)) { asus 1811 drivers/platform/x86/asus-laptop.c asus_als_switch(asus, asus->light_switch); asus 1812 drivers/platform/x86/asus-laptop.c asus_als_level(asus, asus->light_level); asus 1836 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus; asus 1841 drivers/platform/x86/asus-laptop.c asus = kzalloc(sizeof(struct asus_laptop), GFP_KERNEL); asus 1842 drivers/platform/x86/asus-laptop.c if (!asus) asus 1844 drivers/platform/x86/asus-laptop.c asus->handle = device->handle; asus 1847 drivers/platform/x86/asus-laptop.c device->driver_data = asus; asus 1848 drivers/platform/x86/asus-laptop.c asus->device = device; asus 1852 drivers/platform/x86/asus-laptop.c result = asus_acpi_init(asus); asus 1860 drivers/platform/x86/asus-laptop.c asus->is_pega_lucid = asus_check_pega_lucid(asus); asus 1861 drivers/platform/x86/asus-laptop.c result = asus_platform_init(asus); asus 1866 drivers/platform/x86/asus-laptop.c result = asus_backlight_init(asus); asus 1871 drivers/platform/x86/asus-laptop.c result = asus_input_init(asus); asus 1875 drivers/platform/x86/asus-laptop.c result = asus_led_init(asus); asus 1879 drivers/platform/x86/asus-laptop.c result = asus_rfkill_init(asus); asus 1883 drivers/platform/x86/asus-laptop.c result = pega_accel_init(asus); asus 1887 drivers/platform/x86/asus-laptop.c result = pega_rfkill_init(asus); asus 1895 drivers/platform/x86/asus-laptop.c pega_accel_exit(asus); asus 1897 drivers/platform/x86/asus-laptop.c asus_rfkill_exit(asus); asus 1899 drivers/platform/x86/asus-laptop.c asus_led_exit(asus); asus 1901 drivers/platform/x86/asus-laptop.c asus_input_exit(asus); asus 1903 drivers/platform/x86/asus-laptop.c asus_backlight_exit(asus); asus 1905 drivers/platform/x86/asus-laptop.c asus_platform_exit(asus); asus 1907 drivers/platform/x86/asus-laptop.c kfree(asus); asus 1914 drivers/platform/x86/asus-laptop.c struct asus_laptop *asus = acpi_driver_data(device); asus 1916 drivers/platform/x86/asus-laptop.c asus_backlight_exit(asus); asus 1917 drivers/platform/x86/asus-laptop.c asus_rfkill_exit(asus); asus 1918 drivers/platform/x86/asus-laptop.c asus_led_exit(asus); asus 1919 drivers/platform/x86/asus-laptop.c asus_input_exit(asus); asus 1920 drivers/platform/x86/asus-laptop.c pega_accel_exit(asus); asus 1921 drivers/platform/x86/asus-laptop.c asus_platform_exit(asus); asus 1923 drivers/platform/x86/asus-laptop.c kfree(asus->name); asus 1924 drivers/platform/x86/asus-laptop.c kfree(asus); asus 152 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 219 drivers/platform/x86/asus-wmi.c static int asus_wmi_input_init(struct asus_wmi *asus) asus 223 drivers/platform/x86/asus-wmi.c asus->inputdev = input_allocate_device(); asus 224 drivers/platform/x86/asus-wmi.c if (!asus->inputdev) asus 227 drivers/platform/x86/asus-wmi.c asus->inputdev->name = asus->driver->input_name; asus 228 drivers/platform/x86/asus-wmi.c asus->inputdev->phys = asus->driver->input_phys; asus 229 drivers/platform/x86/asus-wmi.c asus->inputdev->id.bustype = BUS_HOST; asus 230 drivers/platform/x86/asus-wmi.c asus->inputdev->dev.parent = &asus->platform_device->dev; asus 231 drivers/platform/x86/asus-wmi.c set_bit(EV_REP, asus->inputdev->evbit); asus 233 drivers/platform/x86/asus-wmi.c err = sparse_keymap_setup(asus->inputdev, asus->driver->keymap, NULL); asus 237 drivers/platform/x86/asus-wmi.c err = input_register_device(asus->inputdev); asus 244 drivers/platform/x86/asus-wmi.c input_free_device(asus->inputdev); asus 248 drivers/platform/x86/asus-wmi.c static void asus_wmi_input_exit(struct asus_wmi *asus) asus 250 drivers/platform/x86/asus-wmi.c if (asus->inputdev) asus 251 drivers/platform/x86/asus-wmi.c input_unregister_device(asus->inputdev); asus 253 drivers/platform/x86/asus-wmi.c asus->inputdev = NULL; asus 328 drivers/platform/x86/asus-wmi.c static int asus_wmi_get_devstate(struct asus_wmi *asus, u32 dev_id, u32 *retval) asus 330 drivers/platform/x86/asus-wmi.c return asus_wmi_evaluate_method(asus->dsts_id, dev_id, 0, retval); asus 341 drivers/platform/x86/asus-wmi.c static int asus_wmi_get_devstate_bits(struct asus_wmi *asus, asus 347 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, dev_id, &retval); asus 362 drivers/platform/x86/asus-wmi.c static int asus_wmi_get_devstate_simple(struct asus_wmi *asus, u32 dev_id) asus 364 drivers/platform/x86/asus-wmi.c return asus_wmi_get_devstate_bits(asus, dev_id, asus 368 drivers/platform/x86/asus-wmi.c static bool asus_wmi_dev_is_present(struct asus_wmi *asus, u32 dev_id) asus 371 drivers/platform/x86/asus-wmi.c int status = asus_wmi_get_devstate(asus, dev_id, &retval); asus 455 drivers/platform/x86/asus-wmi.c static void asus_wmi_battery_init(struct asus_wmi *asus) asus 457 drivers/platform/x86/asus-wmi.c asus->battery_rsoc_available = false; asus 458 drivers/platform/x86/asus-wmi.c if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_RSOC)) { asus 459 drivers/platform/x86/asus-wmi.c asus->battery_rsoc_available = true; asus 464 drivers/platform/x86/asus-wmi.c static void asus_wmi_battery_exit(struct asus_wmi *asus) asus 466 drivers/platform/x86/asus-wmi.c if (asus->battery_rsoc_available) asus 481 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 483 drivers/platform/x86/asus-wmi.c asus = container_of(work, struct asus_wmi, tpd_led_work); asus 485 drivers/platform/x86/asus-wmi.c ctrl_param = asus->tpd_led_wk; asus 492 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 494 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, tpd_led); asus 496 drivers/platform/x86/asus-wmi.c asus->tpd_led_wk = !!value; asus 497 drivers/platform/x86/asus-wmi.c queue_work(asus->led_workqueue, &asus->tpd_led_work); asus 500 drivers/platform/x86/asus-wmi.c static int read_tpd_led_state(struct asus_wmi *asus) asus 502 drivers/platform/x86/asus-wmi.c return asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_TOUCHPAD_LED); asus 507 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 509 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, tpd_led); asus 511 drivers/platform/x86/asus-wmi.c return read_tpd_led_state(asus); asus 514 drivers/platform/x86/asus-wmi.c static void kbd_led_update(struct asus_wmi *asus) asus 518 drivers/platform/x86/asus-wmi.c ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F); asus 522 drivers/platform/x86/asus-wmi.c static int kbd_led_read(struct asus_wmi *asus, int *level, int *env) asus 532 drivers/platform/x86/asus-wmi.c retval = asus_wmi_get_devstate_bits(asus, ASUS_WMI_DEVID_KBD_BACKLIGHT, asus 551 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 554 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, kbd_led); asus 555 drivers/platform/x86/asus-wmi.c max_level = asus->kbd_led.max_brightness; asus 557 drivers/platform/x86/asus-wmi.c asus->kbd_led_wk = clamp_val(value, 0, max_level); asus 558 drivers/platform/x86/asus-wmi.c kbd_led_update(asus); asus 571 drivers/platform/x86/asus-wmi.c static void kbd_led_set_by_kbd(struct asus_wmi *asus, enum led_brightness value) asus 573 drivers/platform/x86/asus-wmi.c struct led_classdev *led_cdev = &asus->kbd_led; asus 576 drivers/platform/x86/asus-wmi.c led_classdev_notify_brightness_hw_changed(led_cdev, asus->kbd_led_wk); asus 581 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 584 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, kbd_led); asus 586 drivers/platform/x86/asus-wmi.c retval = kbd_led_read(asus, &value, NULL); asus 593 drivers/platform/x86/asus-wmi.c static int wlan_led_unknown_state(struct asus_wmi *asus) asus 597 drivers/platform/x86/asus-wmi.c asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WIRELESS_LED, &result); asus 605 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 607 drivers/platform/x86/asus-wmi.c asus = container_of(work, struct asus_wmi, wlan_led_work); asus 609 drivers/platform/x86/asus-wmi.c ctrl_param = asus->wlan_led_wk; asus 616 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 618 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, wlan_led); asus 620 drivers/platform/x86/asus-wmi.c asus->wlan_led_wk = !!value; asus 621 drivers/platform/x86/asus-wmi.c queue_work(asus->led_workqueue, &asus->wlan_led_work); asus 626 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 629 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, wlan_led); asus 630 drivers/platform/x86/asus-wmi.c asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WIRELESS_LED, &result); asus 637 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 640 drivers/platform/x86/asus-wmi.c asus = container_of(work, struct asus_wmi, lightbar_led_work); asus 642 drivers/platform/x86/asus-wmi.c ctrl_param = asus->lightbar_led_wk; asus 649 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 651 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, lightbar_led); asus 653 drivers/platform/x86/asus-wmi.c asus->lightbar_led_wk = !!value; asus 654 drivers/platform/x86/asus-wmi.c queue_work(asus->led_workqueue, &asus->lightbar_led_work); asus 659 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 662 drivers/platform/x86/asus-wmi.c asus = container_of(led_cdev, struct asus_wmi, lightbar_led); asus 663 drivers/platform/x86/asus-wmi.c asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_LIGHTBAR, &result); asus 668 drivers/platform/x86/asus-wmi.c static void asus_wmi_led_exit(struct asus_wmi *asus) asus 670 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->kbd_led.dev)) asus 671 drivers/platform/x86/asus-wmi.c led_classdev_unregister(&asus->kbd_led); asus 672 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->tpd_led.dev)) asus 673 drivers/platform/x86/asus-wmi.c led_classdev_unregister(&asus->tpd_led); asus 674 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->wlan_led.dev)) asus 675 drivers/platform/x86/asus-wmi.c led_classdev_unregister(&asus->wlan_led); asus 676 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->lightbar_led.dev)) asus 677 drivers/platform/x86/asus-wmi.c led_classdev_unregister(&asus->lightbar_led); asus 678 drivers/platform/x86/asus-wmi.c if (asus->led_workqueue) asus 679 drivers/platform/x86/asus-wmi.c destroy_workqueue(asus->led_workqueue); asus 682 drivers/platform/x86/asus-wmi.c static int asus_wmi_led_init(struct asus_wmi *asus) asus 686 drivers/platform/x86/asus-wmi.c asus->led_workqueue = create_singlethread_workqueue("led_workqueue"); asus 687 drivers/platform/x86/asus-wmi.c if (!asus->led_workqueue) asus 690 drivers/platform/x86/asus-wmi.c if (read_tpd_led_state(asus) >= 0) { asus 691 drivers/platform/x86/asus-wmi.c INIT_WORK(&asus->tpd_led_work, tpd_led_update); asus 693 drivers/platform/x86/asus-wmi.c asus->tpd_led.name = "asus::touchpad"; asus 694 drivers/platform/x86/asus-wmi.c asus->tpd_led.brightness_set = tpd_led_set; asus 695 drivers/platform/x86/asus-wmi.c asus->tpd_led.brightness_get = tpd_led_get; asus 696 drivers/platform/x86/asus-wmi.c asus->tpd_led.max_brightness = 1; asus 698 drivers/platform/x86/asus-wmi.c rv = led_classdev_register(&asus->platform_device->dev, asus 699 drivers/platform/x86/asus-wmi.c &asus->tpd_led); asus 704 drivers/platform/x86/asus-wmi.c if (!kbd_led_read(asus, &led_val, NULL)) { asus 705 drivers/platform/x86/asus-wmi.c asus->kbd_led_wk = led_val; asus 706 drivers/platform/x86/asus-wmi.c asus->kbd_led.name = "asus::kbd_backlight"; asus 707 drivers/platform/x86/asus-wmi.c asus->kbd_led.flags = LED_BRIGHT_HW_CHANGED; asus 708 drivers/platform/x86/asus-wmi.c asus->kbd_led.brightness_set = kbd_led_set; asus 709 drivers/platform/x86/asus-wmi.c asus->kbd_led.brightness_get = kbd_led_get; asus 710 drivers/platform/x86/asus-wmi.c asus->kbd_led.max_brightness = 3; asus 712 drivers/platform/x86/asus-wmi.c rv = led_classdev_register(&asus->platform_device->dev, asus 713 drivers/platform/x86/asus-wmi.c &asus->kbd_led); asus 718 drivers/platform/x86/asus-wmi.c if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_WIRELESS_LED) asus 719 drivers/platform/x86/asus-wmi.c && (asus->driver->quirks->wapf > 0)) { asus 720 drivers/platform/x86/asus-wmi.c INIT_WORK(&asus->wlan_led_work, wlan_led_update); asus 722 drivers/platform/x86/asus-wmi.c asus->wlan_led.name = "asus::wlan"; asus 723 drivers/platform/x86/asus-wmi.c asus->wlan_led.brightness_set = wlan_led_set; asus 724 drivers/platform/x86/asus-wmi.c if (!wlan_led_unknown_state(asus)) asus 725 drivers/platform/x86/asus-wmi.c asus->wlan_led.brightness_get = wlan_led_get; asus 726 drivers/platform/x86/asus-wmi.c asus->wlan_led.flags = LED_CORE_SUSPENDRESUME; asus 727 drivers/platform/x86/asus-wmi.c asus->wlan_led.max_brightness = 1; asus 728 drivers/platform/x86/asus-wmi.c asus->wlan_led.default_trigger = "asus-wlan"; asus 730 drivers/platform/x86/asus-wmi.c rv = led_classdev_register(&asus->platform_device->dev, asus 731 drivers/platform/x86/asus-wmi.c &asus->wlan_led); asus 736 drivers/platform/x86/asus-wmi.c if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_LIGHTBAR)) { asus 737 drivers/platform/x86/asus-wmi.c INIT_WORK(&asus->lightbar_led_work, lightbar_led_update); asus 739 drivers/platform/x86/asus-wmi.c asus->lightbar_led.name = "asus::lightbar"; asus 740 drivers/platform/x86/asus-wmi.c asus->lightbar_led.brightness_set = lightbar_led_set; asus 741 drivers/platform/x86/asus-wmi.c asus->lightbar_led.brightness_get = lightbar_led_get; asus 742 drivers/platform/x86/asus-wmi.c asus->lightbar_led.max_brightness = 1; asus 744 drivers/platform/x86/asus-wmi.c rv = led_classdev_register(&asus->platform_device->dev, asus 745 drivers/platform/x86/asus-wmi.c &asus->lightbar_led); asus 750 drivers/platform/x86/asus-wmi.c asus_wmi_led_exit(asus); asus 760 drivers/platform/x86/asus-wmi.c static bool asus_wlan_rfkill_blocked(struct asus_wmi *asus) asus 762 drivers/platform/x86/asus-wmi.c int result = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WLAN); asus 769 drivers/platform/x86/asus-wmi.c static void asus_rfkill_hotplug(struct asus_wmi *asus) asus 777 drivers/platform/x86/asus-wmi.c mutex_lock(&asus->wmi_lock); asus 778 drivers/platform/x86/asus-wmi.c blocked = asus_wlan_rfkill_blocked(asus); asus 779 drivers/platform/x86/asus-wmi.c mutex_unlock(&asus->wmi_lock); asus 781 drivers/platform/x86/asus-wmi.c mutex_lock(&asus->hotplug_lock); asus 784 drivers/platform/x86/asus-wmi.c if (asus->wlan.rfkill) asus 785 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->wlan.rfkill, blocked); asus 787 drivers/platform/x86/asus-wmi.c if (asus->hotplug_slot.ops) { asus 833 drivers/platform/x86/asus-wmi.c mutex_unlock(&asus->hotplug_lock); asus 838 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = data; asus 850 drivers/platform/x86/asus-wmi.c queue_work(asus->hotplug_workqueue, &asus->hotplug_work); asus 853 drivers/platform/x86/asus-wmi.c static int asus_register_rfkill_notifier(struct asus_wmi *asus, char *node) asus 863 drivers/platform/x86/asus-wmi.c asus_rfkill_notify, asus); asus 870 drivers/platform/x86/asus-wmi.c static void asus_unregister_rfkill_notifier(struct asus_wmi *asus, char *node) asus 888 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = container_of(hotplug_slot, asus 890 drivers/platform/x86/asus-wmi.c int result = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WLAN); asus 906 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 908 drivers/platform/x86/asus-wmi.c asus = container_of(work, struct asus_wmi, hotplug_work); asus 909 drivers/platform/x86/asus-wmi.c asus_rfkill_hotplug(asus); asus 912 drivers/platform/x86/asus-wmi.c static int asus_setup_pci_hotplug(struct asus_wmi *asus) asus 922 drivers/platform/x86/asus-wmi.c asus->hotplug_workqueue = asus 924 drivers/platform/x86/asus-wmi.c if (!asus->hotplug_workqueue) asus 927 drivers/platform/x86/asus-wmi.c INIT_WORK(&asus->hotplug_work, asus_hotplug_work); asus 929 drivers/platform/x86/asus-wmi.c asus->hotplug_slot.ops = &asus_hotplug_slot_ops; asus 931 drivers/platform/x86/asus-wmi.c ret = pci_hp_register(&asus->hotplug_slot, bus, 0, "asus-wifi"); asus 940 drivers/platform/x86/asus-wmi.c asus->hotplug_slot.ops = NULL; asus 941 drivers/platform/x86/asus-wmi.c destroy_workqueue(asus->hotplug_workqueue); asus 964 drivers/platform/x86/asus-wmi.c priv->asus->driver->wlan_ctrl_by_user) asus 975 drivers/platform/x86/asus-wmi.c result = asus_wmi_get_devstate_simple(priv->asus, priv->dev_id); asus 986 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = priv->asus; asus 996 drivers/platform/x86/asus-wmi.c mutex_lock(&asus->wmi_lock); asus 998 drivers/platform/x86/asus-wmi.c mutex_unlock(&asus->wmi_lock); asus 1012 drivers/platform/x86/asus-wmi.c static int asus_new_rfkill(struct asus_wmi *asus, asus 1016 drivers/platform/x86/asus-wmi.c int result = asus_wmi_get_devstate_simple(asus, dev_id); asus 1023 drivers/platform/x86/asus-wmi.c arfkill->asus = asus; asus 1026 drivers/platform/x86/asus-wmi.c asus->driver->quirks->hotplug_wireless) asus 1027 drivers/platform/x86/asus-wmi.c *rfkill = rfkill_alloc(name, &asus->platform_device->dev, type, asus 1030 drivers/platform/x86/asus-wmi.c *rfkill = rfkill_alloc(name, &asus->platform_device->dev, type, asus 1037 drivers/platform/x86/asus-wmi.c (asus->driver->quirks->wapf > 0)) asus 1050 drivers/platform/x86/asus-wmi.c static void asus_wmi_rfkill_exit(struct asus_wmi *asus) asus 1052 drivers/platform/x86/asus-wmi.c if (asus->driver->wlan_ctrl_by_user && ashs_present()) asus 1055 drivers/platform/x86/asus-wmi.c asus_unregister_rfkill_notifier(asus, "\\_SB.PCI0.P0P5"); asus 1056 drivers/platform/x86/asus-wmi.c asus_unregister_rfkill_notifier(asus, "\\_SB.PCI0.P0P6"); asus 1057 drivers/platform/x86/asus-wmi.c asus_unregister_rfkill_notifier(asus, "\\_SB.PCI0.P0P7"); asus 1058 drivers/platform/x86/asus-wmi.c if (asus->wlan.rfkill) { asus 1059 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->wlan.rfkill); asus 1060 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->wlan.rfkill); asus 1061 drivers/platform/x86/asus-wmi.c asus->wlan.rfkill = NULL; asus 1067 drivers/platform/x86/asus-wmi.c asus_rfkill_hotplug(asus); asus 1068 drivers/platform/x86/asus-wmi.c if (asus->hotplug_slot.ops) asus 1069 drivers/platform/x86/asus-wmi.c pci_hp_deregister(&asus->hotplug_slot); asus 1070 drivers/platform/x86/asus-wmi.c if (asus->hotplug_workqueue) asus 1071 drivers/platform/x86/asus-wmi.c destroy_workqueue(asus->hotplug_workqueue); asus 1073 drivers/platform/x86/asus-wmi.c if (asus->bluetooth.rfkill) { asus 1074 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->bluetooth.rfkill); asus 1075 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->bluetooth.rfkill); asus 1076 drivers/platform/x86/asus-wmi.c asus->bluetooth.rfkill = NULL; asus 1078 drivers/platform/x86/asus-wmi.c if (asus->wimax.rfkill) { asus 1079 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->wimax.rfkill); asus 1080 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->wimax.rfkill); asus 1081 drivers/platform/x86/asus-wmi.c asus->wimax.rfkill = NULL; asus 1083 drivers/platform/x86/asus-wmi.c if (asus->wwan3g.rfkill) { asus 1084 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->wwan3g.rfkill); asus 1085 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->wwan3g.rfkill); asus 1086 drivers/platform/x86/asus-wmi.c asus->wwan3g.rfkill = NULL; asus 1088 drivers/platform/x86/asus-wmi.c if (asus->gps.rfkill) { asus 1089 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->gps.rfkill); asus 1090 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->gps.rfkill); asus 1091 drivers/platform/x86/asus-wmi.c asus->gps.rfkill = NULL; asus 1093 drivers/platform/x86/asus-wmi.c if (asus->uwb.rfkill) { asus 1094 drivers/platform/x86/asus-wmi.c rfkill_unregister(asus->uwb.rfkill); asus 1095 drivers/platform/x86/asus-wmi.c rfkill_destroy(asus->uwb.rfkill); asus 1096 drivers/platform/x86/asus-wmi.c asus->uwb.rfkill = NULL; asus 1100 drivers/platform/x86/asus-wmi.c static int asus_wmi_rfkill_init(struct asus_wmi *asus) asus 1104 drivers/platform/x86/asus-wmi.c mutex_init(&asus->hotplug_lock); asus 1105 drivers/platform/x86/asus-wmi.c mutex_init(&asus->wmi_lock); asus 1107 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->wlan, "asus-wlan", asus 1113 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->bluetooth, asus 1120 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->wimax, "asus-wimax", asus 1126 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->wwan3g, "asus-wwan3g", asus 1132 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->gps, "asus-gps", asus 1138 drivers/platform/x86/asus-wmi.c result = asus_new_rfkill(asus, &asus->uwb, "asus-uwb", asus 1144 drivers/platform/x86/asus-wmi.c if (!asus->driver->quirks->hotplug_wireless) asus 1147 drivers/platform/x86/asus-wmi.c result = asus_setup_pci_hotplug(asus); asus 1155 drivers/platform/x86/asus-wmi.c asus_register_rfkill_notifier(asus, "\\_SB.PCI0.P0P5"); asus 1156 drivers/platform/x86/asus-wmi.c asus_register_rfkill_notifier(asus, "\\_SB.PCI0.P0P6"); asus 1157 drivers/platform/x86/asus-wmi.c asus_register_rfkill_notifier(asus, "\\_SB.PCI0.P0P7"); asus 1162 drivers/platform/x86/asus-wmi.c asus_rfkill_hotplug(asus); asus 1166 drivers/platform/x86/asus-wmi.c asus_wmi_rfkill_exit(asus); asus 1176 drivers/platform/x86/asus-wmi.c static void asus_wmi_set_xusb2pr(struct asus_wmi *asus) asus 1180 drivers/platform/x86/asus-wmi.c u32 ports_available = asus->driver->quirks->xusb2pr; asus 1210 drivers/platform/x86/asus-wmi.c static int asus_agfn_fan_speed_read(struct asus_wmi *asus, int fan, asus 1237 drivers/platform/x86/asus-wmi.c static int asus_agfn_fan_speed_write(struct asus_wmi *asus, int fan, asus 1260 drivers/platform/x86/asus-wmi.c asus->agfn_pwm = *speed; asus 1269 drivers/platform/x86/asus-wmi.c static bool asus_wmi_has_agfn_fan(struct asus_wmi *asus) asus 1275 drivers/platform/x86/asus-wmi.c status = asus_agfn_fan_speed_read(asus, 1, &speed); asus 1279 drivers/platform/x86/asus-wmi.c status = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_CTRL, &value); asus 1292 drivers/platform/x86/asus-wmi.c || (!asus->sfun && !(value & ASUS_WMI_DSTS_PRESENCE_BIT))); asus 1295 drivers/platform/x86/asus-wmi.c static int asus_fan_set_auto(struct asus_wmi *asus) asus 1300 drivers/platform/x86/asus-wmi.c switch (asus->fan_type) { asus 1312 drivers/platform/x86/asus-wmi.c status = asus_agfn_fan_speed_write(asus, 0, NULL); asus 1329 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1334 drivers/platform/x86/asus-wmi.c if (asus->agfn_pwm >= 0) asus 1335 drivers/platform/x86/asus-wmi.c return sprintf(buf, "%d\n", asus->agfn_pwm); asus 1341 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_CTRL, &value); asus 1364 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1375 drivers/platform/x86/asus-wmi.c state = asus_agfn_fan_speed_write(asus, 1, &value); asus 1379 drivers/platform/x86/asus-wmi.c asus->fan_pwm_mode = ASUS_FAN_CTRL_MANUAL; asus 1388 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1392 drivers/platform/x86/asus-wmi.c switch (asus->fan_type) { asus 1394 drivers/platform/x86/asus-wmi.c ret = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_CPU_FAN_CTRL, asus 1404 drivers/platform/x86/asus-wmi.c if (asus->fan_pwm_mode == ASUS_FAN_CTRL_MANUAL) asus 1407 drivers/platform/x86/asus-wmi.c ret = asus_agfn_fan_speed_read(asus, 1, &value); asus 1425 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1436 drivers/platform/x86/asus-wmi.c return sprintf(buf, "%d\n", asus->fan_pwm_mode); asus 1443 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1454 drivers/platform/x86/asus-wmi.c if (asus->fan_type == FAN_TYPE_SPEC83) { asus 1473 drivers/platform/x86/asus-wmi.c } else if (asus->fan_type == FAN_TYPE_AGFN) { asus 1479 drivers/platform/x86/asus-wmi.c status = asus_fan_set_auto(asus); asus 1489 drivers/platform/x86/asus-wmi.c asus->fan_pwm_mode = state; asus 1504 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1508 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_THERMAL_CTRL, &value); asus 1540 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev->parent); asus 1544 drivers/platform/x86/asus-wmi.c if (asus->fan_type != FAN_TYPE_AGFN) asus 1549 drivers/platform/x86/asus-wmi.c if (asus->fan_type == FAN_TYPE_NONE) asus 1552 drivers/platform/x86/asus-wmi.c int err = asus_wmi_get_devstate(asus, asus 1576 drivers/platform/x86/asus-wmi.c static int asus_wmi_hwmon_init(struct asus_wmi *asus) asus 1578 drivers/platform/x86/asus-wmi.c struct device *dev = &asus->platform_device->dev; asus 1581 drivers/platform/x86/asus-wmi.c hwmon = devm_hwmon_device_register_with_groups(dev, "asus", asus, asus 1591 drivers/platform/x86/asus-wmi.c static int asus_wmi_fan_init(struct asus_wmi *asus) asus 1593 drivers/platform/x86/asus-wmi.c asus->fan_type = FAN_TYPE_NONE; asus 1594 drivers/platform/x86/asus-wmi.c asus->agfn_pwm = -1; asus 1596 drivers/platform/x86/asus-wmi.c if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_CPU_FAN_CTRL)) asus 1597 drivers/platform/x86/asus-wmi.c asus->fan_type = FAN_TYPE_SPEC83; asus 1598 drivers/platform/x86/asus-wmi.c else if (asus_wmi_has_agfn_fan(asus)) asus 1599 drivers/platform/x86/asus-wmi.c asus->fan_type = FAN_TYPE_AGFN; asus 1601 drivers/platform/x86/asus-wmi.c if (asus->fan_type == FAN_TYPE_NONE) asus 1604 drivers/platform/x86/asus-wmi.c asus_fan_set_auto(asus); asus 1605 drivers/platform/x86/asus-wmi.c asus->fan_pwm_mode = ASUS_FAN_CTRL_AUTO; asus 1611 drivers/platform/x86/asus-wmi.c static int fan_boost_mode_check_present(struct asus_wmi *asus) asus 1616 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode_available = false; asus 1618 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_BOOST_MODE, asus 1629 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode_available = true; asus 1630 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode_mask = result & ASUS_FAN_BOOST_MODES_MASK; asus 1636 drivers/platform/x86/asus-wmi.c static int fan_boost_mode_write(struct asus_wmi *asus) asus 1642 drivers/platform/x86/asus-wmi.c value = asus->fan_boost_mode; asus 1661 drivers/platform/x86/asus-wmi.c static int fan_boost_mode_switch_next(struct asus_wmi *asus) asus 1663 drivers/platform/x86/asus-wmi.c u8 mask = asus->fan_boost_mode_mask; asus 1665 drivers/platform/x86/asus-wmi.c if (asus->fan_boost_mode == ASUS_FAN_BOOST_MODE_NORMAL) { asus 1667 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_OVERBOOST; asus 1669 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_SILENT; asus 1670 drivers/platform/x86/asus-wmi.c } else if (asus->fan_boost_mode == ASUS_FAN_BOOST_MODE_OVERBOOST) { asus 1672 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_SILENT; asus 1674 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL; asus 1676 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL; asus 1679 drivers/platform/x86/asus-wmi.c return fan_boost_mode_write(asus); asus 1685 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1687 drivers/platform/x86/asus-wmi.c return scnprintf(buf, PAGE_SIZE, "%d\n", asus->fan_boost_mode); asus 1696 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 1697 drivers/platform/x86/asus-wmi.c u8 mask = asus->fan_boost_mode_mask; asus 1715 drivers/platform/x86/asus-wmi.c asus->fan_boost_mode = new_mode; asus 1716 drivers/platform/x86/asus-wmi.c fan_boost_mode_write(asus); asus 1726 drivers/platform/x86/asus-wmi.c static int read_backlight_power(struct asus_wmi *asus) asus 1730 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->store_backlight_power) asus 1731 drivers/platform/x86/asus-wmi.c ret = !asus->driver->panel_power; asus 1733 drivers/platform/x86/asus-wmi.c ret = asus_wmi_get_devstate_simple(asus, asus 1742 drivers/platform/x86/asus-wmi.c static int read_brightness_max(struct asus_wmi *asus) asus 1747 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_BRIGHTNESS, &retval); asus 1762 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = bl_get_data(bd); asus 1766 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_BRIGHTNESS, &retval); asus 1775 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = bl_get_data(bd); asus 1778 drivers/platform/x86/asus-wmi.c if ((asus->driver->brightness < bd->props.brightness) || asus 1781 drivers/platform/x86/asus-wmi.c else if ((asus->driver->brightness > bd->props.brightness) || asus 1785 drivers/platform/x86/asus-wmi.c asus->driver->brightness = bd->props.brightness; asus 1792 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = bl_get_data(bd); asus 1796 drivers/platform/x86/asus-wmi.c power = read_backlight_power(asus); asus 1801 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->store_backlight_power) asus 1802 drivers/platform/x86/asus-wmi.c asus->driver->panel_power = bd->props.power; asus 1806 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->scalar_panel_brightness) asus 1810 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->scalar_panel_brightness) asus 1826 drivers/platform/x86/asus-wmi.c static int asus_wmi_backlight_notify(struct asus_wmi *asus, int code) asus 1828 drivers/platform/x86/asus-wmi.c struct backlight_device *bd = asus->backlight_device; asus 1844 drivers/platform/x86/asus-wmi.c static int asus_wmi_backlight_init(struct asus_wmi *asus) asus 1851 drivers/platform/x86/asus-wmi.c max = read_brightness_max(asus); asus 1855 drivers/platform/x86/asus-wmi.c power = read_backlight_power(asus); asus 1864 drivers/platform/x86/asus-wmi.c bd = backlight_device_register(asus->driver->name, asus 1865 drivers/platform/x86/asus-wmi.c &asus->platform_device->dev, asus, asus 1872 drivers/platform/x86/asus-wmi.c asus->backlight_device = bd; asus 1874 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->store_backlight_power) asus 1875 drivers/platform/x86/asus-wmi.c asus->driver->panel_power = power; asus 1881 drivers/platform/x86/asus-wmi.c asus->driver->brightness = bd->props.brightness; asus 1886 drivers/platform/x86/asus-wmi.c static void asus_wmi_backlight_exit(struct asus_wmi *asus) asus 1888 drivers/platform/x86/asus-wmi.c backlight_device_unregister(asus->backlight_device); asus 1890 drivers/platform/x86/asus-wmi.c asus->backlight_device = NULL; asus 1907 drivers/platform/x86/asus-wmi.c static bool asus_wmi_has_fnlock_key(struct asus_wmi *asus) asus 1911 drivers/platform/x86/asus-wmi.c asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FNLOCK, &result); asus 1917 drivers/platform/x86/asus-wmi.c static void asus_wmi_fnlock_update(struct asus_wmi *asus) asus 1919 drivers/platform/x86/asus-wmi.c int mode = asus->fnlock_locked; asus 1951 drivers/platform/x86/asus-wmi.c static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus) asus 1959 drivers/platform/x86/asus-wmi.c if (asus->driver->key_filter) { asus 1960 drivers/platform/x86/asus-wmi.c asus->driver->key_filter(asus->driver, &code, &key_value, asus 1973 drivers/platform/x86/asus-wmi.c asus_wmi_backlight_notify(asus, orig_code); asus 1979 drivers/platform/x86/asus-wmi.c kbd_led_set_by_kbd(asus, asus->kbd_led_wk + 1); asus 1983 drivers/platform/x86/asus-wmi.c kbd_led_set_by_kbd(asus, asus->kbd_led_wk - 1); asus 1987 drivers/platform/x86/asus-wmi.c if (asus->kbd_led_wk == asus->kbd_led.max_brightness) asus 1988 drivers/platform/x86/asus-wmi.c kbd_led_set_by_kbd(asus, 0); asus 1990 drivers/platform/x86/asus-wmi.c kbd_led_set_by_kbd(asus, asus->kbd_led_wk + 1); asus 1995 drivers/platform/x86/asus-wmi.c asus->fnlock_locked = !asus->fnlock_locked; asus 1996 drivers/platform/x86/asus-wmi.c asus_wmi_fnlock_update(asus); asus 2000 drivers/platform/x86/asus-wmi.c if (asus->fan_boost_mode_available && code == NOTIFY_KBD_FBM) { asus 2001 drivers/platform/x86/asus-wmi.c fan_boost_mode_switch_next(asus); asus 2005 drivers/platform/x86/asus-wmi.c if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle) asus 2008 drivers/platform/x86/asus-wmi.c if (!sparse_keymap_report_event(asus->inputdev, code, asus 2015 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = context; asus 2029 drivers/platform/x86/asus-wmi.c asus_wmi_handle_event_code(code, asus); asus 2035 drivers/platform/x86/asus-wmi.c if (!asus->wmi_event_queue || value != WMI_EVENT_VALUE_ATK) asus 2042 drivers/platform/x86/asus-wmi.c static int asus_wmi_notify_queue_flush(struct asus_wmi *asus) asus 2064 drivers/platform/x86/asus-wmi.c static ssize_t store_sys_wmi(struct asus_wmi *asus, int devid, asus 2070 drivers/platform/x86/asus-wmi.c value = asus_wmi_get_devstate_simple(asus, devid); asus 2085 drivers/platform/x86/asus-wmi.c static ssize_t show_sys_wmi(struct asus_wmi *asus, int devid, char *buf) asus 2087 drivers/platform/x86/asus-wmi.c int value = asus_wmi_get_devstate_simple(asus, devid); asus 2100 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); \ asus 2102 drivers/platform/x86/asus-wmi.c return show_sys_wmi(asus, _cm, buf); \ asus 2108 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); \ asus 2110 drivers/platform/x86/asus-wmi.c return store_sys_wmi(asus, _cm, buf, count); \ asus 2162 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(dev); asus 2177 drivers/platform/x86/asus-wmi.c ok = asus->fan_boost_mode_available; asus 2180 drivers/platform/x86/asus-wmi.c ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0); asus 2202 drivers/platform/x86/asus-wmi.c static int asus_wmi_platform_init(struct asus_wmi *asus) asus 2204 drivers/platform/x86/asus-wmi.c struct device *dev = &asus->platform_device->dev; asus 2215 drivers/platform/x86/asus-wmi.c asus->spec = rv; asus 2226 drivers/platform/x86/asus-wmi.c asus->sfun = rv; asus 2248 drivers/platform/x86/asus-wmi.c asus->dsts_id = ASUS_WMI_METHODID_DCTS; asus 2251 drivers/platform/x86/asus-wmi.c asus->dsts_id = ASUS_WMI_METHODID_DSTS; asus 2263 drivers/platform/x86/asus-wmi.c wmi_uid = wmi_get_acpi_device_uid(asus->driver->event_guid); asus 2267 drivers/platform/x86/asus-wmi.c if (!asus_wmi_notify_queue_flush(asus)) asus 2268 drivers/platform/x86/asus-wmi.c asus->wmi_event_queue = true; asus 2273 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->wapf >= 0) asus 2275 drivers/platform/x86/asus-wmi.c asus->driver->quirks->wapf, NULL); asus 2283 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 2290 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = m->private; asus 2294 drivers/platform/x86/asus-wmi.c err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval); asus 2298 drivers/platform/x86/asus-wmi.c seq_printf(m, "DSTS(%#x) = %#x\n", asus->debug.dev_id, retval); asus 2305 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = m->private; asus 2309 drivers/platform/x86/asus-wmi.c err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param, asus 2314 drivers/platform/x86/asus-wmi.c seq_printf(m, "DEVS(%#x, %#x) = %#x\n", asus->debug.dev_id, asus 2315 drivers/platform/x86/asus-wmi.c asus->debug.ctrl_param, retval); asus 2322 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = m->private; asus 2324 drivers/platform/x86/asus-wmi.c .arg0 = asus->debug.dev_id, asus 2325 drivers/platform/x86/asus-wmi.c .arg1 = asus->debug.ctrl_param, asus 2333 drivers/platform/x86/asus-wmi.c 0, asus->debug.method_id, asus 2341 drivers/platform/x86/asus-wmi.c seq_printf(m, "%#x(%#x, %#x) = %#x\n", asus->debug.method_id, asus 2342 drivers/platform/x86/asus-wmi.c asus->debug.dev_id, asus->debug.ctrl_param, asus 2345 drivers/platform/x86/asus-wmi.c seq_printf(m, "%#x(%#x, %#x) = t:%d\n", asus->debug.method_id, asus 2346 drivers/platform/x86/asus-wmi.c asus->debug.dev_id, asus->debug.ctrl_param, asus 2364 drivers/platform/x86/asus-wmi.c return single_open(file, node->show, node->asus); asus 2375 drivers/platform/x86/asus-wmi.c static void asus_wmi_debugfs_exit(struct asus_wmi *asus) asus 2377 drivers/platform/x86/asus-wmi.c debugfs_remove_recursive(asus->debug.root); asus 2380 drivers/platform/x86/asus-wmi.c static void asus_wmi_debugfs_init(struct asus_wmi *asus) asus 2384 drivers/platform/x86/asus-wmi.c asus->debug.root = debugfs_create_dir(asus->driver->name, NULL); asus 2386 drivers/platform/x86/asus-wmi.c debugfs_create_x32("method_id", S_IRUGO | S_IWUSR, asus->debug.root, asus 2387 drivers/platform/x86/asus-wmi.c &asus->debug.method_id); asus 2389 drivers/platform/x86/asus-wmi.c debugfs_create_x32("dev_id", S_IRUGO | S_IWUSR, asus->debug.root, asus 2390 drivers/platform/x86/asus-wmi.c &asus->debug.dev_id); asus 2392 drivers/platform/x86/asus-wmi.c debugfs_create_x32("ctrl_param", S_IRUGO | S_IWUSR, asus->debug.root, asus 2393 drivers/platform/x86/asus-wmi.c &asus->debug.ctrl_param); asus 2398 drivers/platform/x86/asus-wmi.c node->asus = asus; asus 2400 drivers/platform/x86/asus-wmi.c asus->debug.root, node, asus 2411 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 2417 drivers/platform/x86/asus-wmi.c asus = kzalloc(sizeof(struct asus_wmi), GFP_KERNEL); asus 2418 drivers/platform/x86/asus-wmi.c if (!asus) asus 2421 drivers/platform/x86/asus-wmi.c asus->driver = wdrv; asus 2422 drivers/platform/x86/asus-wmi.c asus->platform_device = pdev; asus 2424 drivers/platform/x86/asus-wmi.c platform_set_drvdata(asus->platform_device, asus); asus 2427 drivers/platform/x86/asus-wmi.c wdrv->detect_quirks(asus->driver); asus 2429 drivers/platform/x86/asus-wmi.c err = asus_wmi_platform_init(asus); asus 2433 drivers/platform/x86/asus-wmi.c err = fan_boost_mode_check_present(asus); asus 2437 drivers/platform/x86/asus-wmi.c err = asus_wmi_sysfs_init(asus->platform_device); asus 2441 drivers/platform/x86/asus-wmi.c err = asus_wmi_input_init(asus); asus 2445 drivers/platform/x86/asus-wmi.c err = asus_wmi_fan_init(asus); /* probably no problems on error */ asus 2447 drivers/platform/x86/asus-wmi.c err = asus_wmi_hwmon_init(asus); asus 2451 drivers/platform/x86/asus-wmi.c err = asus_wmi_led_init(asus); asus 2455 drivers/platform/x86/asus-wmi.c asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result); asus 2457 drivers/platform/x86/asus-wmi.c asus->driver->wlan_ctrl_by_user = 1; asus 2459 drivers/platform/x86/asus-wmi.c if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) { asus 2460 drivers/platform/x86/asus-wmi.c err = asus_wmi_rfkill_init(asus); asus 2465 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->wmi_force_als_set) asus 2474 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->wmi_backlight_power) asus 2477 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->wmi_backlight_native) asus 2480 drivers/platform/x86/asus-wmi.c if (asus->driver->quirks->xusb2pr) asus 2481 drivers/platform/x86/asus-wmi.c asus_wmi_set_xusb2pr(asus); asus 2484 drivers/platform/x86/asus-wmi.c err = asus_wmi_backlight_init(asus); asus 2487 drivers/platform/x86/asus-wmi.c } else if (asus->driver->quirks->wmi_backlight_set_devstate) asus 2490 drivers/platform/x86/asus-wmi.c if (asus_wmi_has_fnlock_key(asus)) { asus 2491 drivers/platform/x86/asus-wmi.c asus->fnlock_locked = true; asus 2492 drivers/platform/x86/asus-wmi.c asus_wmi_fnlock_update(asus); asus 2495 drivers/platform/x86/asus-wmi.c status = wmi_install_notify_handler(asus->driver->event_guid, asus 2496 drivers/platform/x86/asus-wmi.c asus_wmi_notify, asus); asus 2503 drivers/platform/x86/asus-wmi.c asus_wmi_battery_init(asus); asus 2505 drivers/platform/x86/asus-wmi.c asus_wmi_debugfs_init(asus); asus 2510 drivers/platform/x86/asus-wmi.c asus_wmi_backlight_exit(asus); asus 2512 drivers/platform/x86/asus-wmi.c asus_wmi_rfkill_exit(asus); asus 2514 drivers/platform/x86/asus-wmi.c asus_wmi_led_exit(asus); asus 2517 drivers/platform/x86/asus-wmi.c asus_wmi_input_exit(asus); asus 2519 drivers/platform/x86/asus-wmi.c asus_wmi_sysfs_exit(asus->platform_device); asus 2523 drivers/platform/x86/asus-wmi.c kfree(asus); asus 2529 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus; asus 2531 drivers/platform/x86/asus-wmi.c asus = platform_get_drvdata(device); asus 2532 drivers/platform/x86/asus-wmi.c wmi_remove_notify_handler(asus->driver->event_guid); asus 2533 drivers/platform/x86/asus-wmi.c asus_wmi_backlight_exit(asus); asus 2534 drivers/platform/x86/asus-wmi.c asus_wmi_input_exit(asus); asus 2535 drivers/platform/x86/asus-wmi.c asus_wmi_led_exit(asus); asus 2536 drivers/platform/x86/asus-wmi.c asus_wmi_rfkill_exit(asus); asus 2537 drivers/platform/x86/asus-wmi.c asus_wmi_debugfs_exit(asus); asus 2538 drivers/platform/x86/asus-wmi.c asus_wmi_sysfs_exit(asus->platform_device); asus 2539 drivers/platform/x86/asus-wmi.c asus_fan_set_auto(asus); asus 2540 drivers/platform/x86/asus-wmi.c asus_wmi_battery_exit(asus); asus 2542 drivers/platform/x86/asus-wmi.c kfree(asus); asus 2550 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(device); asus 2552 drivers/platform/x86/asus-wmi.c if (asus->wlan.rfkill) { asus 2560 drivers/platform/x86/asus-wmi.c wlan = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WLAN); asus 2569 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(device); asus 2571 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->kbd_led.dev)) asus 2572 drivers/platform/x86/asus-wmi.c kbd_led_update(asus); asus 2574 drivers/platform/x86/asus-wmi.c if (asus_wmi_has_fnlock_key(asus)) asus 2575 drivers/platform/x86/asus-wmi.c asus_wmi_fnlock_update(asus); asus 2581 drivers/platform/x86/asus-wmi.c struct asus_wmi *asus = dev_get_drvdata(device); asus 2585 drivers/platform/x86/asus-wmi.c if (asus->wlan.rfkill) asus 2586 drivers/platform/x86/asus-wmi.c asus_rfkill_hotplug(asus); asus 2588 drivers/platform/x86/asus-wmi.c if (asus->bluetooth.rfkill) { asus 2589 drivers/platform/x86/asus-wmi.c bl = !asus_wmi_get_devstate_simple(asus, asus 2591 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->bluetooth.rfkill, bl); asus 2593 drivers/platform/x86/asus-wmi.c if (asus->wimax.rfkill) { asus 2594 drivers/platform/x86/asus-wmi.c bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WIMAX); asus 2595 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->wimax.rfkill, bl); asus 2597 drivers/platform/x86/asus-wmi.c if (asus->wwan3g.rfkill) { asus 2598 drivers/platform/x86/asus-wmi.c bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WWAN3G); asus 2599 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->wwan3g.rfkill, bl); asus 2601 drivers/platform/x86/asus-wmi.c if (asus->gps.rfkill) { asus 2602 drivers/platform/x86/asus-wmi.c bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_GPS); asus 2603 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->gps.rfkill, bl); asus 2605 drivers/platform/x86/asus-wmi.c if (asus->uwb.rfkill) { asus 2606 drivers/platform/x86/asus-wmi.c bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_UWB); asus 2607 drivers/platform/x86/asus-wmi.c rfkill_set_sw_state(asus->uwb.rfkill, bl); asus 2609 drivers/platform/x86/asus-wmi.c if (!IS_ERR_OR_NULL(asus->kbd_led.dev)) asus 2610 drivers/platform/x86/asus-wmi.c kbd_led_update(asus); asus 2612 drivers/platform/x86/asus-wmi.c if (asus_wmi_has_fnlock_key(asus)) asus 2613 drivers/platform/x86/asus-wmi.c asus_wmi_fnlock_update(asus);