Skip to content
Snippets Groups Projects
  1. Mar 31, 2021
  2. Jan 04, 2021
  3. Nov 27, 2020
    • Dean Camera's avatar
      HID: hidraw: Add additional hidraw input/output report ioctls. · f43d3870
      Dean Camera authored
      
      Currently the hidraw module can only read and write feature HID reports on
      demand, via dedicated ioctls. Input reports are read from the device through
      the read() interface, while output reports are written through the write
      interface().
      
      This is insufficient; it is desirable in many situations to be able to read and
      write input and output reports through the control interface to cover
      additional scenarios:
      
        - Reading an input report by its report ID, to get initial state
        - Writing an input report, to set initial input state in the device
        - Reading an output report by its report ID, to obtain current state
        - Writing an output report by its report ID, out of band
      
      This patch adds these missing ioctl requests to read and write the remaining
      HID report types. Note that not all HID backends will neccesarily support this
      (e.g. while the USB link layer supports setting Input reports, others may not).
      
      Also included are documentation and example updates. The current hidraw
      documentation states that feature reports read from the device does *not*
      include the report ID, however this is not the case and the returned report
      will have its report ID prepended by conforming HID devices, as the report data
      sent from the device over the control endpoint must be indentical in format to
      those sent over the regular transport.
      
      Signed-off-by: default avatarDean Camera <dean@fourwalledcubicle.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      f43d3870
  4. Nov 03, 2020
  5. Oct 22, 2020
  6. Jul 13, 2020
  7. Jul 15, 2019
  8. Jul 02, 2019
  9. Jun 20, 2019
  10. Dec 18, 2018
  11. Oct 12, 2017
  12. Mar 13, 2017
  13. Aug 17, 2016
  14. Jun 17, 2016
  15. Apr 10, 2015
  16. Aug 25, 2014
  17. May 05, 2014
  18. Apr 01, 2014
    • Petri Gynther's avatar
      HID: uhid: Add UHID_CREATE2 + UHID_INPUT2 · 4522643a
      Petri Gynther authored
      
      UHID_CREATE2:
      HID report descriptor data (rd_data) is an array in struct uhid_create2_req,
      instead of a pointer. Enables use from languages that don't support pointers,
      e.g. Python.
      
      UHID_INPUT2:
      Data array is the last field of struct uhid_input2_req. Enables userspace to
      write only the required bytes to kernel (ev.type + ev.u.input2.size + the part
      of the data array that matters), instead of the entire struct uhid_input2_req.
      
      Note:
      UHID_CREATE2 increases the total size of struct uhid_event slightly, thus
      increasing the size of messages that are queued for userspace. However, this
      won't affect the userspace processing of these events.
      
      [Jiri Kosina <jkosina@suse.cz>: adjust to hid_get_raw_report() and
      				hid_output_raw_report() API changes]
      
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      4522643a
  19. Feb 24, 2014
  20. Feb 17, 2014
  21. Jul 31, 2013
  22. Dec 14, 2012
  23. Nov 19, 2012
  24. Sep 06, 2012
  25. Jun 18, 2012
  26. Mar 22, 2011
Loading