chiark / gitweb /
udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER
authorHans de Goede <hdegoede@redhat.com>
Fri, 3 Apr 2015 10:07:32 +0000 (12:07 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:47:54 +0000 (07:47 +0100)
input_id already (tries to) tag accelerometers as such, but this only works
for absolute accelerometers. Recent kernels mark accelerometers through an
input prop. Trust that prop and always tag devices with it with
ID_INPUT_ACCELEROMETER.

Note that detection by the prop bit works the same as the existing detection
and will ensure that no other tags get set on the device.

src/shared/missing.h

index 6bb5ff0f093cb0649642f44ce4f36909dddd8a94..eddfa78b8b167ef43b6a3ae887fc49c70b422904 100644 (file)
@@ -930,4 +930,8 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha
 
 #ifndef INPUT_PROP_POINTING_STICK
 #define INPUT_PROP_POINTING_STICK 0x05
+#endif
+
+#ifndef INPUT_PROP_ACCELEROMETER
+#define INPUT_PROP_ACCELEROMETER  0x06
 #endif
\ No newline at end of file