change from bulk to interrupt endpoints

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

 



Hi,

I am writing a USB device driver for a specific device. My code is built
on the usb_skeleton.c found in the kernel source code (2.6.16.16) under
/drivers/usb.

I changed the vendor and product ID to fit my device and "insmod" it into
the kernel and tested it in user space with the system calls open, read,
write and close. The driver works and it is possible to read and write to
the device.

Now I want to change the endpoint transfer type from bulk to interrupt. I
changed all the "bulk" in the code to "int". Now, I get an error in the
probe function. It does not find any int-in and int-out endpoints. How can
I change this? Do I have to create a new interface setting? Or how does it
work? Does a particular device only use one type of transfer or is it
always possible to use the type of endpoint that I want?

For instance, when I use a driver for a mouse, the interrupt endpoint is
found.

It seems like there is always a default setting for a device and this
happens to be bulk-in and bulk-out endpoints for my device. How do I add
int-in and int-out endpoints?

Tell me if you need to have a look at the code fragment in the probe
function where the error occurs.

Thanks in advance!

/ mogr


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux