From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752118AbdBTT3n (ORCPT ); Mon, 20 Feb 2017 14:29:43 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45873 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbdBTT3k (ORCPT ); Mon, 20 Feb 2017 14:29:40 -0500 Date: Mon, 20 Feb 2017 20:29:33 +0100 From: Pavel Machek To: "H. Nikolaus Schaller" Cc: Dmitry Torokhov , Sebastian Reichel , Mark Rutland , =?iso-8859-1?Q?Beno=EEt?= Cousson , Tony Lindgren , Russell King , Arnd Bergmann , Michael Welling , Mika =?iso-8859-1?Q?Penttil=E4?= , Javier Martinez Canillas , Igor Grinberg , "Andrew F. Davis" , Mark Brown , Jonathan Cameron , Rob Herring , Alexander Stein , Eric Engestrom , Hans de Goede , Benjamin Tissoires , Petr Cvek , Mauro Carvalho Chehab , Hans Verkuil , Nick Dyer , Siebren Vroegindeweij , Michel Verlaan , linux-input@vger.kernel.org, devicetree , LKML , linux-omap , Discussions about the Letux Kernel , linux-iio@vger.kernel.org, kernel@pyra-handheld.com, Aaro Koskinen , Pali =?iso-8859-1?Q?Roh=E1r?= , Andrey Gelman , Haibo Chen Subject: Re: [PATCH v9 1/8] drivers:input:tsc2007: add new common binding names, pre-calibration, flipping and rotation Message-ID: <20170220192933.GA23745@amd> References: <20170219141715.GA7159@amd> <05F3816F-46E6-4BC2-9E2E-F20E645F7197@goldelico.com> <20170219171518.GA12833@amd> <20170219190547.GA17292@amd> <20170219205708.GA9641@amd> <6DF7B03A-8B63-422C-9561-69A34A7FBF35@goldelico.com> <20170219221930.GA1568@amd> <6610D852-4717-47A7-BFDE-52C8E9E614BB@goldelico.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <6610D852-4717-47A7-BFDE-52C8E9E614BB@goldelico.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > As long as it is small (I expect <1.01 =3D 1% error in scale) it is > barely noticeable. >=20 > Therefore, I asked before: how big in pixels is your finger or stylus? > Does this effect matter? If I draw a line in gimp, I don't expect it to have steps because of "barely noticeable" errors. > A resistive touch is a man-machine-interface where people press buttons o= f at > least 12x12 pixels size (or they are no longer visually recognizable). Resistive touch is used for drawing, too. =20 > So the discussion boils down to "what gives the better usability?": > a) getting rid of the nasty user-space calibration step (and plethora of = different tools) > b) getting highest theoretical precision which has a low practical releva= nce >=20 > I am in favor of a). Like most users we ask. A minority is in favor of b). > Since we don't exclude b) users from reconfiguring their system to get it= done > as they like. I think this is the best we can achieve. Do you even read what I wrote? Because I presented way to have both a) _and_ b). > >>> No. You have to design interface such that they _can_ be improved, and > >>> what you propose does not work that way. > >>=20 > >> It works. Please do real world tests... > >=20 > > You do a real world test on N900, and propose upgrade path. >=20 > I have no N900 running. But since it uses a tsc2004/5 controller which se= ems > to be quite similar, you can likely copy&paste some code or add the algor= ithm: >=20 > ABS_X =3D (touchscreen-size-x * (adc_x - adc_min_x)) / (adc_max_x - adc_m= in_x) >=20 > Thats it. >=20 > If you set touchscreen-size-x =3D (adc_max_x - adc_min_x) you get maximum= precision > you can achieve with integer arithmetic. And if you set adc_min_x =3D 0 y= our > user-space gets what it would have got before adding such a formula and t= hen you > can and must do calibration there. >=20 > Taking this as the defaults if none of the new properties is specified, m= akes > the scaling feature completely disappear. And I don't care about 2 additi= onal > subtractions, one multiplication and one division per axis. >=20 > So the upgrade path is: > 1. introduce new optional properties, parse and store them in the struct > 2. set defaults for the optional properties as described above > 3. add the formula to the code (1 line for each axis) > 4. deploy - nobody will notice Good so far. > 5. update the DT and remove user-space calibration - people will be happy > that they do not have to calibrate first any more You can't do this. And this is fatal problem with your proposal. If I update the DT in the kernel, my users will be very unhappy, because their screens will now be miscalibrated. New kernel must not force users to update their userland at the same time. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlirQ50ACgkQMOfwapXb+vIxkgCbBxSCXYcHQU2dmf+rOXH1IXtb qSEAn1/Mx6g3aCnFQoiupB5xJ/yrCLxP =uePT -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY--