Changeset 6f04905 in mainline for uspace/lib/drv/include/usbhc_iface.h


Ignore:
Timestamp:
2010-12-04T16:58:31Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad104e0
Parents:
36c410e
Message:

Add address reservation to USBHC interface in DDF

Any USB driver that needs to assign new USB address shall ask its HC
for it. When using default USB address (address 0), it must inform
HC about it as HC is the only element able to provide serialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbhc_iface.h

    r36c410e r6f04905  
    111111
    112112
     113        /** Reserve usage of default address.
     114         * This call informs the host controller that the caller will be
     115         * using default USB address. It is duty of the HC driver to ensure
     116         * that only single entity will have it reserved.
     117         * The address is returned via IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS.
     118         * The caller can start using the address after receiving EOK
     119         * answer.
     120         */
     121        IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS,
     122
     123        /** Release usage of default address.
     124         * @see IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS
     125         */
     126        IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS,
     127
     128        /** Asks for address assignment by host controller.
     129         * Answer:
     130         * - ELIMIT - host controller run out of address
     131         * - EOK - address assigned
     132         * Answer arguments:
     133         * - assigned address
     134         *
     135         * The address must be released by via IPC_M_USBHC_RELEASE_ADDRESS.
     136         */
     137        IPC_M_USBHC_REQUEST_ADDRESS,
     138
     139        /** Release address in use.
     140         * Arguments:
     141         * - address to be released
     142         * Answer:
     143         * - ENOENT - address not in use
     144         * - EPERM - trying to release default USB address
     145         */
     146        IPC_M_USBHC_RELEASE_ADDRESS,
     147
     148
    113149        /** Send interrupt data to device.
    114150         * See explanation at usb_iface_funcs_t (OUT transaction).
     
    183219typedef struct {
    184220        int (*tell_address)(device_t *, devman_handle_t, usb_address_t *);
     221
     222        int (*reserve_default_address)(device_t *);
     223        int (*release_default_address)(device_t *);
     224        int (*request_address)(device_t *, usb_address_t *);
     225        int (*release_address)(device_t *, usb_address_t);
    185226
    186227        usbhc_iface_transfer_out_t interrupt_out;
Note: See TracChangeset for help on using the changeset viewer.