linux dvbh driver

Hey this is Michael's current job, write device driver under linux. DVBH player is the first project for me and I've already finished it. Here in this blog,I'm recording my result.

Website Counter

星期二, 八月 15, 2006

Study the linux gadget driver

USB gadget driver is important for my project.So I've to understand the basic structure of usb gadget driver. I found some good articles from the internet.
The original article is
What below is my comprehension.
1. 3 layer concepts
The usb peripheral devices should have 3 layers at least:

Upper level
USB Gadget driver
(This is hardware dependent layer.using calls to the Usb controller driver. It duty is listed as following:
1.Handing setup requests
2.Returning configurations and string descriptors
3.(re)setting configurations and interface altsettings,include enable and configuring endpoints
4.Handle life cycle events
5.Managing IN and OUT transfers on all currently enable endpoints)

USB Controller Driver(the linux/usb_gadget.h declare the functions, and these functions are defined in this layer,where the usb hardware is operated directly)
USB hardware (some soc has usb controller,such as PXA-25x, S3C244x)