public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usbhid: How to wait for response after submitting report
@ 2010-03-13  3:10 Adam Nielsen
  2010-03-15 16:07 ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Nielsen @ 2010-03-13  3:10 UTC (permalink / raw)
  To: LKML Mailinglist

Hi all,

I'm working on a USB HID driver, but my driver seems to be receiving bad data.
 I think it's because usbhid_submit_report is non-blocking and I'm not
correctly waiting for a response.  I'm not sure though, because none of the
existing usbhid drivers seem to work in this way.

Could someone please let me know if I'm going about this the right way?

  odin_psu->report->field[0]->value[0] = msg;
  odin_psu->report->field[0]->value[1] = 0x01;

  usbhid_submit_report(odin_psu->hdev, odin_psu->report, USB_DIR_OUT);
  usbhid_wait_io(odin_psu->hdev);

  usbhid_submit_report(odin_psu->hdev, odin_psu->report_in, USB_DIR_IN);
  usbhid_wait_io(odin_psu->hdev);

Many thanks,
Adam.

(Please CC)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-30 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13  3:10 usbhid: How to wait for response after submitting report Adam Nielsen
2010-03-15 16:07 ` Jiri Kosina
2010-03-27 11:52   ` Adam Nielsen
2010-03-30 12:10     ` Jiri Kosina
2010-03-30 12:21       ` Adam Nielsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox