Re: How to get SetFeature Response HID driver

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

 



What type of HID driver?
Input Device.

You shouldn't need to do that, the HID layer will give you the proper
 messages to you, right?

In order to send a SetFeature command you need to go over the report list
the device declared at enumeration time.

Some of the Set/Get Feature trigger a response from the device, and i
need to get
the answer using the HID mechanism the question is How?
Your first suggestion is used in a driver which not rely on the HID core.
Thanks

On Thu, May 13, 2010 at 10:00 PM, Greg KH <greg@xxxxxxxxx> wrote:
> On Thu, May 13, 2010 at 05:51:34PM +0300, yoni dana wrote:
>> Hi
>> Thank for the reply, i am writing an HID driver ,
>
> What type of HID driver?
>
>> and i would like to know if there HID API i can use inorder to poll
>> the interrupt endpoint.
>
> You shouldn't need to do that, the HID layer will give you the proper
> messages to you, right?
>
>> see below the function
>> struct hid_report *report;
>> struct list_head *report_list =
>>               &hid->report_enum[HID_FEATURE_REPORT].report_list;
>> if (list_empty(report_list)) {
>>    return -ENODEV;
>> }
>> report = list_first_entry(report_list, struct hid_report, list);
>> if (report->maxfield < 1)
>>    return -ENODEV;
>>
>> list_for_each_entry(report,report_list, list) {
>>               if (report->maxfield < 1) {
>>             continue;
>>               }
>>              switch (report->id) {
>>       case DRIVER_ALIVE:
>>             usbhid_submit_report(hid, report, USB_DIR_OUT);
>>             break;
>>       case GET_VERSION:
>>             usbhid_submit_report(hid, report, USB_DIR_OUT);
>>             //TODO In this stage i need to read the answer from Interrupt ENDPOINT
>
> Why?  Am I just missing something in the HID spec that requires
> something like this?
>
> confused,
>
> 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