[ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Add new USB input driver for Luidia's eBeam devices. Currently supported (tested) : - eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 & NP01Wi2 accessories. Notable stuff : - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/ebeam.c | 759 +++ 2 files changed, 812 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..3a663e8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/bus/usb/drivers/ebeam/-:./min_x + /sys/bus/usb/drivers/ebeam/-:./min_y + /sys/bus/usb/drivers/ebeam/-:./max_x + /sys/bus/usb/drivers/ebeam/-:./max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/-:./h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/-:./calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +These files can also be accessed via /sys/class/input/inputXX/device/ diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..e7b9f3e --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,759 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012-2015 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz + * aiptek.c (sysfs/settings) by Chris Atenasio + * Bryan W. Headley + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Yann Cantin " +#define DRIVER_DESC"USB eBeam Driver" + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#defin
[ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Add known eBeam devices usb ids. Prevent hid-generic to take over these devices. This breaks Luidia's proprietary application suite. Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile | 1 + 4 files changed, 35 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e6fce23..b5edb0f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2270,6 +2270,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b3b225b..aa6f2da 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -306,6 +306,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://ebeam.tuxfamily.org/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 53df07d..125f8a9 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DA9063_ONKEY) += da9063_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_E3X0_BUTTON)+= e3x0-button.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_DRV260X_HAPTICS)+= drv260x.o obj-$(CONFIG_INPUT_DRV2665_HAPTICS)+= drv2665.o obj-$(CONFIG_INPUT_DRV2667_HAPTICS)+= drv2667.o -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 0/2] Add a new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Notable stuff : - need userspace gui tool for calibration (ebeam.tuxfamily.org) - This driver breaks Luidia's proprietary application suite. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Changes : RFC https://lkml.org/lkml/2015/7/20/634 : Use DEVICE_ATTR_RW() RFC https://lkml.org/lkml/2015/7/21/107 : move usb id definitions out of ebeam.c RFC https://lkml.org/lkml/2015/7/20/657 : Fix ABI documentation Thanks for your help. Yann Cantin (2): hid: Blacklist eBeam devices input: misc: New USB eBeam input driver Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/hid/hid-core.c | 6 + drivers/hid/hid-ids.h| 6 + drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 6 files changed, 847 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Add known eBeam devices usb ids. Prevent hid-generic to take over these devices. This breaks Luidia's proprietary application suite. Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile | 1 + 4 files changed, 35 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e6fce23..b5edb0f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2270,6 +2270,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b3b225b..aa6f2da 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -306,6 +306,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://ebeam.tuxfamily.org/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 53df07d..125f8a9 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DA9063_ONKEY) += da9063_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_E3X0_BUTTON)+= e3x0-button.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_DRV260X_HAPTICS)+= drv260x.o obj-$(CONFIG_INPUT_DRV2665_HAPTICS)+= drv2665.o obj-$(CONFIG_INPUT_DRV2667_HAPTICS)+= drv2667.o -- 2.3.8 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 0/2] Add a new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Notable stuff : - need userspace gui tool for calibration (ebeam.tuxfamily.org) - This driver breaks Luidia's proprietary application suite. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Changes : RFC https://lkml.org/lkml/2015/7/20/634 : Use DEVICE_ATTR_RW() RFC https://lkml.org/lkml/2015/7/21/107 : move usb id definitions out of ebeam.c RFC https://lkml.org/lkml/2015/7/20/657 : Fix ABI documentation Thanks for your help. Yann Cantin (2): hid: Blacklist eBeam devices input: misc: New USB eBeam input driver Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/hid/hid-core.c | 6 + drivers/hid/hid-ids.h| 6 + drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 6 files changed, 847 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c -- 2.3.8 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Add new USB input driver for Luidia's eBeam devices. Currently supported (tested) : - eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. Notable stuff : - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/ebeam.c | 759 +++ 2 files changed, 812 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..3a663e8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/min_x + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/min_y + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/max_x + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +These files can also be accessed via /sys/class/input/inputXX/device/ diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..e7b9f3e --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,759 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012-2015 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz daniel.r...@gmx.ch + * aiptek.c (sysfs/settings) by Chris Atenasio ch...@crud.net + * Bryan W. Headley bwhead...@earthlink.net + * + */ + +#include linux/kernel.h +#include linux/slab.h +#include linux/math64.h +#include linux/input.h +#include linux/module.h +#include linux/init.h +#include linux/usb.h +#include linux/usb/input.h +#include asm/unaligned.h + +#define DRIVER_AUTHOR Yann Cantin yann.can...@laposte.net +#define DRIVER_DESCUSB eBeam Driver + +/* Common values for eBeam devices */ +#define
[RFC ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Add known eBeam devices usb ids. Prevent hid-generic to take over these devices. This breaks Luidia's proprietary application suite. Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 157c627..db4c7ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2267,6 +2267,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b04b082..ca013c2 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -303,6 +303,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Add new USB input driver for Luidia's eBeam devices. Currently supported (tested) : - eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 & NP01Wi2 accessories. Notable stuff : - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 4 files changed, 835 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..3a663e8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/bus/usb/drivers/ebeam/-:./min_x + /sys/bus/usb/drivers/ebeam/-:./min_y + /sys/bus/usb/drivers/ebeam/-:./max_x + /sys/bus/usb/drivers/ebeam/-:./max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/-:./h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/-:./calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +These files can also be accessed via /sys/class/input/inputXX/device/ diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://ebeam.tuxfamily.org/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc
[RFC ebeam PATCH v2 0/2] Add a new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Notable stuff : - need userspace gui tool for calibration (ebeam.tuxfamily.org) - This driver breaks Luidia's proprietary application suite. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Changes : RFC https://lkml.org/lkml/2015/7/20/634 : Use DEVICE_ATTR_RW() RFC https://lkml.org/lkml/2015/7/21/107 : move usb id definitions out of ebeam.c RFC https://lkml.org/lkml/2015/7/20/657 : Fix ABI documentation Thanks for your help. Yann Cantin (2): hid: Blacklist eBeam devices input: misc: New USB eBeam input driver Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/hid/hid-core.c | 6 + drivers/hid/hid-ids.h| 6 + drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 6 files changed, 847 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Add known eBeam devices usb ids. Prevent hid-generic to take over these devices. This breaks Luidia's proprietary application suite. Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 157c627..db4c7ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2267,6 +2267,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b04b082..ca013c2 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -303,6 +303,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b -- 2.3.8 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Add new USB input driver for Luidia's eBeam devices. Currently supported (tested) : - eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. Notable stuff : - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 4 files changed, 835 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..3a663e8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/min_x + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/min_y + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/max_x + /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/bus/usb/drivers/ebeam/busnum-devnum:confignum.ifacenum/calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +These files can also be accessed via /sys/class/input/inputXX/device/ diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://ebeam.tuxfamily.org/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC
[RFC ebeam PATCH v2 0/2] Add a new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Notable stuff : - need userspace gui tool for calibration (ebeam.tuxfamily.org) - This driver breaks Luidia's proprietary application suite. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Changes : RFC https://lkml.org/lkml/2015/7/20/634 : Use DEVICE_ATTR_RW() RFC https://lkml.org/lkml/2015/7/21/107 : move usb id definitions out of ebeam.c RFC https://lkml.org/lkml/2015/7/20/657 : Fix ABI documentation Thanks for your help. Yann Cantin (2): hid: Blacklist eBeam devices input: misc: New USB eBeam input driver Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/hid/hid-core.c | 6 + drivers/hid/hid-ids.h| 6 + drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 6 files changed, 847 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c -- 2.3.8 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 21/07/2015 00:40, Greg KH a écrit : On Mon, Jul 20, 2015 at 03:26:40PM -0700, Dmitry Torokhov wrote: On Mon, Jul 20, 2015 at 02:59:56PM -0700, Greg KH wrote: On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin + + /* sysfs setup */ + err = sysfs_create_group(>dev.kobj, _attr_group); Ick, you just added the sysfs files to the USB device, not your input device, are you sure you tested this? And there should be a race-free way to add an attribute group to an input device, as this is, you are adding them to the device _after_ it is created, so userspace will not see them at creation time, causing a race. No, there are no driver-specific attributed on input devices themselves, they belong to the actual hardware devices. The input devices only export standard attributes applicable to every and all input devices in the system. Then the Documentation in this patch better be fixed up, as it points to the input device as having these sysfs files :) But as these are input device attributes, and not USB device interface attributes, putting them on the USB interface doesn't make much sense, To sum up : these attributes are USB device's not input's, only indirectly accessed via inputXX/device/, and they only modify the driver's behavior. So, it make sense to correct the documentation to point at /sys/bus/usb/drivers/ebeam/X-X:1.0/. Right ? thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 21/07/2015 10:19, Oliver Neukum a écrit : On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote: diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..79cac51 --- /dev/null +++ b/drivers/input/misc/ebeam.c +/* Electronics For Imaging, Inc */ +#define USB_VENDOR_ID_EFI 0x2650 You are defining these IDs twice. That is not good. Is it okay to do this : #if !defined(CONFIG_INPUT_EBEAM_USB) #define USB_VENDOR_ID_EFI 0x2650 #... #endif so that the driver can also be build outside the kernel tree ? thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 20/07/2015 23:59, Greg KH a écrit : On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +What: /sys/class/input/inputXX/device/h[1..9] +What: /sys/class/input/inputXX/device/calibrated What tool(s) use these sysfs files? Don't we already have "normal" events for these types of things such that we don't have to make up new sysfs files for these? The ebeam_calibrator tool is there : http://ebeam.tuxfamily.org. I agree this can be a problem : this driver is totally useless without a userspace dedicated calibration tool. By nature these device's coordinate system can't be mapped to screen via trivial transformations, such as scaling, flipping and rotating, hence the special calibration and mapping procedures. I choose to use an homography transformation as it is more robust and faster than linear interpolation in this case. And anyway, it requires 9 calibration data and xy range parameters. I haven't found any existing tools performing that : xinput_calibrator (witch ebeam_calibrator is based on) and other touchscreen calibration tools can't do much more than trivial transformations. +static DEVICE_ATTR(MM, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP, \ + ebeam_##MM##_get, \ + ebeam_##MM##_set) DEVICE_ATTR_RW()? Ok, will do. + /* sysfs setup */ + err = sysfs_create_group(>dev.kobj, _attr_group); Ick, you just added the sysfs files to the USB device, not your input device, are you sure you tested this? Yes, "run fine since 3.3.6, both x86_32 and 64.". thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 20/07/2015 23:59, Greg KH a écrit : On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +What: /sys/class/input/inputXX/device/h[1..9] +What: /sys/class/input/inputXX/device/calibrated What tool(s) use these sysfs files? Don't we already have normal events for these types of things such that we don't have to make up new sysfs files for these? The ebeam_calibrator tool is there : http://ebeam.tuxfamily.org. I agree this can be a problem : this driver is totally useless without a userspace dedicated calibration tool. By nature these device's coordinate system can't be mapped to screen via trivial transformations, such as scaling, flipping and rotating, hence the special calibration and mapping procedures. I choose to use an homography transformation as it is more robust and faster than linear interpolation in this case. And anyway, it requires 9 calibration data and xy range parameters. I haven't found any existing tools performing that : xinput_calibrator (witch ebeam_calibrator is based on) and other touchscreen calibration tools can't do much more than trivial transformations. +static DEVICE_ATTR(MM, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP, \ + ebeam_##MM##_get, \ + ebeam_##MM##_set) DEVICE_ATTR_RW()? Ok, will do. + /* sysfs setup */ + err = sysfs_create_group(intf-dev.kobj, ebeam_attr_group); Ick, you just added the sysfs files to the USB device, not your input device, are you sure you tested this? Yes, run fine since 3.3.6, both x86_32 and 64.. thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 21/07/2015 00:40, Greg KH a écrit : On Mon, Jul 20, 2015 at 03:26:40PM -0700, Dmitry Torokhov wrote: On Mon, Jul 20, 2015 at 02:59:56PM -0700, Greg KH wrote: On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin yann.can...@laposte.net + + /* sysfs setup */ + err = sysfs_create_group(intf-dev.kobj, ebeam_attr_group); Ick, you just added the sysfs files to the USB device, not your input device, are you sure you tested this? And there should be a race-free way to add an attribute group to an input device, as this is, you are adding them to the device _after_ it is created, so userspace will not see them at creation time, causing a race. No, there are no driver-specific attributed on input devices themselves, they belong to the actual hardware devices. The input devices only export standard attributes applicable to every and all input devices in the system. Then the Documentation in this patch better be fixed up, as it points to the input device as having these sysfs files :) But as these are input device attributes, and not USB device interface attributes, putting them on the USB interface doesn't make much sense, To sum up : these attributes are USB device's not input's, only indirectly accessed via inputXX/device/, and they only modify the driver's behavior. So, it make sense to correct the documentation to point at /sys/bus/usb/drivers/ebeam/X-X:1.0/. Right ? thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Hi, Le 21/07/2015 10:19, Oliver Neukum a écrit : On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote: diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..79cac51 --- /dev/null +++ b/drivers/input/misc/ebeam.c +/* Electronics For Imaging, Inc */ +#define USB_VENDOR_ID_EFI 0x2650 You are defining these IDs twice. That is not good. Is it okay to do this : #if !defined(CONFIG_INPUT_EBEAM_USB) #define USB_VENDOR_ID_EFI 0x2650 #... #endif so that the driver can also be build outside the kernel tree ? thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 777 +++ 4 files changed, 853 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..6873db5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in "un-calibrated" mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://ebeam.tuxfamily.org/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 53df07d..125f8a9 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DA9063_ONKEY) += da9063_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_
[RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 157c627..db4c7ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2267,6 +2267,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b04b082..ca013c2 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -303,6 +303,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 0/3] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Side notes : - The module run fine since 3.3.6, both x86_32 and 64. - Already reviewed in 2012 and 2013, but i have'nt pushed for inclusion. - The only recent change is switching to non world-writable sysfs files. - There is a proprietary application suite based on libusb, hope it won't break with this driver. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 777 +++ 4 files changed, 853 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..6873db5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2015 +Kernel Version:4.1 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in un-calibrated mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d4f0a81..22c46a4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -103,6 +103,28 @@ config INPUT_E3X0_BUTTON To compile this driver as a module, choose M here: the module will be called e3x0_button. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://ebeam.tuxfamily.org/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 53df07d..125f8a9 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DA9063_ONKEY) += da9063_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_E3X0_BUTTON)+= e3x0-button.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj
[RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 6 ++ drivers/hid/hid-ids.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 157c627..db4c7ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2267,6 +2267,12 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_USB2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM_BT_USB2) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b04b082..ca013c2 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -303,6 +303,12 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM_USB1 0x1311 +#define USB_DEVICE_ID_EFI_EBEAM_USB2 0x1315 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB10x1313 +#define USB_DEVICE_ID_EFI_EBEAM_BT_USB20x1320 + #define USB_VENDOR_ID_ELAN 0x04f3 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B0x009b -- 2.3.8 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 0/3] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. - need userspace gui tool for calibration (ebeam.tuxfamily.org) Side notes : - The module run fine since 3.3.6, both x86_32 and 64. - Already reviewed in 2012 and 2013, but i have'nt pushed for inclusion. - The only recent change is switching to non world-writable sysfs files. - There is a proprietary application suite based on libusb, hope it won't break with this driver. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 4 files changed, 835 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in "un-calibrated" mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM)
[PATCH v2 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. >From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Changes from v1 -> v2: - fix sysfs/input creation race in ebeam_probe - use get_unaligned_le16 macro in ebeam_read_data - move usb_kill_urb after usb_autopm_get_interface in ebeam_close - remove reset_resume(), use resume() in reset_resume entry Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Changes from v1 - v2: - fix sysfs/input creation race in ebeam_probe - use get_unaligned_le16 macro in ebeam_read_data - move usb_kill_urb after usb_autopm_get_interface in ebeam_close - remove reset_resume(), use resume() in reset_resume entry Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 759 +++ 4 files changed, 835 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in un-calibrated mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj
Re: [PATCH 2/2] input: misc: New USB eBeam input driver
ebeam->irq->transfer_dma = ebeam->data_dma; ebeam->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; /* usb final setup */ usb_set_intfdata(intf, ebeam); /* sysfs setup */ err = sysfs_create_group(>dev.kobj, _attr_group); if (err) { dev_dbg(>dev, "%s - cannot create sysfs group, err: %d\n", __func__, err); goto out_free_usb; } /* input final setup */ ebeam_setup_input(ebeam, input_dev); err = input_register_device(ebeam->input); if (err) { dev_dbg(>dev, "%s - input_register_device failed, err: %d\n", __func__, err); goto out_remove_sysfs; } return 0; out_remove_sysfs: sysfs_remove_group(>dev.kobj, _attr_group); out_free_usb: usb_set_intfdata(intf, NULL); usb_free_urb(ebeam->irq); out_free_buffers: ebeam_free_buffers(udev, ebeam); out_free: input_free_device(input_dev); kfree(ebeam); return err; } Thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] input: misc: New USB eBeam input driver
*/ ebeam_setup_input(ebeam, input_dev); err = input_register_device(ebeam-input); if (err) { dev_dbg(intf-dev, %s - input_register_device failed, err: %d\n, __func__, err); goto out_remove_sysfs; } return 0; out_remove_sysfs: sysfs_remove_group(intf-dev.kobj, ebeam_attr_group); out_free_usb: usb_set_intfdata(intf, NULL); usb_free_urb(ebeam-irq); out_free_buffers: ebeam_free_buffers(udev, ebeam); out_free: input_free_device(input_dev); kfree(ebeam); return err; } Thanks, -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 763 +++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in "un-calibrated" mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM)
[PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. >From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Side note : - This driver was first submit and discuss last year. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Side note : - This driver was first submit and discuss last year. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 763 +++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in un-calibrated mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj
[RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 763 +++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in "un-calibrated" mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM)
[RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. >From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Side note : - This driver was first submit and discuss last year. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. From basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine since 3.3.6 kernel, both x86_32 and 64, actually run in production on a 3.8.13 and compile without errors on today's linus tree. Side note : - This driver was first submit and discuss last year. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 36668d1..da5dfa0 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1985,6 +1985,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ffe4c7a..abd1c53 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -288,6 +288,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.8.1.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ebeam.c | 763 +++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..552a428 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Jul 2013 +Kernel Version:3.11 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in un-calibrated mode. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0b541cd..454df2d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -93,6 +93,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 829de43..dd2fe33 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj
ebeam PATCH (new eBeam input driver)
Hi, Do i need to resubmit the patchset for the next merge window ? If so, do you guys prefer it against linus or next branch ? For the record : > New USB input driver for eBeam devices. > > Currently supported (tested) : > - Luidia eBeam classic projection and edge projection models > - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. > > Patch 1 to blacklist the devices for hid generic-usb. > > Patch 2 is the actual driver. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
ebeam PATCH (new eBeam input driver)
Hi, Do i need to resubmit the patchset for the next merge window ? If so, do you guys prefer it against linus or next branch ? For the record : New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Hi, Le 10/10/2012 18:37, Dmitry Torokhov a écrit : > Is the device usable at all with generic HID driver? If it isn't then > maybe we should blacklist it unconditionally? Without the libusb based proprietary stack, the device is unusable under linux. If i correctly understand, libusb need a driver to be present in the first place, (even a useless generic-usb) to be able to grab the device. If we unconditionally blacklist the device and the ebeam driver isn't loaded (not compiled for example), no way for libusb (and the stack) to handle the device. As stated before, i'm not comfortable with the risk of breaking other hypothetical support, even proprietary. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Hi, Le 10/10/2012 18:37, Dmitry Torokhov a écrit : Is the device usable at all with generic HID driver? If it isn't then maybe we should blacklist it unconditionally? Without the libusb based proprietary stack, the device is unusable under linux. If i correctly understand, libusb need a driver to be present in the first place, (even a useless generic-usb) to be able to grab the device. If we unconditionally blacklist the device and the ebeam driver isn't loaded (not compiled for example), no way for libusb (and the stack) to handle the device. As stated before, i'm not comfortable with the risk of breaking other hypothetical support, even proprietary. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 0/2] new eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Change from v1 : the driver don't send coordinates outside the specified ranges when calibrated. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 763 ++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..66bf82b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in "un-calibrated" mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in "calibrated" mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the "calibrated" mode, 0 reset the driver in + "un-calibrated" mode. + +Calibration procedure : + +When loaded, the driver is in "un-calibrated" mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the "calibrated" mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in "un-calibrated" mode. \ No newline at end of file diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9
[ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index bd3971b..59ffaa2 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1937,6 +1937,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 269b509..df826b8 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -274,6 +274,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0 0x72d0 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4 0x72c4 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index bd3971b..59ffaa2 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1937,6 +1937,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 269b509..df826b8 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -274,6 +274,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0 0x72d0 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4 0x72c4 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ebeam PATCH v2 2/2] input: misc: New USB eBeam input driver
Signed-off-by: Yann Cantin yann.can...@laposte.net --- Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ drivers/input/misc/Kconfig | 22 + drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 763 ++ 4 files changed, 839 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-ebeam create mode 100644 drivers/input/misc/ebeam.c diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam new file mode 100644 index 000..66bf82b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /sys/class/input/inputXX/device/min_x + /sys/class/input/inputXX/device/min_y + /sys/class/input/inputXX/device/max_x + /sys/class/input/inputXX/device/max_y +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the actually used range values of + the reported coordinates. + Writing to these files preset these range values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/h[1..9] +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from these files return the 3x3 transformation matrix elements + actually used, in row-major. + Writing to these files preset these elements values. + See below for the calibration procedure. + +What: /sys/class/input/inputXX/device/calibrated +Date: Sept 2012 +Kernel Version:3.6 +Contact: yann.can...@laposte.net + linux-...@vger.kernel.org +Description: + Reading from this file : + - Return 0 if the driver is in un-calibrated mode : it actually send + raw coordinates in the device's internal coordinates system. + - Return 1 if the driver is in calibrated mode : it send computed coordinates + that (hopefully) matches the screen's coordinates system. + Writing 1 to this file enable the calibrated mode, 0 reset the driver in + un-calibrated mode. + +Calibration procedure : + +When loaded, the driver is in un-calibrated mode : it send device's raw coordinates +in the [0..65535]x[0..65535] range, the transformation matrix is the identity. + +A calibration program have to compute a homography transformation matrix that convert +the device's raw coordinates to the matching screen's ones. +It then write to the appropriate sysfs files the computed values, pre-setting the +driver's parameters : xy range, and the matrix's elements. +When all values are passed, it write 1 to the calibrated sysfs file to enable the calibrated mode. + +Warning : The parameters aren't used until 1 is writen to the calibrated sysfs file. + +Writing 0 to the calibrated sysfs file reset the driver in un-calibrated mode. \ No newline at end of file diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB
[ebeam PATCH v2 0/2] new eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Change from v1 : the driver don't send coordinates outside the specified ranges when calibrated. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [eBeam PATCH 2/2] input: misc: New USB eBeam input driver.
Hi, Le 05/09/2012 09:29, Oliver Neukum a écrit : > before we add yet another sysfs interface, we should ask whether calibration > isn't a problem that should be solved with a common API. Short answer : no. ## Long answer (may be oot) : Existing calibration tools or procedures (in kernel modules or xorg) for absolute devices deals with hardware axis mostly matching system's ones (X screen mainly), modulo switching XY, inversion or simple tweaks. Plus you know from the beginning the ranges used, and all parameters are stable. eBeam device track an active stylus in his fov, usually on a whiteboard where a video-projector cast the computer screen. It then compute the stylus's position and send it to the kernel in his own fixed 2D cartesian coordinate system relative to the device. The device is by design mobile (you stuck it anywhere on the border of the projection plane for a session), his axis never match screen's ones, neither in range nor orientation. Even worse, due to projection artifact, the two coordinates systems (ebeam and screen) can even not be linearly correlated. Manufacturer's so-called drivers seems to use second order interpolations, i use an homography transformation (which is the right mathematical tool for the problem, and seems quicker) to transform between coordinates systems. Anyway, this need lot of parameters. As ebeams are the only devices to my knowledge that work that way, i don't think a common API can be common, unless we mean an in-kernel generic purpose calibration API for input devices (stellar away for me), or a userland one (where should it be in the stack ?). Sincerely, this look overkill. In the other hand, the actual ebeam module transformation feeding events subsys works very well and expose straight and usable data to userland (xorg evdev for now, and any program that can eat kernel's input data). ## I understand the sysfs interface is a problem. Eventually, in last resort, i can reduce it to 4 files : pass the 9 matrix parameters as one big string, removing min values. But i think this obfuscate the api for a marginal gain. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [eBeam PATCH 2/2] input: misc: New USB eBeam input driver.
Hi, Le 05/09/2012 09:29, Oliver Neukum a écrit : before we add yet another sysfs interface, we should ask whether calibration isn't a problem that should be solved with a common API. Short answer : no. ## Long answer (may be oot) : Existing calibration tools or procedures (in kernel modules or xorg) for absolute devices deals with hardware axis mostly matching system's ones (X screen mainly), modulo switching XY, inversion or simple tweaks. Plus you know from the beginning the ranges used, and all parameters are stable. eBeam device track an active stylus in his fov, usually on a whiteboard where a video-projector cast the computer screen. It then compute the stylus's position and send it to the kernel in his own fixed 2D cartesian coordinate system relative to the device. The device is by design mobile (you stuck it anywhere on the border of the projection plane for a session), his axis never match screen's ones, neither in range nor orientation. Even worse, due to projection artifact, the two coordinates systems (ebeam and screen) can even not be linearly correlated. Manufacturer's so-called drivers seems to use second order interpolations, i use an homography transformation (which is the right mathematical tool for the problem, and seems quicker) to transform between coordinates systems. Anyway, this need lot of parameters. As ebeams are the only devices to my knowledge that work that way, i don't think a common API can be common, unless we mean an in-kernel generic purpose calibration API for input devices (stellar away for me), or a userland one (where should it be in the stack ?). Sincerely, this look overkill. In the other hand, the actual ebeam module transformation feeding events subsys works very well and expose straight and usable data to userland (xorg evdev for now, and any program that can eat kernel's input data). ## I understand the sysfs interface is a problem. Eventually, in last resort, i can reduce it to 4 files : pass the 9 matrix parameters as one big string, removing min values. But i think this obfuscate the api for a marginal gain. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[eBeam PATCH 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin --- drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 750 +++ 3 files changed, 773 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..098e3cf --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,750 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz + * aiptek.c (sysfs/settings) by Chris Atenasio + * Bryan W. Headley + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Yann Cantin " +#define DRIVER_DESC"USB eBeam Driver" + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_EBEAM0x1311 /* eBeam hardware : */ + /* Luidia Classic and Edge */ + /* Nec NP01Wi1 & NP01Wi2 */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv; + + struct ebeam_settingscursetting;/* device's current settings */ + struct ebeam_settingsnewsett
[eBeam PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 for video-projectors. There's others devices (includind re-branded ones) in the wild that should be supported out of the box. So, the code : Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[eBeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8bf8a64..b4b0baf 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1907,6 +1907,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..93f5b83 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[eBeam PATCH 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8bf8a64..b4b0baf 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1907,6 +1907,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..93f5b83 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[eBeam PATCH 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 for video-projectors. There's others devices (includind re-branded ones) in the wild that should be supported out of the box. So, the code : Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[eBeam PATCH 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 750 +++ 3 files changed, 773 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..098e3cf --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,750 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz daniel.r...@gmx.ch + * aiptek.c (sysfs/settings) by Chris Atenasio ch...@crud.net + * Bryan W. Headley bwhead...@earthlink.net + * + */ + +#include linux/kernel.h +#include linux/slab.h +#include linux/math64.h +#include linux/input.h +#include linux/module.h +#include linux/init.h +#include linux/usb.h +#include linux/usb/input.h + +#define DRIVER_AUTHOR Yann Cantin yann.can...@laposte.net +#define DRIVER_DESCUSB eBeam Driver + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_EBEAM0x1311 /* eBeam hardware : */ + /* Luidia Classic and Edge */ + /* Nec NP01Wi1 NP01Wi2 */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 24/08/2012 13:41, Oliver Neukum a écrit : > On Friday 24 August 2012 11:37:45 Yann Cantin wrote: >> Hi, >> >> Le 23/08/2012 09:23, Oliver Neukum a écrit : >>> On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: > >>> These functions are identical. You should unify them. >> >> Removed reset_resume from the driver (optional, and not needed >> for this hardware). > > Why did you do that? It is always better to have reset_resume(). > And you cannot tell whether it will be needed. This function was used in usbtouchscreen (which this driver is based on) for some hardware specific init after reset. eBeam devices doesn't need that, and i didn't mention the similarity of the 2 functions after stripping the code. According to power-management.txt, reset_resume is optional, and lot of input driver lack it. Anyway, if you think it's worth the code, i'll re-add a reset_resume function proxing resume like wacom_sys.c do. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 23/08/2012 09:23, Oliver Neukum a écrit : > On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: >> +static int ebeam_resume(struct usb_interface *intf) >> +{ >> + struct ebeam_device *ebeam = usb_get_intfdata(intf); >> + struct input_dev *input = ebeam->input; >> + int result = 0; >> + >> + mutex_lock(>mutex); >> + if (input->users) >> + result = usb_submit_urb(ebeam->irq, GFP_NOIO); >> + mutex_unlock(>mutex); >> + >> + return result; >> +} >> + >> +static int ebeam_reset_resume(struct usb_interface *intf) >> +{ >> + struct ebeam_device *ebeam = usb_get_intfdata(intf); >> + struct input_dev *input = ebeam->input; >> + int err = 0; >> + >> + /* restart IO if needed */ >> + mutex_lock(>mutex); >> + if (input->users) >> + err = usb_submit_urb(ebeam->irq, GFP_NOIO); >> + mutex_unlock(>mutex); >> + >> + return err; >> +} > > These functions are identical. You should unify them. Removed reset_resume from the driver (optional, and not needed for this hardware). Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 23/08/2012 08:54, Oliver Neukum a écrit : > On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: >> + /* input final setup */ >> + err = input_register_device(ebeam->input); >> + if (err) { >> + dev_dbg(>dev, >> + "%s - input_register_device failed, err: %d\n", >> + __func__, err); >> + goto out_free_urb; >> + } >> + >> + ebeam_setup_input(ebeam, input_dev); >> + >> + /* usb final setup */ >> + usb_set_intfdata(intf, ebeam); > > Hi, > > this looks like a classic race. You initialize the device after you > register it. However, it may be used at that time. Ok, moved ebeam_setup_input before input_register_device. Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 23/08/2012 08:54, Oliver Neukum a écrit : On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: + /* input final setup */ + err = input_register_device(ebeam-input); + if (err) { + dev_dbg(intf-dev, + %s - input_register_device failed, err: %d\n, + __func__, err); + goto out_free_urb; + } + + ebeam_setup_input(ebeam, input_dev); + + /* usb final setup */ + usb_set_intfdata(intf, ebeam); Hi, this looks like a classic race. You initialize the device after you register it. However, it may be used at that time. Ok, moved ebeam_setup_input before input_register_device. Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 23/08/2012 09:23, Oliver Neukum a écrit : On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: +static int ebeam_resume(struct usb_interface *intf) +{ + struct ebeam_device *ebeam = usb_get_intfdata(intf); + struct input_dev *input = ebeam-input; + int result = 0; + + mutex_lock(input-mutex); + if (input-users) + result = usb_submit_urb(ebeam-irq, GFP_NOIO); + mutex_unlock(input-mutex); + + return result; +} + +static int ebeam_reset_resume(struct usb_interface *intf) +{ + struct ebeam_device *ebeam = usb_get_intfdata(intf); + struct input_dev *input = ebeam-input; + int err = 0; + + /* restart IO if needed */ + mutex_lock(input-mutex); + if (input-users) + err = usb_submit_urb(ebeam-irq, GFP_NOIO); + mutex_unlock(input-mutex); + + return err; +} These functions are identical. You should unify them. Removed reset_resume from the driver (optional, and not needed for this hardware). Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi, Le 24/08/2012 13:41, Oliver Neukum a écrit : On Friday 24 August 2012 11:37:45 Yann Cantin wrote: Hi, Le 23/08/2012 09:23, Oliver Neukum a écrit : On Thursday 23 August 2012 00:11:54 Yann Cantin wrote: These functions are identical. You should unify them. Removed reset_resume from the driver (optional, and not needed for this hardware). Why did you do that? It is always better to have reset_resume(). And you cannot tell whether it will be needed. This function was used in usbtouchscreen (which this driver is based on) for some hardware specific init after reset. eBeam devices doesn't need that, and i didn't mention the similarity of the 2 functions after stripping the code. According to power-management.txt, reset_resume is optional, and lot of input driver lack it. Anyway, if you think it's worth the code, i'll re-add a reset_resume function proxing resume like wacom_sys.c do. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin --- drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 766 +++ 3 files changed, 789 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 & NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..80e3397 --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,766 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz + * aiptek.c (sysfs/settings) by Chris Atenasio + * Bryan W. Headley + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Yann Cantin " +#define DRIVER_DESC"USB eBeam Driver" + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_EBEAM0x1311 /* eBeam hardware : */ + /* Luidia Classic and Edge */ + /* Nec NP01Wi1 & NP01Wi2 */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv; + + struct ebeam_settingscursetting;/* device's current settings */ + struct ebeam_settingsnewsett
[RFC ebeam PATCH v4 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..efc68c8 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..93f5b83 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v4 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec "interactive solution" NP01Wi1 & NP01Wi2 accessories. In fact, from basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. So, the code : Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v4 0/2] new USB eBeam input driver
Hi, New USB input driver for eBeam devices. Currently supported (tested) : - Luidia eBeam classic projection and edge projection models - Nec interactive solution NP01Wi1 NP01Wi2 accessories. In fact, from basic usb point of view, all these devices are indistinguishable : they have the same usb ids and (blank) hid report descriptors. There's other re-branded hardware that need to be test, but i bet on same ids. So, the code : Patch 1 to blacklist the devices for hid generic-usb. Patch 2 is the actual driver. Notable stuff : - use div64_s64 for portable 64/64-bits divisions. - 13 sysfs custom files : 9 values for the transformation matrix, 4 for xy ranges and a calibration trigger. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v4 1/2] hid: Blacklist eBeam devices
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..efc68c8 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_EBEAM) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..93f5b83 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_EBEAM0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/input/misc/Kconfig | 22 ++ drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 766 +++ 3 files changed, 789 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..c226b83 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,28 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Supported devices : + - Luidia eBeam Classic Projection and eBeam Edge Projection + - Nec NP01Wi1 NP01Wi2 interactive solution + + Supposed working devices, need test, may lack functionnality : + - Luidia eBeam Edge Whiteboard and eBeam Engage + - Hitachi Starboard FX-63, FX-77, FX-82, FX-77GII + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..80e3397 --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,766 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz daniel.r...@gmx.ch + * aiptek.c (sysfs/settings) by Chris Atenasio ch...@crud.net + * Bryan W. Headley bwhead...@earthlink.net + * + */ + +#include linux/kernel.h +#include linux/slab.h +#include linux/math64.h +#include linux/input.h +#include linux/module.h +#include linux/init.h +#include linux/usb.h +#include linux/usb/input.h + +#define DRIVER_AUTHOR Yann Cantin yann.can...@laposte.net +#define DRIVER_DESCUSB eBeam Driver + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_EBEAM0x1311 /* eBeam hardware : */ + /* Luidia Classic and Edge */ + /* Nec NP01Wi1 NP01Wi2 */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv
Re: [RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Le 07/08/2012 03:45, Dmitry Torokhov a écrit : > On Tue, Aug 07, 2012 at 03:21:45AM +0200, Yann Cantin wrote: >> Le 07/08/2012 00:07, Dmitry Torokhov a écrit : >>> On Monday, August 06, 2012 02:43:40 PM Greg KH wrote: >>>> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote: >>>>> Signed-off-by: Yann Cantin >>>>> --- >>>>> >>>>> drivers/hid/hid-core.c |3 +++ >>>>> drivers/hid/hid-ids.h |3 +++ >>>>> 2 files changed, 6 insertions(+) >>>>> >>>>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c >>>>> index 60ea284..b1ed8ee 100644 >>>>> --- a/drivers/hid/hid-core.c >>>>> +++ b/drivers/hid/hid-core.c >>>>> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] >>>>> = {> >>>>> { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) >>>>> }, >>>>> { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, >>>>> { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, >>>>> >>>>> +#if defined(CONFIG_INPUT_EBEAM_USB) >>>>> + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, >>>>> +#endif >>>> >>>> Why is this #if in here? Just always do it, how could it not be >>>> defined? >>> >>> User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be >>> set. But I agree, since the device is unusable with generic HID driver >>> there is no point in doing this conditionally. >> >> There's a closed-source user-space stack (libusb based daemon + xorg driver >> + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010, >> maybe others but break on recent xorg). >> >> I don't know exactly what to do : i don't want to break hypothetical support, >> even proprietary. >> Leaving the choice at kernel compile time seems to be safer, no ? > > If they are using libusb that means that they use userspace solution and > do not require HID or any other in-kernel driver. They should still be > able to claim the port even if your driver is in use. Ok, that solve one of my issue. But if the driver isn't built, there will be absolutely no kernel support, even basic hiddev/hidraw. Is there a kernel policy for that situation ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Le 07/08/2012 03:43, Dmitry Torokhov a écrit : > On Tue, Aug 07, 2012 at 02:56:40AM +0200, Yann Cantin wrote: >> Hi, >> >> Le 06/08/2012 23:43, Greg KH a écrit : >>> On Mon, Aug 06, 2012 at 11:21:44PM +0200, Yann Cantin wrote: >>>> >>>> Signed-off-by: Yann Cantin >>>> --- >>>> drivers/input/misc/ebeam.c | 764 >>>> >>>> 1 file changed, 764 insertions(+) >>>> create mode 100644 drivers/input/misc/ebeam.c >>> >>> What adds this file to the build? >> >> Sorry, i don't get it : what do you mean ? > > Greg meant that you forgot to include Makefile and Kconfig changes with > this patch. My bad. Looked twice and yet miss that... Will be in v4. For info : --- diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..1e575e4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,22 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Currently, only the Classic Projection model is supported. + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Le 07/08/2012 03:45, Dmitry Torokhov a écrit : On Tue, Aug 07, 2012 at 03:21:45AM +0200, Yann Cantin wrote: Le 07/08/2012 00:07, Dmitry Torokhov a écrit : On Monday, August 06, 2012 02:43:40 PM Greg KH wrote: On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..b1ed8ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, +#endif Why is this #if in here? Just always do it, how could it not be defined? User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be set. But I agree, since the device is unusable with generic HID driver there is no point in doing this conditionally. There's a closed-source user-space stack (libusb based daemon + xorg driver + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010, maybe others but break on recent xorg). I don't know exactly what to do : i don't want to break hypothetical support, even proprietary. Leaving the choice at kernel compile time seems to be safer, no ? If they are using libusb that means that they use userspace solution and do not require HID or any other in-kernel driver. They should still be able to claim the port even if your driver is in use. Ok, that solve one of my issue. But if the driver isn't built, there will be absolutely no kernel support, even basic hiddev/hidraw. Is there a kernel policy for that situation ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Le 07/08/2012 03:43, Dmitry Torokhov a écrit : On Tue, Aug 07, 2012 at 02:56:40AM +0200, Yann Cantin wrote: Hi, Le 06/08/2012 23:43, Greg KH a écrit : On Mon, Aug 06, 2012 at 11:21:44PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/input/misc/ebeam.c | 764 1 file changed, 764 insertions(+) create mode 100644 drivers/input/misc/ebeam.c What adds this file to the build? Sorry, i don't get it : what do you mean ? Greg meant that you forgot to include Makefile and Kconfig changes with this patch. My bad. Looked twice and yet miss that... Will be in v4. For info : --- diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..1e575e4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,22 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate USB eBeam driver + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at http://sourceforge.net/projects/ebeam/ for + a usage description and the required user-space tools. + + Currently, only the Classic Projection model is supported. + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate PC Speaker support depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 0/2]
Le 07/08/2012 00:09, Dmitry Torokhov a écrit : > On Monday, August 06, 2012 02:44:23 PM Greg KH wrote: >> On Mon, Aug 06, 2012 at 11:21:42PM +0200, Yann Cantin wrote: >>> Hi, >>> >>> New USB input driver for eBeam devices. >>> >>> Currently, only the Luidia eBeam classic projection model is supported. >>> Edge model and a NEC interactive video-projector support planned for the >>> end of the mounth. >>> >>> Patch 1 to blacklist the device for hid generic-usb. >>> >>> Patch 2 is the actual driver. >>> >>> Changes from previous : >>> - switch to div64_s64 for portable 64/64-bits divisions > > Do you really need this much precision? It will be slower on 32 bits.. Yes. I can give the details if you want (homography computation without floating point maths). >>> - some cosmetics in device name >>> - unused include and def removed >>> - variables name changes for readability >>> >>> Pending issues : >>> >>> - sysfs custom files : need to pass 13 parameters for calibration : >>> choice is between lots of simply-handled, or few with a big sscanf. >> >> sysfs is "one value per file", so use lots of different files please. > > This is kind of a "one value" though - it is a transformation matrix. > Maybe switch it to binary - 9 s32? Right, but this somehow obfuscate the api. In the other hand, i doubt there will be lots of calibration tools other that mine. Is there any drawback for numerous sysfs custom files ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Le 07/08/2012 00:07, Dmitry Torokhov a écrit : > On Monday, August 06, 2012 02:43:40 PM Greg KH wrote: >> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote: >>> Signed-off-by: Yann Cantin >>> --- >>> >>> drivers/hid/hid-core.c |3 +++ >>> drivers/hid/hid-ids.h |3 +++ >>> 2 files changed, 6 insertions(+) >>> >>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c >>> index 60ea284..b1ed8ee 100644 >>> --- a/drivers/hid/hid-core.c >>> +++ b/drivers/hid/hid-core.c >>> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] >>> = {> >>> { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) >>> }, >>> { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, >>> { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, >>> >>> +#if defined(CONFIG_INPUT_EBEAM_USB) >>> + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, >>> +#endif >> >> Why is this #if in here? Just always do it, how could it not be >> defined? > > User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be > set. But I agree, since the device is unusable with generic HID driver > there is no point in doing this conditionally. There's a closed-source user-space stack (libusb based daemon + xorg driver + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010, maybe others but break on recent xorg). I don't know exactly what to do : i don't want to break hypothetical support, even proprietary. Leaving the choice at kernel compile time seems to be safer, no ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Hi, Le 06/08/2012 23:43, Greg KH a écrit : > On Mon, Aug 06, 2012 at 11:21:44PM +0200, Yann Cantin wrote: >> >> Signed-off-by: Yann Cantin >> --- >> drivers/input/misc/ebeam.c | 764 >> >> 1 file changed, 764 insertions(+) >> create mode 100644 drivers/input/misc/ebeam.c > > What adds this file to the build? Sorry, i don't get it : what do you mean ? > greg k-h -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin --- drivers/input/misc/ebeam.c | 764 1 file changed, 764 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..54e2cd6 --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,764 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz + * aiptek.c (sysfs/settings) by Chris Atenasio + * Bryan W. Headley + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Yann Cantin " +#define DRIVER_DESC"USB eBeam Driver" + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 /* Classic projection "La banane" */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv; + + struct ebeam_settingscursetting;/* device's current settings */ + struct ebeam_settingsnewsetting;/* ... and new ones */ + + bool calibrated;/* false : send raw */ + /* true : send computed */ + + u16 raw_x, raw_y; /* raw coordinates */ + int x, y; /* computed coordinates */ + int btn_map; /* internal buttons map */ +}; + +/* device types */ +enum { + DEVTYPE_CLASSIC, +}; + +static const struct usb_device_id ebeam_devices[] = { + {USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC), + .driver_info = DEVTYPE_CLASSIC}, + {} +}; + +static void ebeam_init_settings(struct ebeam_device *ebeam) +{ + ebeam->calibrated = false; + + /* Init (x,y) min/max to raw ones */ + ebeam->cursetting.min_x = ebeam->newsetting.min_x = MIN_RAW_X; + ebeam->cursetting.max_x = ebeam->newsetting.max_x = MAX_RAW_X; + ebeam->cursetting.min_y = ebeam->newsetting.min_y = MIN_RAW_Y; + ebeam->cursetting.max_y = ebeam->newsetting.max_y = MAX_RAW_Y; + + /* Safe values for the H matrix (Identity) */ + ebeam->cursetting.h1 = ebeam->newsetting.h1 = 1; + ebeam->cursetting.h2 = ebeam->newsetting.h2 = 0; + ebeam->cursetting.h3 = ebeam->newsetting.h3 = 0; + + ebeam->cursetting.h4 = ebeam->newsetting.h4 = 0; + ebeam->cursetting.h5 = ebeam->newsetting.h5 = 1; + ebeam->cursetting.h6 = ebeam->newsetting.h6 = 0; + + ebeam->cursetting.h7 = ebeam->newsetting.h7 = 0; + ebeam->cursetting.h8 = ebeam->newsetting.h8 = 0; + ebeam->cursetting.h9 = ebeam->newsetting.h9 = 1; +} + +static void ebeam_setup_input(struct ebeam_device *ebeam, + struct input_dev *input_dev) +{ + unsigned long flags; + + /* Take event lock while modifying parameters */ + spin_lock_irqsave(_dev->event_lock, flags); + + /* Properties */ + set_bit(INPUT_PROP_DIRECT, input_dev->propbit); + + /* Events generated */ + set_bi
[RFC ebeam PATCH v3 0/2]
Hi, New USB input driver for eBeam devices. Currently, only the Luidia eBeam classic projection model is supported. Edge model and a NEC interactive video-projector support planned for the end of the mounth. Patch 1 to blacklist the device for hid generic-usb. Patch 2 is the actual driver. Changes from previous : - switch to div64_s64 for portable 64/64-bits divisions - some cosmetics in device name - unused include and def removed - variables name changes for readability Pending issues : - sysfs custom files : need to pass 13 parameters for calibration : choice is between lots of simply-handled, or few with a big sscanf. - is div64_s64 safe and available on all plateform ? this is the only use of this function i've found in all the kernel tree. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..b1ed8ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..b985059 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..b1ed8ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..b985059 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v3 0/2]
Hi, New USB input driver for eBeam devices. Currently, only the Luidia eBeam classic projection model is supported. Edge model and a NEC interactive video-projector support planned for the end of the mounth. Patch 1 to blacklist the device for hid generic-usb. Patch 2 is the actual driver. Changes from previous : - switch to div64_s64 for portable 64/64-bits divisions - some cosmetics in device name - unused include and def removed - variables name changes for readability Pending issues : - sysfs custom files : need to pass 13 parameters for calibration : choice is between lots of simply-handled, or few with a big sscanf. - is div64_s64 safe and available on all plateform ? this is the only use of this function i've found in all the kernel tree. The module run fine with a 3.3.6 and a 3.5.0 kernel, both x86_32 and 64. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/input/misc/ebeam.c | 764 1 file changed, 764 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..54e2cd6 --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,764 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz daniel.r...@gmx.ch + * aiptek.c (sysfs/settings) by Chris Atenasio ch...@crud.net + * Bryan W. Headley bwhead...@earthlink.net + * + */ + +#include linux/kernel.h +#include linux/slab.h +#include linux/math64.h +#include linux/input.h +#include linux/module.h +#include linux/init.h +#include linux/usb.h +#include linux/usb/input.h + +#define DRIVER_AUTHOR Yann Cantin yann.can...@laposte.net +#define DRIVER_DESCUSB eBeam Driver + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_RAW_X 0 /* raw coordinates ranges */ +#define MAX_RAW_X 0x +#define MIN_RAW_Y 0 +#define MAX_RAW_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 /* Classic projection La banane */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; /* computed coordinates ranges for the input layer */ + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv; + + struct ebeam_settingscursetting;/* device's current settings */ + struct ebeam_settingsnewsetting;/* ... and new ones */ + + bool calibrated;/* false : send raw */ + /* true : send computed */ + + u16 raw_x, raw_y; /* raw coordinates */ + int x, y; /* computed coordinates */ + int btn_map; /* internal buttons map */ +}; + +/* device types */ +enum { + DEVTYPE_CLASSIC, +}; + +static const struct usb_device_id ebeam_devices[] = { + {USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC), + .driver_info = DEVTYPE_CLASSIC}, + {} +}; + +static void ebeam_init_settings(struct ebeam_device *ebeam) +{ + ebeam-calibrated = false; + + /* Init (x,y) min/max to raw ones */ + ebeam-cursetting.min_x = ebeam-newsetting.min_x = MIN_RAW_X; + ebeam-cursetting.max_x = ebeam-newsetting.max_x = MAX_RAW_X; + ebeam-cursetting.min_y = ebeam-newsetting.min_y = MIN_RAW_Y; + ebeam-cursetting.max_y = ebeam-newsetting.max_y = MAX_RAW_Y; + + /* Safe values for the H matrix (Identity) */ + ebeam-cursetting.h1 = ebeam-newsetting.h1 = 1; + ebeam-cursetting.h2 = ebeam-newsetting.h2 = 0; + ebeam-cursetting.h3 = ebeam-newsetting.h3 = 0; + + ebeam-cursetting.h4 = ebeam-newsetting.h4 = 0; + ebeam-cursetting.h5 = ebeam-newsetting.h5 = 1; + ebeam-cursetting.h6 = ebeam-newsetting.h6 = 0; + + ebeam-cursetting.h7 = ebeam-newsetting.h7 = 0; + ebeam-cursetting.h8 = ebeam-newsetting.h8 = 0; + ebeam-cursetting.h9 = ebeam-newsetting.h9 = 1; +} + +static void ebeam_setup_input(struct ebeam_device *ebeam, + struct input_dev *input_dev) +{ + unsigned long flags; + + /* Take event lock while modifying parameters */ + spin_lock_irqsave(input_dev-event_lock, flags); + + /* Properties */ + set_bit(INPUT_PROP_DIRECT, input_dev-propbit
Re: [RFC ebeam PATCH v3 2/2] input: misc: New USB eBeam input driver.
Hi, Le 06/08/2012 23:43, Greg KH a écrit : On Mon, Aug 06, 2012 at 11:21:44PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/input/misc/ebeam.c | 764 1 file changed, 764 insertions(+) create mode 100644 drivers/input/misc/ebeam.c What adds this file to the build? Sorry, i don't get it : what do you mean ? greg k-h -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 1/2] hid: Blacklist new eBeam classic device
Le 07/08/2012 00:07, Dmitry Torokhov a écrit : On Monday, August 06, 2012 02:43:40 PM Greg KH wrote: On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-core.c |3 +++ drivers/hid/hid-ids.h |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..b1ed8ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, +#endif Why is this #if in here? Just always do it, how could it not be defined? User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be set. But I agree, since the device is unusable with generic HID driver there is no point in doing this conditionally. There's a closed-source user-space stack (libusb based daemon + xorg driver + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010, maybe others but break on recent xorg). I don't know exactly what to do : i don't want to break hypothetical support, even proprietary. Leaving the choice at kernel compile time seems to be safer, no ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v3 0/2]
Le 07/08/2012 00:09, Dmitry Torokhov a écrit : On Monday, August 06, 2012 02:44:23 PM Greg KH wrote: On Mon, Aug 06, 2012 at 11:21:42PM +0200, Yann Cantin wrote: Hi, New USB input driver for eBeam devices. Currently, only the Luidia eBeam classic projection model is supported. Edge model and a NEC interactive video-projector support planned for the end of the mounth. Patch 1 to blacklist the device for hid generic-usb. Patch 2 is the actual driver. Changes from previous : - switch to div64_s64 for portable 64/64-bits divisions Do you really need this much precision? It will be slower on 32 bits.. Yes. I can give the details if you want (homography computation without floating point maths). - some cosmetics in device name - unused include and def removed - variables name changes for readability Pending issues : - sysfs custom files : need to pass 13 parameters for calibration : choice is between lots of simply-handled, or few with a big sscanf. sysfs is one value per file, so use lots of different files please. This is kind of a one value though - it is a transformation matrix. Maybe switch it to binary - 9 s32? Right, but this somehow obfuscate the api. In the other hand, i doubt there will be lots of calibration tools other that mine. Is there any drawback for numerous sysfs custom files ? -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v2 3/3] input: misc: New USB eBeam input driver.
Hi, >> +#include > > As this driver is not a HID bus driver, why do you need this include? Cinder, removed >> +#define DRIVER_VERSION "v0.7" > > I don't think we need to be tracking driver versions for newly submitted > drivers, git is much better at tracking changes. Old habit, removed. >> +u16 X, Y; /* raw coordinates */ >> +int x, y; /* computed coordinates */ > > X,x being different fields seems confusing to me. How about, let's say, x, > raw_x? Done. >> +DEVICE_H_ATTR(1); >> +DEVICE_H_ATTR(2); >> +DEVICE_H_ATTR(3); >> +DEVICE_H_ATTR(4); >> +DEVICE_H_ATTR(5); >> +DEVICE_H_ATTR(6); >> +DEVICE_H_ATTR(7); >> +DEVICE_H_ATTR(8); >> +DEVICE_H_ATTR(9); > > You are adding a number of sysfs files. If they are really necessary, > you'll probably need to document those in Documentation/ABI. Will do, in testing i suppose. BTW : The driver need lot of parameters to be passed from user-space calibration tool. The best way to do it isn't decided yet : one sysfs file per parameter, or one sysfs file for all, with a big sscanf parsing. Any idea ? >> +strlcat(ebeam->name, ")", sizeof(ebeam->name)); > > I'd suggest checking the length, making sure that you don't overflow the > ->name buffer. Something like this ? : if (strlcat(ebeam->name, ")", sizeof(ebeam->name))>=sizeof(ebeam->name)) { // overflowed, closing ) anyway ebeam->name[sizeof(ebeam->name)-2] = ')'; Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v2 0/3] new USB eBeam input driver
Hi, Le 02/08/2012 16:16, Jiri Kosina a écrit : >> Patch 1 and 2 are here to let the ebeam driver be choose to handle >> the device instead of the generic-usb hid one (totally useless). > > Just merge 1 and 2 together, not necessary to have two commits because of > that. Ok, will do that for the next iteration of the patchset (i don't think i need to resubmit now with this change only, no?) Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v2 0/3] new USB eBeam input driver
Hi, Le 02/08/2012 16:16, Jiri Kosina a écrit : Patch 1 and 2 are here to let the ebeam driver be choose to handle the device instead of the generic-usb hid one (totally useless). Just merge 1 and 2 together, not necessary to have two commits because of that. Ok, will do that for the next iteration of the patchset (i don't think i need to resubmit now with this change only, no?) Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC ebeam PATCH v2 3/3] input: misc: New USB eBeam input driver.
Hi, +#include linux/hid.h As this driver is not a HID bus driver, why do you need this include? Cinder, removed +#define DRIVER_VERSION v0.7 I don't think we need to be tracking driver versions for newly submitted drivers, git is much better at tracking changes. Old habit, removed. +u16 X, Y; /* raw coordinates */ +int x, y; /* computed coordinates */ X,x being different fields seems confusing to me. How about, let's say, x, raw_x? Done. +DEVICE_H_ATTR(1); +DEVICE_H_ATTR(2); +DEVICE_H_ATTR(3); +DEVICE_H_ATTR(4); +DEVICE_H_ATTR(5); +DEVICE_H_ATTR(6); +DEVICE_H_ATTR(7); +DEVICE_H_ATTR(8); +DEVICE_H_ATTR(9); You are adding a number of sysfs files. If they are really necessary, you'll probably need to document those in Documentation/ABI. Will do, in testing i suppose. BTW : The driver need lot of parameters to be passed from user-space calibration tool. The best way to do it isn't decided yet : one sysfs file per parameter, or one sysfs file for all, with a big sscanf parsing. Any idea ? +strlcat(ebeam-name, ), sizeof(ebeam-name)); I'd suggest checking the length, making sure that you don't overflow the -name buffer. Something like this ? : if (strlcat(ebeam-name, ), sizeof(ebeam-name))=sizeof(ebeam-name)) { // overflowed, closing ) anyway ebeam-name[sizeof(ebeam-name)-2] = ')'; Thanks. -- Yann Cantin A4FEB47F -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 2/3] hid: hid-core.c: Blackist eBeam classic device.
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284..b1ed8ee 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) }, +#if defined(CONFIG_INPUT_EBEAM_USB) + { HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 3/3] input: misc: New USB eBeam input driver.
Signed-off-by: Yann Cantin --- drivers/input/misc/Kconfig | 16 + drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 760 +++ 3 files changed, 777 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7c0f1ec..1e575e4 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -83,6 +83,22 @@ config INPUT_BMA150 To compile this driver as a module, choose M here: the module will be called bma150. +config INPUT_EBEAM_USB + tristate "USB eBeam driver" + depends on USB_ARCH_HAS_HCD + select USB + help + Say Y here if you have a USB eBeam pointing device and want to + use it without any proprietary user space tools. + + Have a look at <http://sourceforge.net/projects/ebeam/> for + a usage description and the required user-space tools. + + Currently, only the Classic Projection model is supported. + + To compile this driver as a module, choose M here: the + module will be called ebeam. + config INPUT_PCSPKR tristate "PC Speaker support" depends on PCSPKR_PLATFORM diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 83fe6f5..2aa9813 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o +obj-$(CONFIG_INPUT_EBEAM_USB) += ebeam.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..9c698a3 --- /dev/null +++ b/drivers/input/misc/ebeam.c @@ -0,0 +1,760 @@ +/** + * + * eBeam driver + * + * Copyright (C) 2012 Yann Cantin (yann.can...@laposte.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * based on + * + * usbtouchscreen.c by Daniel Ritz + * aiptek.c (sysfs/settings) by Chris Atenasio + * Bryan W. Headley + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_VERSION "v0.7" +#define DRIVER_AUTHOR "Yann Cantin " +#define DRIVER_DESC"USB eBeam Driver" + +/* Common values for eBeam devices */ +#define REPT_SIZE 8 /* packet size*/ +#define MIN_X 0 /* raw coordinates ranges */ +#define MAX_X 0x +#define MIN_Y 0 +#define MAX_Y 0x + + +#define USB_VENDOR_ID_EFI 0x2650 /* Electronics For Imaging, Inc */ +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 /* Classic projection "La banane" */ + +#define EBEAM_BTN_TIP 0x1 /* tip*/ +#define EBEAM_BTN_LIT 0x2 /* little */ +#define EBEAM_BTN_BIG 0x4 /* big*/ + +/* ebeam settings */ +struct ebeam_settings { + int min_x; + int max_x; + int min_y; + int max_y; + + /* H matrix */ + s64 h1; + s64 h2; + s64 h3; + s64 h4; + s64 h5; + s64 h6; + s64 h7; + s64 h8; + s64 h9; +}; + +/* ebeam device */ +struct ebeam_device { + unsigned char*data; + dma_addr_t data_dma; + unsigned char*buffer; + int buf_len; + struct urb *irq; + struct usb_interface *interface; + struct input_dev *input; + char name[128]; + char phys[64]; + void *priv; + + struct ebeam_settingscursetting;/* device's current settings */ + struct ebeam_settingsnewsetting;/* ... and new ones */ + + bool calibrated;/* false : send raw */ + /* true : send computed */ + + u16 X, Y; /* raw coordinates */ + int x, y; /* computed coordinates */ + int btn_map; /* internal buttons map */ +}; + + +/* device types */ +enum { + DEVTY
[RFC ebeam PATCH v2 0/3] new USB eBeam input driver
Hi, Second test-drive for a new USB input driver for eBeam devices. Following Dmitry's advice, i've remove device specific infrastructure. Currently, only the Luidia eBeam classic projection model is supported. Patch 1 and 2 are here to let the ebeam driver be choose to handle the device instead of the generic-usb hid one (totally useless). Patch 3 is the actual driver. Some things to consider : - I'm not familiar with kernel coding (i've based my work on usbtouchscreen.c) so the code certainly contain flaws. - There's 2 64/64-bits divisions needed, don't know how to handle that the right way to be efficient and portable. - There's 14 custom sysfs files. Yes. The module run fine with a 3.3.6 and a 3.5.0 kernel. Thanks for your help. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 1/3] hid: hid-ids.h: Add vendor and device ID for eBeam classic device.
Signed-off-by: Yann Cantin --- drivers/hid/hid-ids.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..b985059 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 1/3] hid: hid-ids.h: Add vendor and device ID for eBeam classic device.
Signed-off-by: Yann Cantin yann.can...@laposte.net --- drivers/hid/hid-ids.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1dcb76f..b985059 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_VENDOR_ID_EFI 0x2650 +#define USB_DEVICE_ID_EFI_CLASSIC 0x1311 + #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC ebeam PATCH v2 0/3] new USB eBeam input driver
Hi, Second test-drive for a new USB input driver for eBeam devices. Following Dmitry's advice, i've remove device specific infrastructure. Currently, only the Luidia eBeam classic projection model is supported. Patch 1 and 2 are here to let the ebeam driver be choose to handle the device instead of the generic-usb hid one (totally useless). Patch 3 is the actual driver. Some things to consider : - I'm not familiar with kernel coding (i've based my work on usbtouchscreen.c) so the code certainly contain flaws. - There's 2 64/64-bits divisions needed, don't know how to handle that the right way to be efficient and portable. - There's 14 custom sysfs files. Yes. The module run fine with a 3.3.6 and a 3.5.0 kernel. Thanks for your help. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/