Changes in uspace/drv/bus/usb/usbhub/usbhub.h [54d1ad9:5203e256] in mainline
- File:
-
- 1 edited
-
uspace/drv/bus/usb/usbhub/usbhub.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.h
r54d1ad9 r5203e256 1 1 /* 2 2 * Copyright (c) 2010 Vojtech Horky 3 * Copyright (c) 2011 Vojtech Horky4 3 * All rights reserved. 5 4 * … … 27 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 27 */ 28 29 29 /** @addtogroup drvusbhub 30 30 * @{ … … 49 49 #define NAME "usbhub" 50 50 51 #include "port .h"51 #include "ports.h" 52 52 53 53 /** Information about attached hub. */ 54 struct usb_hub_ dev{54 struct usb_hub_info_t { 55 55 /** Number of ports. */ 56 56 size_t port_count; 57 /** Port structures, one for each port */ 57 58 /** attached device handles, for each port one */ 58 59 usb_hub_port_t *ports; 59 /** Connection to hcd */ 60 61 fibril_mutex_t port_mutex; 62 63 /** connection to hcd */ 60 64 usb_hc_connection_t connection; 61 /** Generic usb device data*/ 62 usb_device_t *usb_device; 65 66 /** default address is used indicator 67 * 68 * If default address is requested by this device, it cannot 69 * be requested by the same hub again, otherwise a deadlock will occur. 70 */ 71 bool is_default_address_used; 72 73 /** convenience pointer to status change pipe 74 * 75 * Status change pipe is initialized in usb_device structure. This is 76 * pointer into this structure, so that it does not have to be 77 * searched again and again for the 'right pipe'. 78 */ 79 usb_pipe_t * status_change_pipe; 80 81 /** convenience pointer to control pipe 82 * 83 * Control pipe is initialized in usb_device structure. This is 84 * pointer into this structure, so that it does not have to be 85 * searched again and again for the 'right pipe'. 86 */ 87 usb_pipe_t * control_pipe; 88 89 /** generic usb device data*/ 90 usb_device_t * usb_device; 63 91 64 92 /** Number of pending operations on the mutex to prevent shooting … … 73 101 /** Condition variable for pending_ops_count. */ 74 102 fibril_condvar_t pending_ops_cv; 75 /** Pointer to devman usbhub function. */ 76 ddf_fun_t *hub_fun; 77 /** Status indicator */ 78 bool running; 79 /** Hub supports port power switching. */ 80 bool power_switched; 81 /** Each port is switched individually. */ 82 bool per_port_power; 103 83 104 }; 84 105 85 int usb_hub_device_add(usb_device_t *usb_dev); 86 int usb_hub_device_remove(usb_device_t *usb_dev); 87 int usb_hub_device_gone(usb_device_t *usb_dev); 106 int usb_hub_add_device(usb_device_t *usb_dev); 88 107 89 108 bool hub_port_changes_callback(usb_device_t *dev,
Note:
See TracChangeset
for help on using the changeset viewer.
