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=-8.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 50159C2BA1A for ; Sun, 26 Apr 2020 05:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20B4E2070A for ; Sun, 26 Apr 2020 05:21:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HeBXVGsG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726108AbgDZFVN (ORCPT ); Sun, 26 Apr 2020 01:21:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbgDZFVM (ORCPT ); Sun, 26 Apr 2020 01:21:12 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34C8CC061A0C; Sat, 25 Apr 2020 22:21:11 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id f11so9486470ljp.1; Sat, 25 Apr 2020 22:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zP7niTtzeJGKIv5s1G7Pa9omvsdhZPwjcaRy9li5ChA=; b=HeBXVGsGwmxmfLl4Bllc669KN5N3xeVaFgWVjdPiqYWFa9XrTqBFrkpyk65QKeYjou qSwVvgi6xGJzItYagGSNgSYV6l2D8Z8GPlLVYleMwczQtJWa2Q5RSQkaeoiGlWEkpFs8 gQyRGyl8xIwIV0wnbyrSkPh2pJouGrve0sVXZl6ubAaZODQ1QBYdyotCqTh4iLs2ULNi LRx3JUMU31ezN1ToZNBSvuALuPPoDNO40O+Q8/YknxeaAoXtWvpjqWTcPRKzFCTliTTY TD7MkBePxVXWbHMlzp5CjHv4EqO/k+JdnCAnQn7llMK89Og6PMWKcT4bSsD7W61dV56r hQVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zP7niTtzeJGKIv5s1G7Pa9omvsdhZPwjcaRy9li5ChA=; b=EEvE25N0ezG0NEuTq+FPZJ+pdkeXUVjtPu9iKw55QbV7KxiYDvJmNPQgV6jzVPnVq/ 4FeLyWFrcgbUgMv5TpwrNpHikZsyFM2TTB3YmkUIU65dMnEkIzRk4t6hmn10f2V2LlLb Nqj9JwmqnDSixpNM2nFXxWwWSxb4U0bThESOpgw3qDTd9YRxGyQsCSgiZnr1NvvDMKvK in5obPUuX0/R/tA5ZxtSk4wYkmotWnlDGRpq5VChjVelyvZir/6nkYYKI/d5Kasj337X +iJJpzyqWSb/Dzt25o3gZtnDpjWjHAf6D2YRkGfUk2c0fIlhfmW0cNkwNlB6oLt+O4QR F8aw== X-Gm-Message-State: AGi0PuY0FWHBCFajtC5D0PzVhPHx0r8T9bQ/CF4oT/oJ/yLLQDdMwANu Tf5Cyu8rLt7qYefpwUCNfjtK+87/ X-Google-Smtp-Source: APiQypICQSLBRYsThN7tnhA1wR2mO6hNSAvM7vRQlT0Jl/bWCqRhREBIaEaKVxRedtObPWxZwGvVJQ== X-Received: by 2002:a2e:8689:: with SMTP id l9mr10699402lji.193.1587878469301; Sat, 25 Apr 2020 22:21:09 -0700 (PDT) Received: from [192.168.2.145] (ppp91-78-208-152.pppoe.mtu-net.ru. [91.78.208.152]) by smtp.googlemail.com with ESMTPSA id m15sm2216471lji.21.2020.04.25.22.21.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Apr 2020 22:21:08 -0700 (PDT) Subject: Re: [PATCH v3 7/9] input: elants: support 0x66 reply opcode for reporting touches To: Dmitry Torokhov , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Henrik Rydberg , James Chen , Johnny Chuang , Rob Herring , Scott Liu , David Heidelberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200426051503.GS125362@dtor-ws> From: Dmitry Osipenko Message-ID: Date: Sun, 26 Apr 2020 08:21:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200426051503.GS125362@dtor-ws> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 26.04.2020 08:15, Dmitry Torokhov пишет: > On Mon, Apr 13, 2020 at 03:32:26PM +0200, Michał Mirosław wrote: >> From: Dmitry Osipenko >> >> eKTF3624 touchscreen firmware uses two variants of the reply opcodes for >> reporting touch events: one is 0x63 (used by older firmware) and other is >> 0x66 (used by newer firmware). The 0x66 variant is equal to 0x63 of >> eKTH3500, while 0x63 needs small adjustment of the touch pressure value. >> >> Nexus 7 tablet device has eKTF3624 touchscreen and it uses 0x66 opcode for >> reporting touch events, let's support it now. Other devices, eg. ASUS TF300T, >> use 0x63. >> >> Note: CMD_HEADER_REK is used for replying to calibration requests, it has >> the same 0x66 opcode number which eKTF3624 uses for reporting touches. >> The calibration replies are handled separately from the the rest of the >> commands in the driver by entering into ELAN_WAIT_RECALIBRATION state >> and thus this change shouldn't change the old behavior. >> >> Signed-off-by: Dmitry Osipenko >> Tested-by: Michał Mirosław >> Signed-off-by: Michał Mirosław >> --- >> drivers/input/touchscreen/elants_i2c.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c >> index 2b936e920874..9751139e8507 100644 >> --- a/drivers/input/touchscreen/elants_i2c.c >> +++ b/drivers/input/touchscreen/elants_i2c.c >> @@ -60,6 +60,15 @@ >> #define QUEUE_HEADER_NORMAL 0X63 >> #define QUEUE_HEADER_WAIT 0x64 >> >> +/* >> + * Depending on firmware version, eKTF3624 touchscreens may utilize one of >> + * these opcodes for the touch events: 0x63 and 0x66. The 0x63 is used by >> + * older firmware version and differs from 0x66 such that touch pressure >> + * value needs to be adjusted. > > Who is responsible for the adjustment? Where does it happen? Please see the patch #2 ("support old touch report format") which adds support for parsing of the older packet format that requires the pressure value adjustment.