102ac6454SAndrew Thompson /* $FreeBSD$ */ 202ac6454SAndrew Thompson /*- 3*718cf2ccSPedro F. Giffuni * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 4*718cf2ccSPedro F. Giffuni * 502ac6454SAndrew Thompson * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 602ac6454SAndrew Thompson * 702ac6454SAndrew Thompson * Redistribution and use in source and binary forms, with or without 802ac6454SAndrew Thompson * modification, are permitted provided that the following conditions 902ac6454SAndrew Thompson * are met: 1002ac6454SAndrew Thompson * 1. Redistributions of source code must retain the above copyright 1102ac6454SAndrew Thompson * notice, this list of conditions and the following disclaimer. 1202ac6454SAndrew Thompson * 2. Redistributions in binary form must reproduce the above copyright 1302ac6454SAndrew Thompson * notice, this list of conditions and the following disclaimer in the 1402ac6454SAndrew Thompson * documentation and/or other materials provided with the distribution. 1502ac6454SAndrew Thompson * 1602ac6454SAndrew Thompson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1702ac6454SAndrew Thompson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1802ac6454SAndrew Thompson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1902ac6454SAndrew Thompson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2002ac6454SAndrew Thompson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2102ac6454SAndrew Thompson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2202ac6454SAndrew Thompson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2302ac6454SAndrew Thompson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2402ac6454SAndrew Thompson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2502ac6454SAndrew Thompson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2602ac6454SAndrew Thompson * SUCH DAMAGE. 2702ac6454SAndrew Thompson */ 2802ac6454SAndrew Thompson 2975973647SAndrew Thompson #ifndef _USB_DYNAMIC_H_ 3075973647SAndrew Thompson #define _USB_DYNAMIC_H_ 3102ac6454SAndrew Thompson 3202ac6454SAndrew Thompson /* prototypes */ 3302ac6454SAndrew Thompson 34760bc48eSAndrew Thompson struct usb_device; 35a593f6b8SAndrew Thompson struct usbd_lookup_info; 36760bc48eSAndrew Thompson struct usb_device_request; 3702ac6454SAndrew Thompson 3802ac6454SAndrew Thompson /* typedefs */ 3902ac6454SAndrew Thompson 40a593f6b8SAndrew Thompson typedef usb_error_t (usb_temp_setup_by_index_t)(struct usb_device *udev, 4102ac6454SAndrew Thompson uint16_t index); 42a593f6b8SAndrew Thompson typedef uint8_t (usb_test_quirk_t)(const struct usbd_lookup_info *info, 4302ac6454SAndrew Thompson uint16_t quirk); 44a593f6b8SAndrew Thompson typedef int (usb_quirk_ioctl_t)(unsigned long cmd, caddr_t data, 4502ac6454SAndrew Thompson int fflag, struct thread *td); 46a593f6b8SAndrew Thompson typedef void (usb_temp_unsetup_t)(struct usb_device *udev); 478d59ecb2SHans Petter Selasky typedef void (usb_linux_free_device_t)(struct usb_device *udev); 4802ac6454SAndrew Thompson 4902ac6454SAndrew Thompson /* global function pointers */ 5002ac6454SAndrew Thompson 51a593f6b8SAndrew Thompson extern usb_handle_req_t *usb_temp_get_desc_p; 52a593f6b8SAndrew Thompson extern usb_temp_setup_by_index_t *usb_temp_setup_by_index_p; 538d59ecb2SHans Petter Selasky extern usb_linux_free_device_t *usb_linux_free_device_p; 54a593f6b8SAndrew Thompson extern usb_temp_unsetup_t *usb_temp_unsetup_p; 55a593f6b8SAndrew Thompson extern usb_test_quirk_t *usb_test_quirk_p; 56a593f6b8SAndrew Thompson extern usb_quirk_ioctl_t *usb_quirk_ioctl_p; 57a593f6b8SAndrew Thompson extern devclass_t usb_devclass_ptr; 5802ac6454SAndrew Thompson 5902ac6454SAndrew Thompson /* function prototypes */ 6002ac6454SAndrew Thompson 618d59ecb2SHans Petter Selasky void usb_linux_unload(void *); 62a593f6b8SAndrew Thompson void usb_temp_unload(void *); 63a593f6b8SAndrew Thompson void usb_quirk_unload(void *); 64a593f6b8SAndrew Thompson void usb_bus_unload(void *); 6502ac6454SAndrew Thompson 6675973647SAndrew Thompson #endif /* _USB_DYNAMIC_H_ */ 67