Hi

I'm once again writing a usb driver.
For a simple FIFO device this time. (FTDI)
Yes I know there is already a driver but thats a serial driver and not fast enough. (Me need fullspeed)

Ok so I've got the stuff setup. usb probe and release and fops.

here is the data structures:


/// file operations
struct file_operations fops = {
llseek: ftdi_seek,
// read: ftdi_read,
write: ftdi_write,
open: ftdi_open,
release: ftdi_release,
};
/// driver setup table
struct usb_driver ftdi_driver = {
name: "ftdifull",
probe: ftdi_probe,
disconnect: ftdi_disconnect,
fops: &fops,
minor: 144, //wonder if this is acceptable? hehe
id_table: NULL,
};


Question1: How do I make my device show up automatically in the devfs? or procfs?
There doesn't seem to be much documentation on the fops part of the usb drivers. (Maybe I need newer documentation from somewhere?)

Question2: Ok so there is suppose to be 16 devices now. right?
How do my ftdi_write procedure know which one he is currently working on?
And then how does the fops link to the usb stuff?
I've made a so called "context" in ftdi_probe and passed that back as a pointer right?
So should I be able to get that from ftdi_write somehow?
Or what it the point of having fops in the usb_driver?

Thanks for your help
-Heinrich




-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to