Lines Matching refs:ac

143 	struct atopcase_child *ac;  in atopcase_process_message()  local
171 if ((ac = atopcase_get_child_by_device(sc, device)) != NULL in atopcase_process_message()
173 if (ac->open) in atopcase_process_message()
174 ac->intr_handler(ac->intr_ctx, payload, pl_len); in atopcase_process_message()
177 && (ac = atopcase_get_child_by_device(sc, hdr->type_arg)) != NULL) { in atopcase_process_message()
179 CPOFF(ac->name, iface->name_len, iface->name_off); in atopcase_process_message()
180 DPRINTF("Interface #%d name: %s\n", ac->device, ac->name); in atopcase_process_message()
183 && (ac = atopcase_get_child_by_device(sc, hdr->type_arg)) != NULL) { in atopcase_process_message()
184 memcpy(ac->rdesc, payload, pl_len); in atopcase_process_message()
185 ac->rdesc_len = ac->hw.rdescsize = pl_len; in atopcase_process_message()
186 DPRINTF("%s HID report descriptor: %*D\n", ac->name, in atopcase_process_message()
187 (int) ac->hw.rdescsize, ac->rdesc, " "); in atopcase_process_message()
439 atopcase_add_child(struct atopcase_softc *sc, struct atopcase_child *ac, in atopcase_add_child() argument
445 ac->device = device; in atopcase_add_child()
448 strlcpy(ac->hw.name, "Apple MacBook", sizeof(ac->hw.name)); in atopcase_add_child()
449 ac->hw.idBus = BUS_SPI; in atopcase_add_child()
450 ac->hw.idVendor = sc->sc_vid; in atopcase_add_child()
451 ac->hw.idProduct = sc->sc_pid; in atopcase_add_child()
452 ac->hw.idVersion = sc->sc_ver; in atopcase_add_child()
453 strlcpy(ac->hw.idPnP, sc->sc_hid, sizeof(ac->hw.idPnP)); in atopcase_add_child()
454 strlcpy(ac->hw.serial, sc->sc_serial, sizeof(ac->hw.serial)); in atopcase_add_child()
461 hid_add_dynamic_quirk(&ac->hw, HQ_NOWRITE); in atopcase_add_child()
471 DPRINTF("Get the \"%s\" HID report descriptor\n", ac->name); in atopcase_add_child()
485 device_set_ivars(hidbus, &ac->hw); in atopcase_add_child()
486 ac->hidbus = hidbus; in atopcase_add_child()
574 struct atopcase_child *ac = atopcase_get_child_by_hidbus(child); in atopcase_intr_setup() local
584 ac->intr_handler = intr; in atopcase_intr_setup()
585 ac->intr_ctx = context; in atopcase_intr_setup()
597 struct atopcase_child *ac = atopcase_get_child_by_hidbus(child); in atopcase_intr_start() local
605 ac->open = true; in atopcase_intr_start()
620 struct atopcase_child *ac = atopcase_get_child_by_hidbus(child); in atopcase_intr_stop() local
628 ac->open = false; in atopcase_intr_stop()
650 struct atopcase_child *ac = atopcase_get_child_by_hidbus(child); in atopcase_get_rdesc() local
652 if (ac->rdesc_len != len) in atopcase_get_rdesc()
654 memcpy(buf, ac->rdesc, len); in atopcase_get_rdesc()
664 struct atopcase_child *ac = atopcase_get_child_by_hidbus(child); in atopcase_set_report() local
671 ac->name, id, len, len, buf, " "); in atopcase_set_report()
675 atopcase_create_message(&sc->sc_buf, ac->device, in atopcase_set_report()
676 ATOPCASE_MSG_TYPE_SET_REPORT(ac->device, id), 0, buf, len, 0); in atopcase_set_report()