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


Ignore:
Timestamp:
2018-02-28T16:37:50Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (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.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

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

    rf5e5f73 rdf6ded8  
    22 * Copyright (c) 2010 Vojtech Horky
    33 * Copyright (c) 2011 Vojtech Horky
     4 * Copyright (c) 2018 Ondrej Hlavaty, Petr Manek
    45 * All rights reserved.
    56 *
     
    3940
    4041#include <ddf/driver.h>
     42#include <fibril_synch.h>
    4143
    4244#include <usb/classes/hub.h>
     
    4446#include <usb/dev/pipes.h>
    4547#include <usb/dev/driver.h>
    46 
    47 #include <fibril_synch.h>
     48#include <usb/dev/poll.h>
    4849
    4950#define NAME "usbhub"
    5051
    5152#include "port.h"
     53#include "status.h"
    5254
    5355/** Information about attached hub. */
     
    5759        /** Port structures, one for each port */
    5860        usb_hub_port_t *ports;
     61        /** Speed of the hub */
     62        usb_speed_t speed;
    5963        /** Generic usb device data*/
    6064        usb_device_t *usb_device;
    61 
    62         /** Number of pending operations on the mutex to prevent shooting
    63          * ourselves in the foot.
    64          * When the hub is disconnected but we are in the middle of some
    65          * operation, we cannot destroy this structure right away because
    66          * the pending operation might use it.
    67          */
    68         size_t pending_ops_count;
    69         /** Guard for pending_ops_count. */
    70         fibril_mutex_t pending_ops_mutex;
    71         /** Condition variable for pending_ops_count. */
    72         fibril_condvar_t pending_ops_cv;
     65        /** Data polling handle. */
     66        usb_polling_t polling;
    7367        /** Pointer to usbhub function. */
    7468        ddf_fun_t *hub_fun;
    75         /** Status indicator */
    76         bool running;
     69        /** Device communication pipe. */
     70        usb_pipe_t *control_pipe;
    7771        /** Hub supports port power switching. */
    7872        bool power_switched;
    7973        /** Each port is switched individually. */
    8074        bool per_port_power;
     75        /** Whether MTT is available */
     76        bool mtt_available;
    8177};
    8278
    83 extern const usb_endpoint_description_t hub_status_change_endpoint_description;
     79extern const usb_endpoint_description_t *usb_hub_endpoints [];
    8480
    85 extern errno_t usb_hub_device_add(usb_device_t *);
    86 extern errno_t usb_hub_device_remove(usb_device_t *);
    87 extern errno_t usb_hub_device_gone(usb_device_t *);
     81errno_t usb_hub_device_add(usb_device_t *);
     82errno_t usb_hub_device_remove(usb_device_t *);
     83errno_t usb_hub_device_gone(usb_device_t *);
    8884
    89 extern bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t,
    90     void *);
     85errno_t usb_hub_set_depth(const usb_hub_dev_t *);
     86errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t,
     87    usb_port_status_t *);
     88errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t,
     89    usb_hub_class_feature_t);
     90errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t,
     91    usb_hub_class_feature_t);
     92
     93bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, void *);
     94
     95errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *,
     96    usb_port_t *);
     97errno_t usb_hub_release_default_address(usb_hub_dev_t *, async_exch_t *);
    9198
    9299#endif
Note: See TracChangeset for help on using the changeset viewer.