From: Hans de Goede Date: Fri, 3 Apr 2015 10:07:32 +0000 (+0200) Subject: udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER X-Git-Tag: v226.4~1^2~531 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4e658ebc585b051672a59b505cc788c12506d364 udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER 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. --- diff --git a/src/shared/missing.h b/src/shared/missing.h index 6bb5ff0f0..eddfa78b8 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -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