From: Ping Cheng <ping.ch...@wacom.com> The driver included with RHEL 6.10 includes support for a few devices that aren't supported by this input-wacom driver and vice-versa. For example, RHEL supports the EKR but not the Cintiq Pro 32 while input-wacom supports the 32 but not the EKR. This is a problem if you want to use both the 32 and the EKR (or other combination of devices that aren't both supported by one of the drivers).
As a workaround, we will have input-wacom install as a driver named "wacom-ot" rather than "wacom" when a RHEL 6.10 system is detected. This driver will *only* support devices that aren't already supported by the existing RHEL driver. This isn't ideal, but the proper fix (backporting EKR and others) is more work than we're prepared to undertake at this point in time. Signed-off-by: Ping Cheng <ping.ch...@wacom.com> Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- 2.6.32/Makefile.in | 14 ++++++++++---- 2.6.32/wacom_sys.c | 7 ++++++- 2.6.32/wacom_wac.c | 10 ++++++++++ configure.ac | 12 ++++++++++++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/2.6.32/Makefile.in b/2.6.32/Makefile.in index 6290771..43ae05a 100644 --- a/2.6.32/Makefile.in +++ b/2.6.32/Makefile.in @@ -4,11 +4,18 @@ ifneq ($(KERNELRELEASE),) # Do NOT indent stuff in this part! It has to be like this to make the # $(error ... ) stuff work +RHEL6_RELEASE := @RHEL6_RELEASE@ +WCM_OT_NAME := "" + ifneq ($(CONFIG_USB_WACOM),y) WCM_VERSION := $(shell cd $(KBUILD_EXTMOD)/.. && ./git-version-gen) ccflags-y := -DWACOM_VERSION_SUFFIX=\"-$(WCM_VERSION)\" -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers $(EXTRA_CFLAGS) -wacom-objs := wacom_wac.o wacom_sys.o -obj-m += wacom.o + ifeq ($(RHEL6_RELEASE),10) + WCM_OT_NAME := -ot + ccflags-y += -DRHEL6_RELEASE + endif # RHEL6_RELEASE +wacom$(WCM_OT_NAME)-objs := wacom_wac.o wacom_sys.o +obj-m += wacom$(WCM_OT_NAME).o obj-m += wacom_w8001.o else $(error You requested to build wacom with configure, but wacom is configured as built-in in your kernel config) @@ -48,8 +55,7 @@ uninstall: @# which causes trouble for tools like 'rm' which don't @# see the path how you might think. As a workaround, @# first cd into the directory and then remove. - cd $(WCM_KERNEL_DIR)/../extra; rm wacom.ko* - cd $(WCM_KERNEL_DIR)/../extra; rm wacom_w8001.ko* + cd $(WCM_KERNEL_DIR)/../extra; rm wacom*.ko* rm -f /etc/depmod.d/input-wacom.conf PATH="$(PATH):/bin:/sbin" depmod -a $(MODUTS) diff --git a/2.6.32/wacom_sys.c b/2.6.32/wacom_sys.c index 5ca4c61..4a1fb70 100644 --- a/2.6.32/wacom_sys.c +++ b/2.6.32/wacom_sys.c @@ -39,6 +39,11 @@ #define HID_COLLECTION_END 0xc0 #define HID_LONGITEM 0xfc +#ifdef RHEL6_RELEASE +#define wacom_driver_name "wacom-ot" +#else +#define wacom_driver_name "wacom" +#endif enum { WCM_UNDEFINED = 0, @@ -1088,7 +1093,7 @@ static int wacom_reset_resume(struct usb_interface *intf) } static struct usb_driver wacom_driver = { - .name = "wacom", + .name = wacom_driver_name, .id_table = wacom_ids, .probe = wacom_probe, .disconnect = wacom_disconnect, diff --git a/2.6.32/wacom_wac.c b/2.6.32/wacom_wac.c index c4705f8..dfb4ed3 100644 --- a/2.6.32/wacom_wac.c +++ b/2.6.32/wacom_wac.c @@ -2484,6 +2484,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, wacom_setup_numbered_buttons(input_dev, numbered_buttons); } +#ifndef RHEL6_RELEASE static const struct wacom_features wacom_features_0x00 = { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, 0, PENPARTNER, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES }; @@ -2966,6 +2967,7 @@ static const struct wacom_features wacom_features_0x34E = WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x34B }; +#endif /* RHEL6_RELEASE */ static const struct wacom_features wacom_features_0x34F = { "Wacom Cintiq Pro 13 FHD", WACOM_PKGLEN_MSPRO, 59552, 33848, 8191, 63, WACOM_MSPRO, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0, @@ -3031,12 +3033,14 @@ static const struct wacom_features wacom_features_0x376 = static const struct wacom_features wacom_features_0x378 = { "Intuos BT M", WACOM_PKGLEN_INTUOSP2, 21600, 13500, 4095, 63, INTUOSHT3, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 }; +#ifndef RHEL6_RELEASE static const struct wacom_features wacom_features_0x37A = { "Wacom One by Wacom S", WACOM_PKGLEN_BBPEN, 15200, 9500, 2047, 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; static const struct wacom_features wacom_features_0x37B = { "Wacom One by Wacom M", WACOM_PKGLEN_BBPEN, 21600, 13500, 2047, 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; +#endif /* RHEL6_RELEASE */ static const struct wacom_features wacom_features_0x37C = { "Wacom Cintiq Pro 24", WACOM_PKGLEN_MSPRO, 105286, 59574, 8191, 63, /* Pen-only */ WACOM_MSPRO, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0, @@ -3072,6 +3076,7 @@ static const struct wacom_features wacom_features_0x382 = .driver_info = (kernel_ulong_t)&wacom_features_##prod const struct usb_device_id wacom_ids[] = { +#ifndef RHEL6_RELEASE { USB_DEVICE_WACOM(0x00) }, { USB_DEVICE_WACOM(0x03) }, { USB_DEVICE_WACOM(0x10) }, @@ -3215,6 +3220,7 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0x34B) }, { USB_DEVICE_WACOM(0x34D) }, { USB_DEVICE_WACOM(0x34E) }, +#endif /* RHEL6_RELEASE */ { USB_DEVICE_WACOM(0x34F) }, { USB_DEVICE_WACOM(0x350) }, { USB_DEVICE_WACOM(0x351) }, @@ -3232,12 +3238,15 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0x375) }, { USB_DEVICE_WACOM(0x376) }, { USB_DEVICE_WACOM(0x378) }, +#ifndef RHEL6_RELEASE { USB_DEVICE_WACOM(0x37A) }, { USB_DEVICE_WACOM(0x37B) }, +#endif /* RHEL6_RELEASE */ { USB_DEVICE_WACOM(0x37C) }, { USB_DEVICE_WACOM(0x37D) }, { USB_DEVICE_WACOM(0x37E) }, { USB_DEVICE_WACOM(0x382) }, +#ifndef RHEL6_RELEASE { USB_DEVICE_WACOM(0x4001) }, { USB_DEVICE_WACOM(0x4004) }, { USB_DEVICE_WACOM(0x5000) }, @@ -3248,6 +3257,7 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0x5048) }, { USB_DEVICE_WACOM(0x5090) }, { USB_DEVICE_LENOVO(0x6004) }, +#endif /* RHEL6_RELEASE */ { } }; MODULE_DEVICE_TABLE(usb, wacom_ids); diff --git a/configure.ac b/configure.ac index 52386d5..5ea344c 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,17 @@ package and try again.]) fi WCM_ENV_KERNEL="yes" +dnl Check for RedHat entreprise Linux >= 6.9 +AC_MSG_CHECKING(RHEL6 minor release) +RHEL6_RELEASE=[$(sed -n 's/^\(Red Hat Enterprise Linux\|CentOS\) .*release 6.\([0-9]*\).*$/\2/gp' "/etc/redhat-release" 2> /dev/null | head -n1)] +dnl RHEL6_RELEASE="" +if test "$RHEL6_RELEASE" = ""; then + RHEL6_RELEASE="0" +elif test "$RHEL6_RELEASE" -ge "9"; then + RHEL6_RELEASE="10" +fi +AC_MSG_RESULT([$RHEL6_RELEASE]) + dnl Check for RedHat entreprise Linux >= 7.4 AC_MSG_CHECKING(RHEL7 minor release) RHEL7_RELEASE=[$(sed -n 's/^\(Red Hat Enterprise\|CentOS\) Linux .*release 7.\([0-9]*\).*$/\2/gp' "/etc/redhat-release" 2> /dev/null | head -n1)] @@ -331,6 +342,7 @@ echo WCM_SRC_SUBDIRS=". $WCM_KERNEL_VER" AC_SUBST(WCM_KERNEL_DIR) AC_SUBST(WCM_KERNEL_VER) +AC_SUBST(RHEL6_RELEASE) AC_SUBST(RHEL7_RELEASE) AC_SUBST(MODUTS) AC_SUBST(MODSIGN_HASHALGO) -- 2.20.1 _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel