* Add support for elo intellitouch 2700 touchscreen to usbtouchscreen.c @ 2011-11-03 10:15 Michael Gebetsroither 2011-11-03 10:15 ` [PATCH] usbtouchscreen: add elo intellitouch 2700 support Michael Gebetsroither 0 siblings, 1 reply; 5+ messages in thread From: Michael Gebetsroither @ 2011-11-03 10:15 UTC (permalink / raw) To: linux-input; +Cc: Dmitry Torokhov Hi all, I've added support for the elo intellitouch 2700 touchscreen to the usbtouchscreen driver. The driver is used since a few months in production without any problems reported. Hope i did get things right as this is my first patch sent to linux kernel directly. All information needed for this patch where take from the serial implementation for elo touchscreens (elo.c). Kind Regards, Michael Gebetsroither ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] usbtouchscreen: add elo intellitouch 2700 support 2011-11-03 10:15 Add support for elo intellitouch 2700 touchscreen to usbtouchscreen.c Michael Gebetsroither @ 2011-11-03 10:15 ` Michael Gebetsroither 2011-11-04 0:45 ` Wanlong Gao 0 siblings, 1 reply; 5+ messages in thread From: Michael Gebetsroither @ 2011-11-03 10:15 UTC (permalink / raw) To: linux-input; +Cc: Dmitry Torokhov, Michael Gebetsroither Signed-off-by: Michael Gebetsroither <michael@mgeb.org> --- drivers/input/touchscreen/Kconfig | 6 ++++ drivers/input/touchscreen/usbtouchscreen.c | 36 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index cabd9e5..9dfb340 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -541,6 +541,7 @@ config TOUCHSCREEN_USB_COMPOSITE - GoTop Super_Q2/GogoPen/PenPower tablets - JASTEC USB Touch Controller/DigiTech DTR-02U - Zytronic controllers + - Elo TouchSystems 2700 IntelliTouch Have a look at <http://linux.chapter7.ch/touchkit/> for a usage description and the required user-space stuff. @@ -620,6 +621,11 @@ config TOUCHSCREEN_USB_JASTEC bool "JASTEC/DigiTech DTR-02U USB touch controller device support" if EXPERT depends on TOUCHSCREEN_USB_COMPOSITE +config TOUCHSCREEN_USB_ELO + default y + bool "Elo TouchSystems 2700 IntelliTouch controller device support" if EXPERT + depends on TOUCHSCREEN_USB_COMPOSITE + config TOUCHSCREEN_USB_E2I default y bool "e2i Touchscreen controller (e.g. from Mimo 740)" diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 73fd664..e2b63d9 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -16,6 +16,7 @@ * - JASTEC USB touch controller/DigiTech DTR-02U * - Zytronic capacitive touchscreen * - NEXIO/iNexio + * - Elo TouchSystems 2700 IntelliTouch * * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> * Copyright (C) by Todd E. Johnson (mtouchusb.c) @@ -138,6 +139,7 @@ enum { DEVTYPE_ZYTRONIC, DEVTYPE_TC45USB, DEVTYPE_NEXIO, + DEVTYPE_ELO, }; #define USB_DEVICE_HID_CLASS(vend, prod) \ @@ -239,6 +241,10 @@ static const struct usb_device_id usbtouch_devices[] = { .driver_info = DEVTYPE_NEXIO}, #endif +#ifdef CONFIG_TOUCHSCREEN_USB_ELO + {USB_DEVICE(0x04e7, 0x0020), .driver_info = DEVTYPE_ELO}, +#endif + {} }; @@ -278,6 +284,24 @@ static int e2i_read_data(struct usbtouch_usb *dev, unsigned char *pkt) /***************************************************************************** + * ELO part + */ + +#ifdef CONFIG_TOUCHSCREEN_USB_ELO + +static int elo_read_data(struct usbtouch_usb *dev, unsigned char *pkt) +{ + dev->x = ((pkt[3] << 8) | pkt[2]); + dev->y = ((pkt[5] << 8) | pkt[4]); + dev->touch = (pkt[6] > 0); + dev->press = pkt[6]; + return 1; + +} +#endif + + +/***************************************************************************** * eGalax part */ @@ -953,6 +977,18 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, #endif static struct usbtouch_device_info usbtouch_dev_info[] = { +#ifdef CONFIG_TOUCHSCREEN_USB_ELO + [DEVTYPE_ELO] = { + .min_xc = 0x0, + .max_xc = 0x0fff, + .min_yc = 0x0, + .max_yc = 0x0fff, + .max_press = 0xff, + .rept_size = 8, + .read_data = elo_read_data, + }, +#endif + #ifdef CONFIG_TOUCHSCREEN_USB_EGALAX [DEVTYPE_EGALAX] = { .min_xc = 0x0, -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] usbtouchscreen: add elo intellitouch 2700 support 2011-11-03 10:15 ` [PATCH] usbtouchscreen: add elo intellitouch 2700 support Michael Gebetsroither @ 2011-11-04 0:45 ` Wanlong Gao 2011-11-05 6:56 ` Dmitry Torokhov 0 siblings, 1 reply; 5+ messages in thread From: Wanlong Gao @ 2011-11-04 0:45 UTC (permalink / raw) To: Michael Gebetsroither; +Cc: linux-input, Dmitry Torokhov Hi Michael: Looks good, just a comment below, > Signed-off-by: Michael Gebetsroither <michael@mgeb.org> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> > --- > drivers/input/touchscreen/Kconfig | 6 ++++ > drivers/input/touchscreen/usbtouchscreen.c | 36 ++++++++++++++++++++++++++++ > 2 files changed, 42 insertions(+), 0 deletions(-) > > diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig > index cabd9e5..9dfb340 100644 > --- a/drivers/input/touchscreen/Kconfig > +++ b/drivers/input/touchscreen/Kconfig > @@ -541,6 +541,7 @@ config TOUCHSCREEN_USB_COMPOSITE > - GoTop Super_Q2/GogoPen/PenPower tablets > - JASTEC USB Touch Controller/DigiTech DTR-02U > - Zytronic controllers > + - Elo TouchSystems 2700 IntelliTouch > > Have a look at <http://linux.chapter7.ch/touchkit/> for > a usage description and the required user-space stuff. > @@ -620,6 +621,11 @@ config TOUCHSCREEN_USB_JASTEC > bool "JASTEC/DigiTech DTR-02U USB touch controller device support" if EXPERT > depends on TOUCHSCREEN_USB_COMPOSITE > > +config TOUCHSCREEN_USB_ELO > + default y > + bool "Elo TouchSystems 2700 IntelliTouch controller device support" if EXPERT > + depends on TOUCHSCREEN_USB_COMPOSITE > + > config TOUCHSCREEN_USB_E2I > default y > bool "e2i Touchscreen controller (e.g. from Mimo 740)" > diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c > index 73fd664..e2b63d9 100644 > --- a/drivers/input/touchscreen/usbtouchscreen.c > +++ b/drivers/input/touchscreen/usbtouchscreen.c > @@ -16,6 +16,7 @@ > * - JASTEC USB touch controller/DigiTech DTR-02U > * - Zytronic capacitive touchscreen > * - NEXIO/iNexio > + * - Elo TouchSystems 2700 IntelliTouch > * > * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> > * Copyright (C) by Todd E. Johnson (mtouchusb.c) > @@ -138,6 +139,7 @@ enum { > DEVTYPE_ZYTRONIC, > DEVTYPE_TC45USB, > DEVTYPE_NEXIO, > + DEVTYPE_ELO, > }; > > #define USB_DEVICE_HID_CLASS(vend, prod) \ > @@ -239,6 +241,10 @@ static const struct usb_device_id usbtouch_devices[] = { > .driver_info = DEVTYPE_NEXIO}, > #endif > > +#ifdef CONFIG_TOUCHSCREEN_USB_ELO > + {USB_DEVICE(0x04e7, 0x0020), .driver_info = DEVTYPE_ELO}, > +#endif > + > {} > }; > > @@ -278,6 +284,24 @@ static int e2i_read_data(struct usbtouch_usb *dev, unsigned char *pkt) > > > /***************************************************************************** > + * ELO part > + */ > + > +#ifdef CONFIG_TOUCHSCREEN_USB_ELO > + > +static int elo_read_data(struct usbtouch_usb *dev, unsigned char *pkt) > +{ > + dev->x = ((pkt[3] << 8) | pkt[2]); > + dev->y = ((pkt[5] << 8) | pkt[4]); > + dev->touch = (pkt[6] > 0); > + dev->press = pkt[6]; > + return 1; > + > +} > +#endif > + > + > +/***************************************************************************** > * eGalax part > */ > > @@ -953,6 +977,18 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, > #endif > > static struct usbtouch_device_info usbtouch_dev_info[] = { > +#ifdef CONFIG_TOUCHSCREEN_USB_ELO > + [DEVTYPE_ELO] = { > + .min_xc = 0x0, > + .max_xc = 0x0fff, > + .min_yc = 0x0, > + .max_yc = 0x0fff, > + .max_press = 0xff, > + .rept_size = 8, > + .read_data = elo_read_data, > + }, > +#endif Maybe you can move this *dev_info* to end to be consistent with the order of *enum*? Thanks -Wanlong Gao ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usbtouchscreen: add elo intellitouch 2700 support 2011-11-04 0:45 ` Wanlong Gao @ 2011-11-05 6:56 ` Dmitry Torokhov 2011-11-08 16:54 ` Michael Gebetsroither 0 siblings, 1 reply; 5+ messages in thread From: Dmitry Torokhov @ 2011-11-05 6:56 UTC (permalink / raw) To: Wanlong Gao; +Cc: Michael Gebetsroither, linux-input On Fri, Nov 04, 2011 at 08:45:21AM +0800, Wanlong Gao wrote: > > > > static struct usbtouch_device_info usbtouch_dev_info[] = { > > +#ifdef CONFIG_TOUCHSCREEN_USB_ELO > > + [DEVTYPE_ELO] = { > > + .min_xc = 0x0, > > + .max_xc = 0x0fff, > > + .min_yc = 0x0, > > + .max_yc = 0x0fff, > > + .max_press = 0xff, > > + .rept_size = 8, > > + .read_data = elo_read_data, > > + }, > > +#endif > > > Maybe you can move this *dev_info* to end to be consistent with the order of *enum*? > I did that locally and applied to my 3.3 queue; thanks everyone. -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usbtouchscreen: add elo intellitouch 2700 support 2011-11-05 6:56 ` Dmitry Torokhov @ 2011-11-08 16:54 ` Michael Gebetsroither 0 siblings, 0 replies; 5+ messages in thread From: Michael Gebetsroither @ 2011-11-08 16:54 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: Wanlong Gao, linux-input On 2011-11-05 07:56, Dmitry Torokhov wrote: > On Fri, Nov 04, 2011 at 08:45:21AM +0800, Wanlong Gao wrote: >>> >>> static struct usbtouch_device_info usbtouch_dev_info[] = { >>> +#ifdef CONFIG_TOUCHSCREEN_USB_ELO >>> + [DEVTYPE_ELO] = { >>> + .min_xc = 0x0, >>> + .max_xc = 0x0fff, >>> + .min_yc = 0x0, >>> + .max_yc = 0x0fff, >>> + .max_press = 0xff, >>> + .rept_size = 8, >>> + .read_data = elo_read_data, >>> + }, >>> +#endif >> >> >> Maybe you can move this *dev_info* to end to be consistent with the order of *enum*? >> > > I did that locally and applied to my 3.3 queue; thanks everyone. Thx dimitry! Kind Regards, Michael Gebetsroither ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-08 16:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-03 10:15 Add support for elo intellitouch 2700 touchscreen to usbtouchscreen.c Michael Gebetsroither 2011-11-03 10:15 ` [PATCH] usbtouchscreen: add elo intellitouch 2700 support Michael Gebetsroither 2011-11-04 0:45 ` Wanlong Gao 2011-11-05 6:56 ` Dmitry Torokhov 2011-11-08 16:54 ` Michael Gebetsroither
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).