FreeBSD kernel usb device Code
usb_nop_xceiv.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <machine/bus.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/extres/clk/clk.h>
#include <dev/extres/regulator/regulator.h>
#include <dev/extres/phy/phy_usb.h>
#include "phynode_if.h"
Include dependency graph for usb_nop_xceiv.c:

Go to the source code of this file.

Data Structures

struct  usb_nop_xceiv_softc
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int usb_nop_xceiv_phy_enable (struct phynode *phy, bool enable)
 
 DEFINE_CLASS_1 (usb_nop_xceiv_phynode, usb_nop_xceiv_phynode_class, usb_nop_xceiv_phynode_methods, sizeof(struct phynode_usb_sc), phynode_usb_class)
 
static int usb_nop_xceiv_probe (device_t dev)
 
static int usb_nop_xceiv_attach (device_t dev)
 
static int usb_nop_xceiv_detach (device_t dev)
 
 EARLY_DRIVER_MODULE (usb_nop_xceiv, simplebus, usb_nop_xceiv_driver, usb_nop_xceiv_devclass, 0, 0, BUS_PASS_SUPPORTDEV+BUS_PASS_ORDER_MIDDLE)
 

Variables

static struct ofw_compat_data compat_data []
 
static phynode_usb_method_t usb_nop_xceiv_phynode_methods []
 
static device_method_t usb_nop_xceiv_methods []
 
static devclass_t usb_nop_xceiv_devclass
 
static driver_t usb_nop_xceiv_driver
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DEFINE_CLASS_1()

DEFINE_CLASS_1 ( usb_nop_xceiv_phynode  ,
usb_nop_xceiv_phynode_class  ,
usb_nop_xceiv_phynode_methods  ,
sizeof(struct phynode_usb_sc)  ,
phynode_usb_class   
)

◆ EARLY_DRIVER_MODULE()

EARLY_DRIVER_MODULE ( usb_nop_xceiv  ,
simplebus  ,
usb_nop_xceiv_driver  ,
usb_nop_xceiv_devclass  ,
,
,
BUS_PASS_SUPPORTDEV+  BUS_PASS_ORDER_MIDDLE 
)

◆ usb_nop_xceiv_attach()

static int usb_nop_xceiv_attach ( device_t  dev)
static

◆ usb_nop_xceiv_detach()

static int usb_nop_xceiv_detach ( device_t  dev)
static

Definition at line 187 of file usb_nop_xceiv.c.

◆ usb_nop_xceiv_phy_enable()

static int usb_nop_xceiv_phy_enable ( struct phynode *  phy,
bool  enable 
)
static

◆ usb_nop_xceiv_probe()

static int usb_nop_xceiv_probe ( device_t  dev)
static

Definition at line 131 of file usb_nop_xceiv.c.

References compat_data, and usb_nop_xceiv_softc::dev.

Variable Documentation

◆ compat_data

struct ofw_compat_data compat_data[]
static
Initial value:
= {
{"usb-nop-xceiv", 1},
{NULL, 0}
}

Definition at line 60 of file usb_nop_xceiv.c.

Referenced by usb_nop_xceiv_probe().

◆ usb_nop_xceiv_devclass

devclass_t usb_nop_xceiv_devclass
static

Definition at line 202 of file usb_nop_xceiv.c.

◆ usb_nop_xceiv_driver

driver_t usb_nop_xceiv_driver
static
Initial value:
= {
"usb_nop_xceiv",
sizeof(struct usb_nop_xceiv_softc),
}
static device_method_t usb_nop_xceiv_methods[]

Definition at line 204 of file usb_nop_xceiv.c.

◆ usb_nop_xceiv_methods

device_method_t usb_nop_xceiv_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, usb_nop_xceiv_probe),
DEVMETHOD(device_attach, usb_nop_xceiv_attach),
DEVMETHOD(device_detach, usb_nop_xceiv_detach),
DEVMETHOD_END
}
static int usb_nop_xceiv_attach(device_t dev)
static int usb_nop_xceiv_probe(device_t dev)
static int usb_nop_xceiv_detach(device_t dev)

Definition at line 193 of file usb_nop_xceiv.c.

◆ usb_nop_xceiv_phynode_methods

phynode_usb_method_t usb_nop_xceiv_phynode_methods[]
static
Initial value:
= {
PHYNODEMETHOD(phynode_enable, usb_nop_xceiv_phy_enable),
PHYNODEMETHOD_END
}
static int usb_nop_xceiv_phy_enable(struct phynode *phy, bool enable)
Definition: usb_nop_xceiv.c:77

Definition at line 67 of file usb_nop_xceiv.c.