Re: problems to design a ISP1582 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/3/7, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Wed, 7 Mar 2012, feng wind wrote:
>
>> Hi ,
>> There is a ISP1582 device on my board that is a hi-speed usb
>> peripheral controller. I want to design a driver which can make PC
>> access mmc on my board with command "modprobe g_file_storage
>> file=/dev/mmcblk0p1". But I have some problems about designing a
>> ISP1582 driver.
>>
>> - What fuctions does this driver need to implement ?
>> I roughly devide this driver into two parts. One implements USB
>> enumeration and the other implements bulk transmission.
>> Am I right?  I am uncertain that what functions are covered by gadget
>> codes.
>>
>> - Would you give me some example source code!
>>
>> Any comments is warm welcome !
>
> You need to write a driver that conforms to the gadget API.  See
>
> 	http://www.linux-usb.org/gadget/
>
> It's a little out of date, but it will help you get started.  Also read
> the documentation comments in include/linux/usb/gadget.h.  There are
> lots of similar drivers you can study in drivers/usb/gadget/.
>
> Alan Stern
>
>
You mean designing a driver that includes gadget section and hardware handle.
My idea is that ISP 1582 driver can use existed gadget driver such as
file_storage.c. So ISP1582 driver may just handle stuffs related to
hardware. I think it becomes relatively simple. Is that practicable?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux