blob: 40f6fea9d206d55155ea9010d9bf653189b05a3c [file] [log] [blame]
# Identify internal input devices.
SUBSYSTEM=="input", ENV{ID_INPUT_KEYBOARD}=="1", DRIVERS=="atkbd", ENV{POWERD_ROLE}="internal_keyboard"
SUBSYSTEM=="input", ENV{ID_INPUT_KEYBOARD}=="1", DRIVERS=="cros-ec-keyb", ENV{POWERD_ROLE}="internal_keyboard"
SUBSYSTEM=="input", ENV{ID_INPUT_TOUCHPAD}=="1", SUBSYSTEMS=="i2c", ENV{POWERD_ROLE}="internal_touchpad"
SUBSYSTEM=="input", ENV{ID_INPUT_TOUCHPAD}=="1", SUBSYSTEMS=="serio", ENV{POWERD_ROLE}="internal_touchpad"
SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", DRIVERS=="psmouse", ENV{POWERD_ROLE}="internal_touchpad"
SUBSYSTEM=="input", ENV{ID_INPUT_TOUCHSCREEN}=="1", SUBSYSTEMS=="i2c", ENV{POWERD_ROLE}="internal_touchscreen"
SUBSYSTEM=="input", ATTRS{name}=="cros_fp_input", ENV{POWERD_ROLE}="cros_fingerprint"
# Product is BUSTYPE/VENDOR/PRODUCT/VERSION. Bus type 0x5 is Bluetooth
SUBSYSTEM=="input", ENV{PRODUCT}=="5/*", ENV{POWERD_ROLE}="cros_bluetooth"
# Udev does not make distinction between regular tablets and stylus devices
# complementing touchscreens, but if we see a "tablet" on an internal bus,
# it must be such stylus.
SUBSYSTEM=="input", ENV{ID_INPUT_TABLET}=="1", SUBSYSTEMS=="i2c", ENV{POWERD_ROLE}="internal_stylus"
SUBSYSTEM=="input", SUBSYSTEMS=="usb", DRIVERS=="usbhid", ENV{ID_MODEL}!="*[aA]udio*", ENV{POWERD_ROLE}="external_input"