Hi Ping, Ping Cheng said the following on 10/09/2012 07:21 PM: > On Mon, Oct 8, 2012 at 9:24 AM, Bastien Nocera<had...@hadess.net> wrote: >> On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote: >> [...] Looks to me like "builtin" is "tablet is integrated with the >> display" and "ISD" is "tablet is integrated with the computer". > I agree with Bastien. > > "builtin" == "tablet is integrated with the display" == > INPUT_PROP_DIRECT (defined in the kernel)
That's the other thread I started, indeed ("BuiltIn flag set automatically, but based on what?") INPUT_PROP_DIRECT is defined as 0x01 in linux/input.h and the libwacom code checks for 0x02: linux/input.h: #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ in get_device_info() in libwacom/libwacom.c: sysfs_path = g_build_filename ("/sys/class/input", devname, "device/properties", NULL); if (g_file_get_contents (sysfs_path,&contents, NULL, NULL)) { int flag; /* 0x01: POINTER flag * 0x02: DIRECT flag */ flag = atoi(contents); *builtin = (flag& 0x02) == 0x02 ? IS_BUILTIN_TRUE : IS_BUILTIN_FALSE; g_free (contents); } Why is that different? 0x02 would be INPUT_PROP_BUTTONPAD according to linux/input.h >> I'm sure we could deprecate the _is_builtin() function, and use a >> bitmask for this support instead? >> >> LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0, >> LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1<< 0, >> LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1<< 2 > I don't care which term/function name we use as long as they are > consistent with what defined in the kernel/driver. Why would that need to match the kernel definitions? Would DIRECT be more explicit than e.g. INTEGRATED_WITH_DISPLAY? And what would be the kernel equivalent of ISD in terms of kernel then? > Plus, they are documented. What I found for kernel is: http://permalink.gmane.org/gmane.linux.kernel.input/21661 http://comments.gmane.org/gmane.linux.kernel.input/23241 But there's nothing about ISD (which is what the proposed patches are about actually), so I am not sure I understand the need to follow the kernel naming convention for libwacom. Corollary question, if ISD and screen tablet can be deduced from the device properties in kernel, why do we need to have those in the database? Cheers, Olivier. ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel