X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=hwdb%2Fparse_hwdb.py;h=d84fba2221ade7a8ac3049a16a9224636ed18dca;hb=6f520e74373a7f2cf7cb36ca8cf2d61fee88dc49;hp=a25ac8d9042b6851268a52d68735812a50b0b11e;hpb=ec9d3a7e1d8beceb2aef11a3ce8a15c0e53130a4;p=thirdparty%2Fsystemd.git diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py index a25ac8d9042..d84fba2221a 100755 --- a/hwdb/parse_hwdb.py +++ b/hwdb/parse_hwdb.py @@ -1,10 +1,7 @@ #!/usr/bin/env python3 -# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ +# SPDX-License-Identifier: MIT # -# This file is part of systemd. It is distrubuted under the MIT license, see -# below. -# -# Copyright 2016 Zbigniew Jędrzejewski-Szmek +# This file is distributed under the MIT license, see below. # # The MIT License (MIT) # @@ -32,8 +29,7 @@ import sys import os try: - from pyparsing import (Word, White, Literal, ParserElement, Regex, - LineStart, LineEnd, + from pyparsing import (Word, White, Literal, ParserElement, Regex, LineEnd, OneOrMore, Combine, Or, Optional, Suppress, Group, nums, alphanums, printables, stringEnd, pythonStyleComment, QuotedString, @@ -65,6 +61,7 @@ UDEV_TAG = Word(string.ascii_uppercase, alphanums + '_') TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'), 'evdev': ('name', 'atkbd', 'input'), + 'id-input': ('modalias'), 'touchpad': ('i8042', 'rmi', 'bluetooth', 'usb'), 'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'), 'keyboard': ('name', ), @@ -105,6 +102,18 @@ def property_grammar(): ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER), ('MOUSE_WHEEL_CLICK_COUNT', INTEGER), ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER), + ('ID_INPUT', Literal('1')), + ('ID_INPUT_ACCELEROMETER', Literal('1')), + ('ID_INPUT_JOYSTICK', Literal('1')), + ('ID_INPUT_KEY', Literal('1')), + ('ID_INPUT_KEYBOARD', Literal('1')), + ('ID_INPUT_MOUSE', Literal('1')), + ('ID_INPUT_POINTINGSTICK', Literal('1')), + ('ID_INPUT_SWITCH', Literal('1')), + ('ID_INPUT_TABLET', Literal('1')), + ('ID_INPUT_TABLET_PAD', Literal('1')), + ('ID_INPUT_TOUCHPAD', Literal('1')), + ('ID_INPUT_TOUCHSCREEN', Literal('1')), ('ID_INPUT_TRACKBALL', Literal('1')), ('MOUSE_WHEEL_TILT_HORIZONTAL', Literal('1')), ('MOUSE_WHEEL_TILT_VERTICAL', Literal('1')),