Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261397AbVCHQDi (ORCPT ); Tue, 8 Mar 2005 11:03:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261412AbVCHQDi (ORCPT ); Tue, 8 Mar 2005 11:03:38 -0500 Received: from vawad.err.no ([129.241.93.49]:65213 "EHLO vawad.err.no") by vger.kernel.org with ESMTP id S261397AbVCHQCI (ORCPT ); Tue, 8 Mar 2005 11:02:08 -0500 Subject: Re: [PATCH] new driver for ITM Touch touchscreen From: Hans-Christian Egtvedt To: linux-kernel@vger.kernel.org Cc: Vojtech Pavlik , linux-input@atrey.karlin.mff.cuni.cz In-Reply-To: References: <1109932223.5453.16.camel@charlie.itk.ntnu.no> <200503041403.37137.adobriyan@mail.ru> <1109953224.3069.39.camel@charlie.itk.ntnu.no> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-QKG+FsxALYS6A1WBd1Jk" Organization: MIVU Solutions DA Date: Tue, 08 Mar 2005 17:01:00 +0100 Message-Id: <1110297660.3198.15.camel@server.customer.mivu.no> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 18327 Lines: 288 --=-QKG+FsxALYS6A1WBd1Jk Content-Type: multipart/mixed; boundary="=-Jz6p1slE9LPPSo+Ehi4b" --=-Jz6p1slE9LPPSo+Ehi4b Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2005-03-04 at 11:54 -0500, Dmitry Torokhov wrote: > On Fri, 04 Mar 2005 17:20:24 +0100, Hans-Christian Egtvedt w= rote: > > On Fri, 2005-03-04 at 09:52 -0500, Dmitry Torokhov wrote: > > > On Fri, 4 Mar 2005 14:03:37 +0200, Alexey Dobriyan wrote: > > > > On Friday 04 March 2005 12:30, Hans-Christian Egtvedt wrote: > > > As far as the driver goes: > > > > > > - yes, it does need input_sync; > >=20 > > One problem with input_sync is that the panel get's too fast, and doubl= e > > click is experienced quite often, maybe some threshold is needed for lo= w > > values in Z-direction? > >=20 > > I'm probably doing something wrong here since I experience easy > > doubleclicks when I just lightly touch the screen. >=20 > Yes, I think you need to use some threshold when reporting BTN_TOUCH > event. Still, always report ABS_PRESSURE as is. This way the > touchscreen is useable via legacy interfaces (mousedev. tsdev) and if > a specialized userspace driver is written it still can get pretty much > unmangled data from /dev/input/eventX. This will also allow such > driver adjust touchpad sensitivity, if needed. Do you have any pointers to where I should go to implement this threshold? Is there an easy or smart way doing it? No, not physical sizes. I was wondering if soe touchscreens are > reporting let's say actual coordinates from 1100-3600 and others from > 600-3850, instead of full 0-4096. Is there a way to query the hardware > and find the actual min and max for a device so it can be reported to > userspace. I really don't think the controller can now anything about the size of the screen. I've attached version 1.2.1 of the driver, fixed some typo, code cleanup and discovered I used depricated functions so I moved to the new correct way of doing killing of the urb. Starting looking into ways of using the module directly as a standard mouse, that will take away loads of worries for me about converting X applications to x.org. Any tips are welcome. Is this done before with a touchscreen? --=20 Hans-Christian Egtvedt MIVU Solutions DA --=-Jz6p1slE9LPPSo+Ehi4b Content-Disposition: attachment; filename=itmtouch-1.2.1-linux-2.6.11.patch Content-Type: text/x-patch; name=itmtouch-1.2.1-linux-2.6.11.patch; charset=ISO-8859-1 Content-Transfer-Encoding: base64 LS0tIGtlcm5lbC1zb3VyY2UtMi42LjExL2RyaXZlcnMvdXNiL2lucHV0L0tjb25maWcJMjAwNC0x Mi0yNCAyMjozNToyMy4wMDAwMDAwMDAgKzAxMDANCisrKyBsaW51eC0yLjYuMTEvZHJpdmVycy91 c2IvaW5wdXQvS2NvbmZpZwkyMDA1LTAzLTAyIDEwOjU4OjQxLjAwMDAwMDAwMCArMDEwMA0KQEAg LTE5MCw2ICsxOTAsMTggQEANCiAJICBUbyBjb21waWxlIHRoaXMgZHJpdmVyIGFzIGEgbW9kdWxl LCBjaG9vc2UgTSBoZXJlOiB0aGUNCiAJICBtb2R1bGUgd2lsbCB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orCQkuZGlzY29ubmVjdCA9ICAgaXRtdG91Y2hfZGlzY29ubmVjdCwNCisJ CS5pZF90YWJsZSA9ICAgICBpdG10b3VjaF9pZHMsDQorfTsNCisNCitzdGF0aWMgaW50IF9faW5p dCBpdG10b3VjaF9pbml0KHZvaWQpDQorew0KKwlkYmcoIiVzIC0gY2FsbGVkIiwgX19GVU5DVElP Tl9fKTsNCisJaW5mbyhEUklWRVJfREVTQyAiICIgRFJJVkVSX1ZFUlNJT04pOw0KKwlpbmZvKERS SVZFUl9BVVRIT1IpOw0KKwlyZXR1cm4gdXNiX3JlZ2lzdGVyKCZpdG10b3VjaF9kcml2ZXIpOw0K K30NCisNCitzdGF0aWMgdm9pZCBfX2V4aXQgaXRtdG91Y2hfZXhpdCh2b2lkKQ0KK3sNCisJZGJn KCIlcyAtIGNhbGxlZCIsIF9fRlVOQ1RJT05fXyk7DQorCXVzYl9kZXJlZ2lzdGVyKCZpdG10b3Vj aF9kcml2ZXIpOw0KK30NCisNCittb2R1bGVfaW5pdChpdG10b3VjaF9pbml0KTsNCittb2R1bGVf ZXhpdChpdG10b3VjaF9leGl0KTsNCg== --=-Jz6p1slE9LPPSo+Ehi4b-- --=-QKG+FsxALYS6A1WBd1Jk Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBCLcw8LGKplK6pIwYRAn9RAJ9YVKWUOMEJ9q7b3UunPfqs9S94vwCfZXQ2 WmqLXDnXwlWQi/Kd/jUjuQs= =3l2m -----END PGP SIGNATURE----- --=-QKG+FsxALYS6A1WBd1Jk-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/