xref: /freebsd/sys/dev/usb/controller/generic_usb_if.m (revision 031beb4e239bfce798af17f5fe8dba8bcaf13d99)
1*d71896a7SEmmanuel Vadot#-
2*d71896a7SEmmanuel Vadot# Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org>
3*d71896a7SEmmanuel Vadot#
4*d71896a7SEmmanuel Vadot# Redistribution and use in source and binary forms, with or without
5*d71896a7SEmmanuel Vadot# modification, are permitted provided that the following conditions
6*d71896a7SEmmanuel Vadot# are met:
7*d71896a7SEmmanuel Vadot# 1. Redistributions of source code must retain the above copyright
8*d71896a7SEmmanuel Vadot#    notice, this list of conditions and the following disclaimer.
9*d71896a7SEmmanuel Vadot# 2. Redistributions in binary form must reproduce the above copyright
10*d71896a7SEmmanuel Vadot#    notice, this list of conditions and the following disclaimer in the
11*d71896a7SEmmanuel Vadot#    documentation and/or other materials provided with the distribution.
12*d71896a7SEmmanuel Vadot#
13*d71896a7SEmmanuel Vadot# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*d71896a7SEmmanuel Vadot# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*d71896a7SEmmanuel Vadot# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*d71896a7SEmmanuel Vadot# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*d71896a7SEmmanuel Vadot# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*d71896a7SEmmanuel Vadot# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*d71896a7SEmmanuel Vadot# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*d71896a7SEmmanuel Vadot# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*d71896a7SEmmanuel Vadot# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*d71896a7SEmmanuel Vadot# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*d71896a7SEmmanuel Vadot# SUCH DAMAGE.
24*d71896a7SEmmanuel Vadot#
25*d71896a7SEmmanuel Vadot#
26*d71896a7SEmmanuel Vadot
27*d71896a7SEmmanuel VadotINTERFACE generic_usb;
28*d71896a7SEmmanuel Vadot
29*d71896a7SEmmanuel VadotCODE {
30*d71896a7SEmmanuel Vadot	static int
31*d71896a7SEmmanuel Vadot	generic_usb_default_init(device_t dev)
32*d71896a7SEmmanuel Vadot	{
33*d71896a7SEmmanuel Vadot		return (0);
34*d71896a7SEmmanuel Vadot	}
35*d71896a7SEmmanuel Vadot
36*d71896a7SEmmanuel Vadot	static int
37*d71896a7SEmmanuel Vadot	generic_usb_default_deinit(device_t dev)
38*d71896a7SEmmanuel Vadot	{
39*d71896a7SEmmanuel Vadot		return (0);
40*d71896a7SEmmanuel Vadot	}
41*d71896a7SEmmanuel Vadot};
42*d71896a7SEmmanuel Vadot
43*d71896a7SEmmanuel VadotHEADER {
44*d71896a7SEmmanuel Vadot};
45*d71896a7SEmmanuel Vadot
46*d71896a7SEmmanuel Vadot#
47*d71896a7SEmmanuel Vadot# Initialize the SoC bits
48*d71896a7SEmmanuel Vadot#
49*d71896a7SEmmanuel VadotMETHOD int init {
50*d71896a7SEmmanuel Vadot	device_t dev;
51*d71896a7SEmmanuel Vadot} DEFAULT generic_usb_default_init;
52*d71896a7SEmmanuel Vadot
53*d71896a7SEmmanuel Vadot#
54*d71896a7SEmmanuel Vadot# Deinitialize the SoC bits
55*d71896a7SEmmanuel Vadot#
56*d71896a7SEmmanuel VadotMETHOD int deinit {
57*d71896a7SEmmanuel Vadot	device_t dev;
58*d71896a7SEmmanuel Vadot} DEFAULT generic_usb_default_deinit;
59