USBA_HCDI_DEVICE_INIT(9E)    Driver Entry Points   USBA_HCDI_DEVICE_INIT(9E)
NAME
     usba_hcdi_device_init, 
usba_hcdi_device_fini - USB device
     initialization and finalization
SYNOPSIS
     #include <sys/usb/usba/hcdi.h>     int     prefix_hcdi_device_init(
usba_device_t *usb_device, 
usb_port_t port,         
void **hcd_privatep);     
void     prefix_hcdi_device_fini(
usba_device_t *usb_device, 
usb_port_t port,         
void *hcd_private);
INTERFACE LEVEL
     Volatile - illumos USB HCD private function
     This is a private function that is not part of the stable DDI.  It may
     be removed or changed at any time.
PARAMETERS
     usb_device    Pointer to a USB device structure.     
port          The port number the device was detected on.     
hcd_privatep  Pointer to storage space for a HCD driver to store
                   private data for the device.     
hcd_private   Pointer to the HCD driver's private data for the device.
DESCRIPTION
     The 
usba_hcdi_device_init() entry point is an optional entry point.  It
     will be called when child devices of the root hub are being
     initialized.  A call to this entry point will occur before any calls to
     open a pipe to the child device through the 
usba_hcdi_pipe_open(9E)     entry point.
     During this time, the HCD driver should do any required initialization
     required by the host controller.  The HCD may also opt to store private
     data for this device as a result of whatever initialization it
     performed.  The data should be stored in the 
hcd_privatep pointer.
     Data stored this will be accessible to the HCD driver through the     
usba_hcdi_get_device_private(9F) function.
     The 
usba_hcdi_device_fini() entry point is an optional entry point.  It
     will be called when child devices of the root hub are being removed.
     The HCD should perform any necessary work with the root controller to
     finish tearing down the device.  In addition, if the HCD stored private
     data it will a pointer to it in the 
hcd_private pointer.  The HCD
     driver must release any resources associated with its private data.  If
     it does not, the resources will be leaked.
     At the time 
usba_hcdi_device_fini() is called, all associated pipes
     should have been closed through the 
usba_hcdi_pipe_close(9E) function.
     The HCD driver is guaranteed that no other entry points will be invoked
     for the USB device 
usb_device while a call to either function is
     ongoing.  However, the entry point may be called in parallel on behalf
     of separate devices.
CONTEXT
     This function is called from kernel context only.
RETURN VALUES
     Upon successful completion, the 
usba_hcdi_device_init() function should
     return 
USB_SUCCESS.  Otherwise, it should return the appropriate error.
SEE ALSO
     usba_hcdi(9E), 
usba_hcdi_pipe_close(9E), 
usba_hcdi_pipe_open(9E)illumos                          May 7, 2016                         illumos