Received: by 10.213.65.68 with SMTP id h4csp538339imn; Sat, 17 Mar 2018 13:43:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELuefp64oUkaqNqBQ1z61NJ8C4Yxc/P6vEqjF8dSBj5IFx6DiG/JdNCKIYwuCUOW2l1vYzb7 X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr6775574pld.210.1521319417371; Sat, 17 Mar 2018 13:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521319417; cv=none; d=google.com; s=arc-20160816; b=deQKcHKau5xdobGPC47xqQCzUhLLVO0n7wU2RoE9c7Dn9ClPjR4xqMvXagINy3g4+0 6e0+zmvzLhck9wU81cVFmBjU8QglmP2FtnLCLrLBKs0m1aH303n9jh5b+7FdA87z7g5b GqRg63WXUdhrOU8Y7kZMjIRAC95oKEcIr1UYCa2QD3HIyo3YNF1WvfFdt4gQjfJjRWx4 VHpIVf/xPwwCn23cC65MTymZLeOjf1HTWKI8Co6cK0h8ngGYti6N+TZoiGMbQoSRnjm/ LZgx8hZCUcuizW5SriQM95xhPQvqMKaiamo7syAKH5PQpwn+m4Qn9QR9BtBcq7u+FlUC r9IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fbUPuDpUDKp431hCTU2Q5CC3HoA+UOUjBMbJhzr//yw=; b=gI59RU9fJ8RW5VLdGjGiDusf+xzK3ntxRuFZ/S9rw6sEzSEWLsZLDx+3qaDSov5tIf Vt6sAiEHwOz+d1xA6DCyTRVyCXoxjZ+7X4Zq6fmUIjXQZiMxnF23r21Kv+9jZa0cTkWG 8SoWKraN+MO3TTF2avcyJ83vv9XxEv8Fk+G/mztFEXrTbPtsSFGtdgBFvUTtkwKjMuEn tSfV0uwU5ZNFCrrDx1GbSqSKr8UtSYaVWxH3UliKifZVVldoaqYEUIgcuJmxKHRxM9hT vLulBwy/jWz/F/VWVNq8Vd5SRn9mu9La8n72OMDF1hFOdASjWZpvQHIuZargcZqHZ+ay ainQ== 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 y73-v6si1404405plh.393.2018.03.17.13.43.23; Sat, 17 Mar 2018 13:43:37 -0700 (PDT) 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 S1752591AbeCQUma (ORCPT + 99 others); Sat, 17 Mar 2018 16:42:30 -0400 Received: from avasout06.plus.net ([212.159.14.18]:49500 "EHLO avasout06.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbeCQUm0 (ORCPT ); Sat, 17 Mar 2018 16:42:26 -0400 Received: from hairyalien ([80.229.148.18]) by smtp with SMTP id xIekeyuway3jixIeleTBRm; Sat, 17 Mar 2018 20:42:24 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=fL8XI6Se c=1 sm=1 tr=0 a=o7Djd4SkmPXITDn8qH+ssQ==:117 a=o7Djd4SkmPXITDn8qH+ssQ==:17 a=kj9zAlcOel0A:10 a=v2DPQv5-lfwA:10 a=3Jcvt-MjSSlznhQHo1oA:9 a=CjuIK1q_8ugA:10 Received: by hairyalien (sSMTP sendmail emulation); Sat, 17 Mar 2018 20:42:22 +0000 Date: Sat, 17 Mar 2018 20:42:22 +0000 From: Nick Dyer To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Benson Leung , Olof Johansson , linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/14] Input: atmel_mxt_ts - do not pass suspend mode in platform data Message-ID: <20180317204222.th54qyuajgam7iek@hairyalien> References: <20180312190907.174301-1-dmitry.torokhov@gmail.com> <20180312190907.174301-2-dmitry.torokhov@gmail.com> <20180314205123.GA26353@lava.h.shmanahar.org> <20180315235621.GA60361@dtor-ws> <20180316204002.GA24333@bm.shmanahar.org> <20180317174240.GC183240@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180317174240.GC183240@dtor-ws> User-Agent: NeoMutt/20170609 (1.8.3) X-CMAE-Envelope: MS4wfPlBT0LDdb+3CCCmvlgs0+ZyK0+YoN30TusnsB8EU0Z+Ctnd+FDo1G8PH4PhhUYpnwIyl757iWYtdkUKKb822cP19Mw0D9zCCszX0VrVGLiusWCirq8p U2N0+FdR6COqxCsK+6/b3kcVcm0M1k5/p1M= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 17, 2018 at 10:42:40AM -0700, Dmitry Torokhov wrote: > On Fri, Mar 16, 2018 at 08:40:02PM +0000, Nick Dyer wrote: > > On Thu, Mar 15, 2018 at 04:56:21PM -0700, Dmitry Torokhov wrote: > > > Ah, OK, I see. I would really like to drop this > > > pdata->suspend_mode stuff and I do not want to create > > > "pixel-screwed-up" property either... I guess for the time being > > > I'll put a DMI quirk for Link to restore T9 control method, and > > > then look into cleaning it all up. We have quite a bit different > > > code in chromeos kernel trees and I'd like to reconcile > > > it. > > > > Yes, it would be great to get rid of it. The driver does have the > > ability to download configuration via the firmware loader interface. > > So you would be able to grab a copy of the config by saving it with > > mxt-app, tweak it to ensure that the T9 CTRL byte is set correctly, > > then ship it somehow (presumably it could be added to > > linux-firmware). This would override what's currently stored in > > NVRAM on all those units and mean we could remove the T9_CTRL stuff. > > We can't really rely on people fetching updated config. Do you think we > could see if the device has only T9 and not T100 and if coming out of > suspend the T9 CTRL byte is 0 we overwrite it with the 0x83? I think that all we need to do is add something to mxt_read_t9_resolution (and probably rename it to mxt_init_t9_config) that reads the 1st (CTRL) byte, and if it's zero, writes 0x83 (and probably a dev_dbg() wouldn't go amiss) Also call the same logic on reset (look for "Detect reset"), because that wipes out the config. Once we've done that, we can get rid of the MXT_SUSPEND_T9_CTRL and use the normal T7 power up/down logic for suspend/resume on all devices. FWIW there may be two instances of T9, but I've never seen a device that actually had two screens and it's not supported really anyway with this driver. N