All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Daniel Ritz <daniel.ritz-ml@swissonline.ch>
Cc: Lanslott Gish <lanslott.gish@gmail.com>, Greg KH <greg@kroah.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-usb <linux-usb-devel@lists.sourceforge.net>,
	tejohnson@yahoo.com, hc@mivu.no, vojtech@suse.cz
Subject: Re: [RFC][PATCH] USB touch screen driver, all-in-one
Date: Sat, 11 Mar 2006 20:31:35 -0500	[thread overview]
Message-ID: <200603112031.35989.dtor_core@ameritech.net> (raw)
In-Reply-To: <200603112155.38984.daniel.ritz-ml@swissonline.ch>

On Saturday 11 March 2006 15:55, Daniel Ritz wrote:
> hi
> 
> here my merge of the USB touchscreen drivers, based on my patch from
> thursday for touchkitusb. this time it's a new driver...
> 
> and of course it's untested. i can test the egalax part next week...
> 
> [ also cc'ing the authors of the other drivers ]
> 
> the sizes for comparison:
>    text    data     bss     dec     hex filename
>    2942     724       4    3670     e56 touchkitusb.ko
>    2647     660       0    3307     ceb mtouchusb.ko
>    2448     628       0    3076     c04 itmtouch.ko
>    4097    1012       4    5113    13f9 usbtouchscreen.ko
> 
> comments?
> 

I like it.

> +
> +	input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
> +	input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
> +	input_set_abs_params(input_dev, ABS_X, type->min_xc, type->max_xc, 0, 0);
> +	input_set_abs_params(input_dev, ABS_Y, type->min_yc, type->max_yc, 0, 0);
> +	input_set_abs_params(input_dev, ABS_PRESSURE, type->min_press, type->max_press, 0, 0);
> +

Not all devices report pressure; driver should only advertise ABS_PRESSURE for
devices that actually support it.

> +	usb_fill_int_urb(usbtouch->irq, usbtouch->udev,
> +			 usb_rcvintpipe(usbtouch->udev, 0x81),
> +			 usbtouch->data, type->rept_size,
> +			 usbtouch_irq, usbtouch, endpoint->bInterval);
> +
> +	usbtouch->irq->transfer_dma = usbtouch->data_dma;
> +	usbtouch->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
> +
> +	input_register_device(usbtouch->input);
> +

Please add error handling now that input_register_device() returns errors.

> +	usb_set_intfdata(intf, usbtouch);
> +
> +	/* device specific init */
> +	if (type->init)
> +		type->init(usbtouch);
> +

Should we do device-specific init before registering input device and also
handle errors here?

-- 
Dmitry

  reply	other threads:[~2006-03-12  1:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10  9:24 [PATCH] Try to add support for universal USB touchscreen device, and WISH for help~ Lanslott Gish
2006-03-11 20:55 ` [RFC][PATCH] USB touch screen driver, all-in-one Daniel Ritz
2006-03-12  1:31   ` Dmitry Torokhov [this message]
2006-03-13  1:01   ` Lanslott Gish
2006-03-14  1:10     ` Lanslott Gish
2006-03-14 10:38       ` Jan-Benedict Glaw
2006-03-15  4:30         ` Lanslott Gish
2006-03-15 14:08           ` Jan-Benedict Glaw
2006-03-16  6:46             ` Lanslott Gish
2006-03-15 21:53           ` Daniel Ritz
2006-03-17  2:46             ` Lanslott Gish
2006-03-17 21:50               ` Daniel Ritz
2006-03-21  4:23                 ` Lanslott Gish
2006-03-21 20:22                   ` Daniel Ritz
2006-03-21 22:48                     ` Todd E. Johnson
2006-03-21  6:39               ` Lanslott Gish
2006-03-21 20:21                 ` Daniel Ritz
2006-03-15 21:54   ` Daniel Ritz
2006-03-15 22:13     ` Greg KH

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=200603112031.35989.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=daniel.ritz-ml@swissonline.ch \
    --cc=dmitry.torokhov@gmail.com \
    --cc=greg@kroah.com \
    --cc=hc@mivu.no \
    --cc=lanslott.gish@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tejohnson@yahoo.com \
    --cc=vojtech@suse.cz \
    /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.