Re: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.

2012-09-03 Thread Oliver Neukum
On Friday 24 August 2012 16:42:20 Yann Cantin wrote:
> 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.

It is always better to have reset_resume() if it can be easily done.

Regards
Oliver

--
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.

2012-09-03 Thread Oliver Neukum
On Friday 24 August 2012 16:42:20 Yann Cantin wrote:
 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.

It is always better to have reset_resume() if it can be easily done.

Regards
Oliver

--
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-24 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-24 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-24 Thread Yann Cantin
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.

2012-08-23 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-23 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-23 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-23 Thread Oliver Neukum
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.

Regards
Oliver

--
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.

2012-08-22 Thread Yann Cantin

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  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_settingsnewsetting;/* ... and new ones  */
+
+   bool 

[RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.

2012-08-22 Thread Yann Cantin

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;
+
+