Changeset 00aece0 in mainline for uspace/drv/bus/usb/usbhub/usbhub.h


Ignore:
Timestamp:
2012-02-18T16:47:38Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4449c6c
Parents:
bd5f3b7 (diff), f943dd3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/usbhub.h

    rbd5f3b7 r00aece0  
    11/*
    22 * Copyright (c) 2010 Vojtech Horky
     3 * Copyright (c) 2011 Vojtech Horky
    34 * All rights reserved.
    45 *
     
    2627 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2728 */
    28 
    2929/** @addtogroup drvusbhub
    3030 * @{
     
    4949#define NAME "usbhub"
    5050
    51 #include "ports.h"
     51#include "port.h"
    5252
    5353/** Information about attached hub. */
    54 struct usb_hub_info_t {
     54struct usb_hub_dev {
    5555        /** Number of ports. */
    5656        size_t port_count;
    57 
    58         /** attached device handles, for each port one */
     57        /** Port structures, one for each port */
    5958        usb_hub_port_t *ports;
    60 
    61         fibril_mutex_t port_mutex;
    62 
    63         /** connection to hcd */
    64         usb_hc_connection_t connection;
    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;
     59        /** Generic usb device data*/
     60        usb_device_t *usb_device;
    9161
    9262        /** Number of pending operations on the mutex to prevent shooting
     
    10171        /** Condition variable for pending_ops_count. */
    10272        fibril_condvar_t pending_ops_cv;
    103 
     73        /** Pointer to devman usbhub function. */
     74        ddf_fun_t *hub_fun;
     75        /** Status indicator */
     76        bool running;
     77        /** Hub supports port power switching. */
     78        bool power_switched;
     79        /** Each port is switched individually. */
     80        bool per_port_power;
    10481};
    10582
    106 int usb_hub_add_device(usb_device_t *usb_dev);
     83int usb_hub_device_add(usb_device_t *usb_dev);
     84int usb_hub_device_remove(usb_device_t *usb_dev);
     85int usb_hub_device_gone(usb_device_t *usb_dev);
    10786
    10887bool hub_port_changes_callback(usb_device_t *dev,
Note: See TracChangeset for help on using the changeset viewer.