From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752091AbdBTTmX (ORCPT ); Mon, 20 Feb 2017 14:42:23 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34799 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbdBTTmU (ORCPT ); Mon, 20 Feb 2017 14:42:20 -0500 From: Pali =?utf-8?q?Roh=C3=A1r?= To: "H. Nikolaus Schaller" Subject: Re: [PATCH v9 1/8] drivers:input:tsc2007: add new common binding names, pre-calibration, flipping and rotation Date: Mon, 20 Feb 2017 20:42:15 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-108-generic; KDE/4.14.2; x86_64; ; ) Cc: Dmitry Torokhov , Sebastian Reichel , Mark Rutland , =?utf-8?q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Russell King , Arnd Bergmann , Michael Welling , Mika =?utf-8?q?Penttil=C3=A4?= , 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@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, letux-kernel@openphoenux.org, linux-iio@vger.kernel.org, kernel@pyra-handheld.com, Aaro Koskinen , Pavel Machek , Andrey Gelman , Haibo Chen References: <20170220010714.GB8358@dtor-ws> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1527656.MuGuQcp6Iy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201702202042.15878@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart1527656.MuGuQcp6Iy Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Nikolaus! On Monday 20 February 2017 17:50:04 H. Nikolaus Schaller wrote: > Hi Dmitry, >=20 > > Input driver may set resolution for given axis in units per mm (or > > units per radian for rotational axis ABS_RX, ABS_RY, ABS_RZ), and > > if you check the binding, you can use "touchscreen-x-mm" and > > "touchscreen-y-mm" to specify the size of entire touch surface and > > set resolution from it so that userspace can calculate the proper > > scaling factor. >=20 > How is this information exposed by the kernel to user-space? By > scanning the DT file or tree? Set input_abs_set_res() from kernel. And in userspace call EVIOCGABS=20 ioctl() on input device. Look at struct input_absinfo, you should have=20 all needed information here. This is generic input interface, no DT is=20 needed. I hope that XServer is already using it for evdev devices... =46or whole implementation look at evtest program. That should be good=20 starting point for your userspace implementation. While I'm watching this discussion... in my opinion kernel should just=20 invert input axes (when needed) and should not do any other=20 normalization or integer/floating-point re-calibration/re-calculation.=20 If it correctly exports minimum value, maximum value and resolution then=20 userspace can correctly re-scale input events to units which userspace=20 needs (e.g. mapping into LCD screen pixels or whatever is needed). =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart1527656.MuGuQcp6Iy Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlirRpcACgkQi/DJPQPkQ1KlhgCfenWu7036G3+S4Lgzb8sRH8Lx MSUAoKqCFGY13UKTeJaV+BoqlA64pxS5 =MNFb -----END PGP SIGNATURE----- --nextPart1527656.MuGuQcp6Iy--