Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754516AbbGUMSr (ORCPT ); Tue, 21 Jul 2015 08:18:47 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:32744 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464AbbGUMSp (ORCPT ); Tue, 21 Jul 2015 08:18:45 -0400 X-ME-Helo: nestor.ysoft.org X-ME-Auth: eWFubi5jYW50aW4yQHdhbmFkb28uZnI= X-ME-Date: Tue, 21 Jul 2015 14:18:43 +0200 X-ME-IP: 86.201.141.183 Message-ID: <55AE389F.9060409@laposte.net> Date: Tue, 21 Jul 2015 14:18:39 +0200 From: Yann Cantin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Greg KH CC: linux-input@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, dmitry.torokhov@gmail.com, jkosina@suse.cz Subject: Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver References: <1437426199-29866-1-git-send-email-yann.cantin@laposte.net> <1437426199-29866-3-git-send-email-yann.cantin@laposte.net> <20150720215956.GA21796@kroah.com> In-Reply-To: <20150720215956.GA21796@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2223 Lines: 64 Hi, Le 20/07/2015 23:59, Greg KH a ?crit : > On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: >> diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam >> +++ b/Documentation/ABI/testing/sysfs-driver-ebeam >> @@ -0,0 +1,53 @@ >> +What: /sys/class/input/inputXX/device/min_x >> + /sys/class/input/inputXX/device/min_y >> + /sys/class/input/inputXX/device/max_x >> + /sys/class/input/inputXX/device/max_y >> +What: /sys/class/input/inputXX/device/h[1..9] >> +What: /sys/class/input/inputXX/device/calibrated > > > What tool(s) use these sysfs files? Don't we already have "normal" > events for these types of things such that we don't have to make up new > sysfs files for these? The ebeam_calibrator tool is there : http://ebeam.tuxfamily.org. I agree this can be a problem : this driver is totally useless without a userspace dedicated calibration tool. By nature these device's coordinate system can't be mapped to screen via trivial transformations, such as scaling, flipping and rotating, hence the special calibration and mapping procedures. I choose to use an homography transformation as it is more robust and faster than linear interpolation in this case. And anyway, it requires 9 calibration data and xy range parameters. I haven't found any existing tools performing that : xinput_calibrator (witch ebeam_calibrator is based on) and other touchscreen calibration tools can't do much more than trivial transformations. >> +static DEVICE_ATTR(MM, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP, \ >> + ebeam_##MM##_get, \ >> + ebeam_##MM##_set) > > DEVICE_ATTR_RW()? Ok, will do. >> + /* sysfs setup */ >> + err = sysfs_create_group(&intf->dev.kobj, &ebeam_attr_group); > > Ick, you just added the sysfs files to the USB device, not your input > device, are you sure you tested this? Yes, "run fine since 3.3.6, both x86_32 and 64.". thanks, -- Yann Cantin A4FEB47F -- -- 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/