Hi Felipe 

>Sent: Monday, May 21, 2007 3:56 PM
>
>Hello all,
>
>is there a way to use libusb to talk directly to hcd drivers?
>
>what I'm wondering to do is to develop an application similar to the
>USBHSET tool from usb.org in order to test embedded host devices.
>
>I think that keep adding lots of sysfs interfaces is not the better
>way to do it since I could use ioctls.
>
>If any of you have a clue about how to do it... just point me the
>header file and I'll try to do it... but any information/tip is
>welcome :-)

We have a working HSET tool for MUSB platform (based on linux-omap git)
that you can use. Attached is the implementation (patch that can apply
on linux-omap git for musb) with two interfaces: 
USB function driver interface and sysfs interface. Currently we have
some coupling with musb but it can be cleaned to make it generic.

For the TOOL to be complete following two interfaces have to be
implemented:
1) a USB function driver interface for OPT card 
        The function driver interface for OPT card can be implemented as
a generic usb class driver. Based on VID/PID sent by OPT, will different
test modes be exercised by doing a Set Feature of USB_PORT_FEAT_TEST on
the root hub. Please see reference for Set Feature handling in
ehci-hcd.c and drivers/usb/musb/virthub.c (in linux-omap GIT)

Current implementation has the function driver in musb directory and is
using custom interface to invoke tests as the driver was written before
the PORT_FEAT_TEST.

2) sysfs interface for HSET tool 
The options provided are:
                                "J: Test_J\n"
                                "K: Test_K\n"
                                "S: Test_SE0_NAK\n"
                                "P: Test_PACKET\n"
                                "H: Test_FORCE_ENABLE\n"
                                "U: Test_SUSPEND_RESUME\n"
                                "G: Test_SINGLE_STEP_GET_DESC\n"
                                "F: Test_SINGLE_STEP_SET_FEATURE\n"
                                "E: Enumerate bus\n"
                                "D: Suspend bus\n"
                                "R: Resume bus\n"
                                "?: help menu\n");

Hope this helps.
Vikram Pandita


>
>--
>Best Regards,
>
>Felipe Balbi
>[EMAIL PROTECTED]
>
>-----------------------------------------------------------------------
--
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>linux-usb-devel@lists.sourceforge.net
>To unsubscribe, use the last form field at:
>https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Attachment: hset_22May_07.patch
Description: hset_22May_07.patch

Attachment: musb_hset.c
Description: musb_hset.c

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to