• David Brownell's avatar
    [PATCH] create <linux/usb_ch9.h> · 5a01b6ee
    David Brownell authored
    This patch addresses some of the minor problems with programming
    USB with "usbfs", or coming up with any kind of usb slave/target
    device driver API (including eventually USB-OTG).
    
    It does so by creating a new <linux/usb_ch9.h> file that defines
    common constants and descriptor structures that are now found in
    <linux/usb.h> but which are (a) not exported to userspace, making
    programming with "usbfs" awkward, and (b) needlessly mixed up with
    the usb master/host-only side APIs, which a slave/target-only side
    API will not want to require.  These definitions are just moved out
    of <linux/usb.h>, so they can be accessed safely.
    
    
    If folk agree that this should be done, instead of different headers
    and declarations for master/host, slave/target, and dual-mode OTG
    (which was the road the Lineo APIs, rejected by Linus, started down),
    I think this should be merged (compiles but untested) as a start.
    
    Then configuration, interface, and device descriptors could get split
    out too.  That'd involve some code changes, since those descriptor
    structures have been augmented (or maybe "sullied"?) with data that's
    specific to the Linux host-side driver implementation.  So they're
    currently unsuitable to be used by user-space or slave/target drivers.
    5a01b6ee
usb.h 44.6 KB