tools: externalize HID usage tables

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
recorder: flush stdout after retrieving the description

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: handle stdin to directly decode hid-recorder output

example:
$> sudo hid-recorder /dev/hidraw3 | python tools/parse_hid.py

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: fix hid array handling

- the given value corresponds to the index within the array, not the real
usage.
- eliminate out of bound indexes

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: remove special handling of 0x70000 in get_usage()

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: break out item creation in parse_rdesc

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: break out usage_page_name retrieval
tools: for vendor usage pages, do not treat the incoming value

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>