Lines Matching full:asc

375 	struct apple_sc *asc = hid_get_drvdata(hid);  in hidinput_apple_event()  local
384 asc->fn_on = !!value; in hidinput_apple_event()
391 real_fnmode = (asc->quirks & APPLE_IS_NON_APPLE) ? 2 : 1; in hidinput_apple_event()
445 do_translate = !asc->fn_on; in hidinput_apple_event()
448 do_translate = asc->fn_on; in hidinput_apple_event()
455 do_translate = asc->fn_on; in hidinput_apple_event()
466 if (asc->quirks & APPLE_NUMLOCK_EMULATION && in hidinput_apple_event()
467 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event()
475 asc->pressed_numlock); in hidinput_apple_event()
478 asc->pressed_numlock); in hidinput_apple_event()
488 if (iso_layout > 0 || (iso_layout < 0 && (asc->quirks & APPLE_ISO_TILDE_QUIRK) && in hidinput_apple_event()
522 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_event() local
528 if ((asc->quirks & APPLE_INVERT_HWHEEL) && in apple_event()
535 if ((asc->quirks & APPLE_HAS_FN) && in apple_event()
547 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_fetch_battery() local
551 if (!(asc->quirks & APPLE_RDESC_BATTERY) || !hdev->battery) in apple_fetch_battery()
572 struct apple_sc *asc = from_timer(asc, t, battery_timer); in apple_battery_timer_tick() local
573 struct hid_device *hdev = asc->hdev; in apple_battery_timer_tick()
576 mod_timer(&asc->battery_timer, in apple_battery_timer_tick()
588 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_report_fixup() local
596 if ((asc->quirks & APPLE_RDESC_JIS) && *rsize >= 60 && in apple_report_fixup()
611 if ((asc->quirks & APPLE_RDESC_BATTERY) && *rsize == 83 && in apple_report_fixup()
652 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_input_mapping() local
660 asc->fn_found = true; in apple_input_mapping()
673 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_input_mapped() local
675 if (asc->quirks & APPLE_MIGHTYMOUSE) { in apple_input_mapped()
690 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_input_configured() local
692 if ((asc->quirks & APPLE_HAS_FN) && !asc->fn_found) { in apple_input_configured()
694 asc->quirks &= ~APPLE_HAS_FN; in apple_input_configured()
699 asc->quirks |= APPLE_IS_NON_APPLE; in apple_input_configured()
755 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_backlight_init() local
780 asc->backlight = devm_kzalloc(&hdev->dev, sizeof(*asc->backlight), GFP_KERNEL); in apple_backlight_init()
781 if (!asc->backlight) { in apple_backlight_init()
786 asc->backlight->hdev = hdev; in apple_backlight_init()
787 asc->backlight->cdev.name = "apple::kbd_backlight"; in apple_backlight_init()
788 asc->backlight->cdev.max_brightness = rep->backlight_on_max; in apple_backlight_init()
789 asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set; in apple_backlight_init()
797 ret = devm_led_classdev_register(&hdev->dev, &asc->backlight->cdev); in apple_backlight_init()
808 struct apple_sc *asc; in apple_probe() local
811 asc = devm_kzalloc(&hdev->dev, sizeof(*asc), GFP_KERNEL); in apple_probe()
812 if (asc == NULL) { in apple_probe()
817 asc->hdev = hdev; in apple_probe()
818 asc->quirks = quirks; in apple_probe()
820 hid_set_drvdata(hdev, asc); in apple_probe()
834 timer_setup(&asc->battery_timer, apple_battery_timer_tick, 0); in apple_probe()
835 mod_timer(&asc->battery_timer, in apple_probe()
847 struct apple_sc *asc = hid_get_drvdata(hdev); in apple_remove() local
849 del_timer_sync(&asc->battery_timer); in apple_remove()