From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A48FBCA9ED3 for ; Mon, 4 Nov 2019 09:24:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8524720842 for ; Mon, 4 Nov 2019 09:24:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728106AbfKDJYO (ORCPT ); Mon, 4 Nov 2019 04:24:14 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:47573 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727322AbfKDJYO (ORCPT ); Mon, 4 Nov 2019 04:24:14 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4766n63ZTJz1rfM7; Mon, 4 Nov 2019 10:24:10 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4766n635jhz1qqkT; Mon, 4 Nov 2019 10:24:10 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id lWokg1vpsxzD; Mon, 4 Nov 2019 10:24:09 +0100 (CET) X-Auth-Info: 6SEblH5duY4H5FnCc2Lxk/wUoobqaES8TSy+g3b5acc= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 4 Nov 2019 10:24:09 +0100 (CET) Subject: Re: [PATCH 2/2] Input: ili210x - add ILI2117 support To: Dmitry Torokhov , Sven Van Asbroeck Cc: Adam Ford , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190302141704.32547-1-marex@denx.de> <20191101204801.16328-1-TheSven73@gmail.com> <20191104070116.GM57214@dtor-ws> From: Marek Vasut Message-ID: Date: Mon, 4 Nov 2019 10:13:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191104070116.GM57214@dtor-ws> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/4/19 8:01 AM, Dmitry Torokhov wrote: > Hi Sven, > > On Fri, Nov 01, 2019 at 04:48:01PM -0400, Sven Van Asbroeck wrote: >> Dmitry / Marek, >> >> There have been two attempts to add ILI2117 touch controller support. >> I was about to add a third, but luckily I checked the mailing list >> before writing any code :) >> >> Adding this support would clearly be beneficial for the common good. >> What can we do to get this in motion again? >> >> Last time I checked, Marek posted a patch which added the 2117, but Dmitry >> objected, because the code became too unwieldy. Dmitry then posted a cleanup >> patch, which did not work for Marek. So everything came to a halt. >> See: >> https://patchwork.kernel.org/patch/10836651/ >> https://www.spinics.net/lists/linux-input/msg62670.html >> >> Dmitry, would you perhaps be willing to accept Marek's patch, and perform the >> cleanup later? >> >> Marek, would you perhaps be willing to invest some time to debug Dmitry's >> cleanup patch? >> >> On my end, I've reviewed Dmitry's patch and it looks mostly ok. I saw one >> difference with ILI210X which could explain Marek's results, but I can't be >> sure - because I could not locate the 210X's register layout on the web. >> >> In Dmitry's patch, we see: >> >> touch = ili210x_report_events(priv, touchdata); >> if (touch || chip->continue_polling(touchdata)) >> schedule_delayed_work(&priv->dwork, >> msecs_to_jiffies(priv->poll_period)); >> >> but this is not exactly equivalent to the original. Because in the original, >> the 210X's decision to kick off delayed work is completely independent of >> the value of touch. > > No, it is not independent really. Bits 0 and 1 in the first byte > correspond to touches with first and 2nd finger, so checking for touch > in addition to 0xf3 mask is not incorrect. > > Can you please tell me what device you have? Do the patches work for > you? > > Marek, sorry for letting the patches linger. Can you please tell me what > touch controller did you test with that failed for you? See Message-ID <20190917032842.GL237523@dtor-ws> . I tested the ILI2117 with these two patches and it works. With the additional two patches from you on top, it failed, unless I reverted: Input: ili210x - define and use chip operations structure > I think I see at > least one issue in ili251x_read_touch_data() - the check whether we > should read the second part of the packet should check if data[0] == 2, > not 0. But that's not a problem of this particular patch, so maybe this patch can finally be applied and then we can debug the subsequent patches ?