Lines Matching +full:camera +full:- +full:command +full:- +full:set
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
71 if (ppbdev->flags != 0) in ppbus_print_child()
72 retval += printf(" flags 0x%x", ppbdev->flags); in ppbus_print_child()
105 ppbdev->name = name; in ppbus_add_child()
169 "digital camera", "unknown device", NULL };
182 #define UNKNOWN_LENGTH -1 in search_token()
193 for (i = 0; i <= slen-tlen; i++) { in search_token()
204 * Returns the class id. of the peripherial, -1 otherwise
211 int class_id = -1; in ppb_pnp_detect()
261 (token = search_token(str, len, "COMMAND")) != NULL) in ppb_pnp_detect()
301 if ((ppb->state == PPB_ERROR) && (ppb->error == PPB_NOT_IEEE1284)) in ppb_scan_bus()
369 ppb->class_id = ppb_pnp_detect(bus); in ppb_scan_bus()
386 (uintptr_t *)&ppb->ppc_lock); in ppbus_attach()
393 ppb->ppc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, in ppbus_attach()
395 if (ppb->ppc_irq_res != NULL) { in ppbus_attach()
396 mtx_lock(ppb->ppc_lock); in ppbus_attach()
399 mtx_unlock(ppb->ppc_lock); in ppbus_attach()
401 device_printf(dev, "Unable to set interrupt handler\n"); in ppbus_attach()
411 mtx_lock(ppb->ppc_lock); in ppbus_attach()
413 mtx_unlock(ppb->ppc_lock); in ppbus_attach()
428 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppbus_intr()
429 if (ppb->ppb_owner == NULL) in ppbus_intr()
432 ppbdev = device_get_ivars(ppb->ppb_owner); in ppbus_intr()
433 if (ppbdev->intr_hook == NULL) in ppbus_intr()
436 ppbdev->intr_hook(ppbdev->intr_arg); in ppbus_intr()
452 if (ppb->ppc_irq_res != r) in ppbus_setup_intr()
455 mtx_lock(ppb->ppc_lock); in ppbus_setup_intr()
456 ppbdev->intr_hook = ihand; in ppbus_setup_intr()
457 ppbdev->intr_arg = arg; in ppbus_setup_intr()
459 mtx_unlock(ppb->ppc_lock); in ppbus_setup_intr()
470 mtx_lock(ppb->ppc_lock); in ppbus_teardown_intr()
471 if (ppbdev != ih || ppb->ppc_irq_res != r) { in ppbus_teardown_intr()
472 mtx_unlock(ppb->ppc_lock); in ppbus_teardown_intr()
476 ppbdev->intr_hook = NULL; in ppbus_teardown_intr()
477 mtx_unlock(ppb->ppc_lock); in ppbus_teardown_intr()
496 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_request_bus()
498 if (ppb->ppb_owner) { in ppb_request_bus()
501 error = mtx_sleep(ppb, ppb->ppc_lock, in ppb_request_bus()
506 error = mtx_sleep(ppb, ppb->ppc_lock, PPBPRI, in ppb_request_bus()
515 ppb->ppb_owner = dev; in ppb_request_bus()
520 * drivers that do not set there operating mode in ppb_request_bus()
523 if (ppbdev->ctx.valid) in ppb_request_bus()
524 ppb_set_mode(bus, ppbdev->ctx.mode); in ppb_request_bus()
544 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_release_bus()
545 if (ppb->ppb_owner != dev) in ppb_release_bus()
549 ppbdev->ctx.mode = ppb_get_mode(bus); in ppb_release_bus()
552 ppbdev->ctx.valid = 1; in ppb_release_bus()
554 ppb->ppb_owner = 0; in ppb_release_bus()