Re: Need help to support USB3.0 HID Keyboard device

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

 



On Tue, Nov 26, 2013 at 03:26:04PM +0530, Bhavik Kothari wrote:
> On Friday 22 November 2013 10:25 PM, Greg KH wrote:
> >On Fri, Nov 22, 2013 at 04:47:10PM +0530, Bhavik Kothari wrote:
> >>Hi,
> >>
> >>I have been working on USB3.0 device driver and wanted to support
> >>USB3.0 HID (keyboard).
> >>
> >>To support HID Keyboard device, I have made below Interface descriptor:
> >>
> >>Interface Descriptor with alternate settings 0:
> >>
> >>     bLength = 0x9;
> >>     bDescriptorType = 0x4 (USB_DT_INTERFACE);
> >>
> >>     bInterfaceNumber = 0x0;
> >>     bAlternateSetting = 0x0;
> >>     bNumEndpoints = 0x0;
> >>     bInterfaceClass = (0x3) USB_CLASS_HID;
> >>     bInterfaceSubClass = 0x0;
> >>         bInterfaceProtocol = 0x1 (keyboard);
> >>         iInterface = 0x0;
> >>
> >>Interface Descriptor with alternate settings 1 along with Super
> >>speed endpoints:
> >>
> >>         bLength = 0x9;
> >>         bDescriptorType = 0x4 (USB_DT_INTERFACE);
> >>
> >>         bInterfaceNumber = 0x0;
> >>         bAlternateSetting = 0x1;
> >>         bNumEndpoints = 0x2; (One for EP IN Interrupt and other for
> >>EP OUT Interrupt)
> >>         bInterfaceClass = (0x3) USB_CLASS_HID;
> >>         bInterfaceSubClass = 0x0;
> >>         bInterfaceProtocol = 0x1 (keyboard);
> >>         iInterface = 0x0;
> >>
> >>However, when xHCI does set_config at that time Interface zero and
> >>alternate setting is zero, it never does set_interface with
> >>interface zero and alternate setting one, hence host does not detect
> >>HID device.
> >>
> >>So, would you please assist me that what I have to do, so host does
> >>set interface with alternate setting one.
> >It's up to a userspace program to switch to the alternate interface,
> >right?  The OS can't just "know" to do that without some type of
> >interaction from you.
> >
> >Have you run your device under the USB verification test suite for
> >Windows?  I suggest you do that first, to ensure the firmware is working
> >properly before worrying about how Linux is handling the device.
> >
> >thanks,
> >
> >greg k-h
> >.
> >
> Hi Greg,
> 
> Yes, I have run USB3.0 device with USB  verification test suite
> (USB3.0 CV) for Windows, and it passes all test points. However, with
> same implementation, host does not issue set interface with alternate
> setting one.

That sounds correct.

> I am not sure what to do either from device or Host side, so, Host
> (xHCI) issues set interface with interface number zero or any other
> with alternate setting one or more than zero (because alternate
> setting zero is alloted for control ep, if transfer type is periodic
> (Interrupt / Isochronous)) Can you please assist me on this, what
> should I do / implement?

Did you read Alan's response to your questions?  What about what he said
to do?

thanks,

greg k-h
--
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