From patchwork Wed Jun 8 14:56:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chih-Wei Huang X-Patchwork-Id: 861632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p58I6rx6010696 for ; Wed, 8 Jun 2011 18:07:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532Ab1FHO4b (ORCPT ); Wed, 8 Jun 2011 10:56:31 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:38539 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487Ab1FHO4b (ORCPT ); Wed, 8 Jun 2011 10:56:31 -0400 Received: by ywe9 with SMTP id 9so210024ywe.19 for ; Wed, 08 Jun 2011 07:56:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.109.170 with SMTP id s30mr2766618yhg.338.1307544989344; Wed, 08 Jun 2011 07:56:29 -0700 (PDT) Received: by 10.146.84.11 with HTTP; Wed, 8 Jun 2011 07:56:29 -0700 (PDT) X-Originating-IP: [220.135.64.168] In-Reply-To: <20110608125758.GA2465@nautilus.holoscopio.com> References: <20110602144146.GB3508@nautilus.holoscopio.com> <20110603124428.GA2379@nautilus.holoscopio.com> <20110608125758.GA2465@nautilus.holoscopio.com> Date: Wed, 8 Jun 2011 22:56:29 +0800 Message-ID: Subject: Re: ET1602 Touchscreen doesn't work From: Chih-Wei Huang To: Thadeu Lima de Souza Cascardo Cc: Benjamin Tissoires , Jiri Kosina , linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 08 Jun 2011 18:07:23 +0000 (UTC) Thanks, Benjamin and Cascardo. 2011/6/8 Thadeu Lima de Souza Cascardo : > Thanks, Benjamin. That clarifies a lot and points what the real fix > should be for this device. > Chih-Wei, could you send us the results of your tests? I don't have the > device available right now. I could get it next week, perhaps, if my > client still gets it. I'm glad to do so. But what test results did you want me to show exactly? Let me clarify my situation: * Device under test: ASUS ET1602, touchscreen id (1bfd:1688). * Kernel: 2.6.38, with android patches (from Google) * Android version: 2.2.2 (froyo) By the previous observation from getevent, I added the following patch to android framework: } Then the touch device (event7) is correctly recognized by the android framework and works fine. Without this patch, event7 is ignored and only event6 is detected, but no touch event generated from it. Let me know if you need more details. I'll try Benjamin's suggestion tomorrow. Regards, diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index 0e11823..6ef9da1 100755 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -670,7 +671,7 @@ int EventHub::open_device(const char *deviceName) device->classes |= CLASS_TOUCHSCREEN | CLASS_TOUCHSCREEN_MT; // Is this an old style single-touch driver? - } else if (test_bit(BTN_TOUCH, key_bitmask) + } else if ((test_bit(BTN_TOUCH, key_bitmask) || test_bit(BTN_MOUSE, key_bitmask)) && test_bit(ABS_X, abs_bitmask) && test_bit(ABS_Y, abs_bitmask)) { device->classes |= CLASS_TOUCHSCREEN;