All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum-IBi9RG/b67k@public.gmane.org>
To: Yann Cantin <yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
Cc: linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	jkosina-AlSwsSmVLrQ@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org
Subject: Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Date: Tue, 21 Jul 2015 10:19:23 +0200	[thread overview]
Message-ID: <1437466763.3823.1.camel@suse.com> (raw)
In-Reply-To: <1437426199-29866-3-git-send-email-yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>

On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote:
> Signed-off-by: Yann Cantin <yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
> ---
>  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 0000000..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.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org
> +		linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org
> +		linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org
> +		linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-$(CONFIG_INPUT_DRV260X_HAPTICS)	+= drv260x.o
>  obj-$(CONFIG_INPUT_DRV2665_HAPTICS)	+= drv2665.o
>  obj-$(CONFIG_INPUT_DRV2667_HAPTICS)	+= drv2667.o
> diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c
> new file mode 100644
> index 0000000..79cac51
> --- /dev/null
> +++ b/drivers/input/misc/ebeam.c
> @@ -0,0 +1,777 @@
> +/******************************************************************************
> + *
> + * eBeam driver
> + *
> + * Copyright (C) 2012-2015 Yann Cantin (yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org)
> + *
> + *	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.ritz-OI3hZJvNYWs@public.gmane.org>
> + *	aiptek.c (sysfs/settings) by Chris Atenasio <chris-v4AJ0sPprEc@public.gmane.org>
> + *				     Bryan W. Headley <bwheadley-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org>
> + *
> + *****************************************************************************/
> +
> +#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.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>"
> +#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	0xFFFF
> +#define MIN_RAW_Y	0
> +#define MAX_RAW_Y	0xFFFF
> +
> +/* Electronics For Imaging, Inc */
> +#define USB_VENDOR_ID_EFI	0x2650

You are defining these IDs twice. That is not good.

	Regards
		Oliver

WARNING: multiple messages have this Message-ID (diff)
From: Oliver Neukum <oneukum@suse.com>
To: Yann Cantin <yann.cantin@laposte.net>
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	dmitry.torokhov@gmail.com, jkosina@suse.cz,
	gregkh@linuxfoundation.org
Subject: Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Date: Tue, 21 Jul 2015 10:19:23 +0200	[thread overview]
Message-ID: <1437466763.3823.1.camel@suse.com> (raw)
In-Reply-To: <1437426199-29866-3-git-send-email-yann.cantin@laposte.net>

On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote:
> Signed-off-by: Yann Cantin <yann.cantin@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 0000000..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.cantin@laposte.net
> +		linux-usb@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.cantin@laposte.net
> +		linux-usb@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.cantin@laposte.net
> +		linux-usb@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-$(CONFIG_INPUT_DRV260X_HAPTICS)	+= drv260x.o
>  obj-$(CONFIG_INPUT_DRV2665_HAPTICS)	+= drv2665.o
>  obj-$(CONFIG_INPUT_DRV2667_HAPTICS)	+= drv2667.o
> diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c
> new file mode 100644
> index 0000000..79cac51
> --- /dev/null
> +++ b/drivers/input/misc/ebeam.c
> @@ -0,0 +1,777 @@
> +/******************************************************************************
> + *
> + * eBeam driver
> + *
> + * Copyright (C) 2012-2015 Yann Cantin (yann.cantin@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.ritz@gmx.ch>
> + *	aiptek.c (sysfs/settings) by Chris Atenasio <chris@crud.net>
> + *				     Bryan W. Headley <bwheadley@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.cantin@laposte.net>"
> +#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	0xFFFF
> +#define MIN_RAW_Y	0
> +#define MAX_RAW_Y	0xFFFF
> +
> +/* Electronics For Imaging, Inc */
> +#define USB_VENDOR_ID_EFI	0x2650

You are defining these IDs twice. That is not good.

	Regards
		Oliver



  parent reply	other threads:[~2015-07-21  8:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 21:03 [RFC ebeam PATCH 0/3] new USB eBeam input driver Yann Cantin
2015-07-20 21:03 ` Yann Cantin
     [not found] ` <1437426199-29866-1-git-send-email-yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2015-07-20 21:03   ` [RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices Yann Cantin
2015-07-20 21:03     ` Yann Cantin
2015-07-20 21:03 ` [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver Yann Cantin
2015-07-20 21:59   ` Greg KH
2015-07-20 22:26     ` Dmitry Torokhov
2015-07-20 22:40       ` Greg KH
2015-07-20 23:09         ` Dmitry Torokhov
     [not found]         ` <20150720224033.GA23884-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-07-21 13:54           ` Yann Cantin
2015-07-21 13:54             ` Yann Cantin
     [not found]     ` <20150720215956.GA21796-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-07-21 12:18       ` Yann Cantin
2015-07-21 12:18         ` Yann Cantin
     [not found]   ` <1437426199-29866-3-git-send-email-yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2015-07-21  8:19     ` Oliver Neukum [this message]
2015-07-21  8:19       ` Oliver Neukum
2015-07-21 12:38       ` Yann Cantin
  -- strict thread matches above, loose matches on Subject: below --
2013-07-24 23:52 [RFC ebeam PATCH 0/2] new " Yann Cantin
2013-07-24 23:52 ` [RFC ebeam PATCH 2/2] input: misc: New " Yann Cantin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437466763.3823.1.camel@suse.com \
    --to=oneukum-ibi9rg/b67k@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.