Received: by 10.223.176.5 with SMTP id f5csp2361402wra; Mon, 5 Feb 2018 02:47:23 -0800 (PST) X-Google-Smtp-Source: AH8x225G4UCOkyrhQPLs3q07qVxAv5uWX8OJu1JoX0kowAO4wPzjSGGKXau713FwKBW51y4rOsf4 X-Received: by 2002:a17:902:33c1:: with SMTP id b59-v6mr34917811plc.111.1517827643182; Mon, 05 Feb 2018 02:47:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517827643; cv=none; d=google.com; s=arc-20160816; b=0K/AYk5ZID9EL7xda85patAnfd9PhjIn5kiSqaNSECmmn766THP1TWrugB/LuqHjNX eoxAER93wfodhLRcGQmK89RgSZGr48wXVSzUjbaLDx4glHwsQU62aZ6V3MfTVGF++g+B ISWelBmu51g93oEGG808PsVaYnu2RFqEB40xhJWl7Y4YeY31GAzum0ZwDBIVi6fKmdUU lkmqCHFRHeBUmYsOhYwksHIleQ5NthAL1ibEVZb90i5U4SK1Dpm94VxsmQ0r+oEqBMch 0eZhXXXklD223l/H3FrFjAy0KIwM5cBTIF55NJILYCvM19dPrpxaVvrfGVLTBt9Qmdx8 fBPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=T2t4iOeecr4rplvh0IRWl/1vjCExgOvkLXSimzdNUDI=; b=CEE606AWyELLxKk9fyq6fIx4hGQwHrBR+C3Al74bQvA6ax/bgWCN8KO0z2jeKEYi0A q7ZSWHXceRHYEmN7vD5sQ2y/AfgwMvQ+tdKV6LP4sldaxXowF/bJcHs5EtNfR3vOVrk6 Y5WR1bh+VhDE62lr88o1rvLmEYcfLxzuZ6wQubGpk+QOHKqfNxqA5fhjdxyjUl/+COVv J6RD4dAIZWQ0QpXue1a292fpZG2f1sZNmrSDox5mwGvJj7EX4CEuLVMhizzSDZWSXK0S Nvpn4X9lIE8xptkT05xRlJ49xr2kGmPMuq1hdOU8dHeaOCQ1+sXgjO7kROnYSoPpU77l dhgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u198si3544478pgc.784.2018.02.05.02.47.08; Mon, 05 Feb 2018 02:47:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752766AbeBEKqI convert rfc822-to-8bit (ORCPT + 99 others); Mon, 5 Feb 2018 05:46:08 -0500 Received: from mx-ginzinger.sigmacloud.services ([185.154.235.147]:36117 "EHLO mx-ginzinger.sigmacloud.services" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbeBEKqB (ORCPT ); Mon, 5 Feb 2018 05:46:01 -0500 X-Greylist: delayed 340 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Feb 2018 05:46:01 EST Received: from [31.193.165.228] (port=56905 helo=mx-ginzinger.sigmacloud.services) by mx-ginzinger.sigmacloud.services with esmtps (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1eieC3-0000PV-2C; Mon, 05 Feb 2018 11:40:11 +0100 Received: from [10.10.1.120] (10.10.1.120) by exc1.buero.ginzinger.com (10.1.1.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1034.26; Mon, 5 Feb 2018 11:40:11 +0100 X-CTCH-RefID: str=0001.0A0B0204.5A78348B.0174:SCFSTAT16437741,ss=1,re=-4.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Subject: Re: [PATCH 1/2] input: touchscreen: ar1021_i2c: enable touch mode during open To: Christian Gmeiner CC: Dmitry Torokhov , linux-input , LKML References: <1493295756-17812-1-git-send-email-martin.kepplinger@ginzinger.com> From: Martin Kepplinger Message-ID: <5bfec26e-b09c-2fa0-4eb0-3f9a08d293ed@ginzinger.com> Date: Mon, 5 Feb 2018 11:40:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.10.1.120] X-ClientProxiedBy: exc1.buero.ginzinger.com (10.1.1.204) To exc1.buero.ginzinger.com (10.1.1.204) X-EXCLAIMER-MD-CONFIG: 9dd172f7-de2e-4231-b886-ec11f46e03b3 X-EXCLAIMER-MD-BIFURCATION-INSTANCE: 0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org  Martin Kepplinger | Entwicklung Software  GINZINGER ELECTRONIC SYSTEMS GMBH Tel.: +43 7723 5422 157 Mail: martin.kepplinger@ginzinger.com Web: www.ginzinger.com On 2018-02-05 11:07, Christian Gmeiner wrote: > Hi all. > > 2017-04-27 14:22 GMT+02:00 Martin Kepplinger : >> The device could as well be in command mode, in which this driver cannot >> handle the device. When opening the device, let's make sure the device >> will be in the mode we expect it to be for this driver. >> > > I run into issues caused by this change. It turns out that the device > is non-functional > after some warm-reboots and as a result I am not able to use xorg's > evdev driver. > So I have some questions about this change: > > * Should we enable irq before calling i2c_master_send(..) as the chip raises an > irq if the command was processed? > > * Would it be enough to send this command only once during driver > lifetime? I can > see that on my system open gets called 3 times during boot-up. It would. See below for my thought on this change. > > * What are the circumstances the touch device would be in an other state? In the > official kernel driver the userspace can send commands via sysfs. > Also the driver > does set the touch enable mode as this patch does. I did this change as the device was once non-functional unexpectedly because it wasn't in touch mode. We can set touch mode during open() or probe() but I figured during open() would keep the driver working even when others would use the device in command mode. Does your problem go away when you revert this change or put it into probe()? martin ________________________________________ Ginzinger electronic systems GmbH Gewerbegebiet Pirath 16 4952 Weng im Innkreis www.ginzinger.com Firmenbuchnummer: FN 364958d Firmenbuchgericht: Ried im Innkreis UID-Nr.: ATU66521089