Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1323874pxu; Sat, 12 Dec 2020 09:01:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrEA4ZmA+7OvFkmu0fc88EFyjQ7cLQWjp4X5IHLzxUKB9ybDtH7mfIsEKJdGJ4ZHzTI+vc X-Received: by 2002:a05:6402:1421:: with SMTP id c1mr17525174edx.247.1607792462256; Sat, 12 Dec 2020 09:01:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607792462; cv=none; d=google.com; s=arc-20160816; b=R4QSVvmiec98Ox6pSRqWx8iJ0abtVGoGxGhGmqkM+Ryu+qAh5/bnHf8+/Tggj5qltn TT8AqzAgCli/BVs2ygcNOgGYxCtCBwE/+quPwMZt2kEPbI52W24O0CpgEeu4yXq9Bu07 S7ITugqDG0l30QZXkUFqT5nUGRoPcJiUM1jO8x5ldTfPG7N+Q+h6ESvK8WVA3BaY/Apl QHnpDFTI5ytaaB5vYFUJ46amlTDkAabx1+BdeiMdtDgBEnyjfrFFRTtIPBbQ7udbJoBM FbaFEDDvDd5kNgO2ciezhjmbXk01D39axuvBPMdXj7p0yhnbCug0aU2jZsnUyu38TQkB 9zhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P+pQqwFmWnoVuZ+vnwr1bjFcODtNnwcmc/REju0zDOs=; b=dcXuLYOo202I83q0W5yl8JKbG/4WGzsv+uKfmahCm+GgA9e3psO6giPH6SE3HW8Y6i ZjfSD4tvyc913aOshe0Ahfqy4AlDqZB4C8aI8UGPeS53/HG+kqdkI0GwVo1HJGkYaePH 2C7XnZcf8w8jrdx+hbGQZKMWEhMo2xXc1aj0lpD7oOIFFiafIbRxJGgTm5XXfO162/Iq z+NJvI+7MrUS8rqT0WugMn37v18ltEMQUPXrOxJy4sJjxHl71WSaLzt0Oqzj4GXjpPS4 7hNbGg8UXmGtZKSPhkjeSw8EhjAuHWj42vh+2U0LILwNLgSVQkhpWdHDkT3mqJNyA8hb Pc+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qL7sDfDZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si7398628ejj.700.2020.12.12.09.00.38; Sat, 12 Dec 2020 09:01:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qL7sDfDZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437155AbgLKSua (ORCPT + 99 others); Fri, 11 Dec 2020 13:50:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406393AbgLKStS (ORCPT ); Fri, 11 Dec 2020 13:49:18 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C18C0611E4; Fri, 11 Dec 2020 10:48:59 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id w5so6957655pgj.3; Fri, 11 Dec 2020 10:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=P+pQqwFmWnoVuZ+vnwr1bjFcODtNnwcmc/REju0zDOs=; b=qL7sDfDZObPo9d9OTyM/2vWZ1ZQlOtVvaRjdzgztuxWk1u05JHsbxaoyI0xzb36WSN 2+LdzTJR1rcbxYKVZ0mskbo7VkCg45cc+p4sW4vTnBCU2xk9XB3ZEUCFiZtBqD/TdhM9 sA8wfe2JpSJbNuUkfhb/mhkqMqHqk5K1fGOgU8RpyAP/xfgrK/Jf7mq1XUpp4aPFPgFT r/eaPQDGgqmSrA+VHrQlGNz1mon3hdnuJKzpM3Yvqh/99+BaPdjFsGcTJHrrik4f47WQ aU5iUc5pPQKN85Cgs9ZlFJS3Mb7ewC8WeJek1JnJQZtbx/wXGzrqdU/rCfOWdO2swJMm BrEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=P+pQqwFmWnoVuZ+vnwr1bjFcODtNnwcmc/REju0zDOs=; b=HR3fqq/Dqyo9Dw9nyCQzz7D6bjTepnsjwlJVcJcAnk0h6E/iw7bVuxh9JUoKaeeIwZ MuPsfK4mP5f1OfWR7bMXgJx2vrRi5tuDRNHmflsLMmjaRPi6/e9wuc42dw3qK5jYRWhI VDEb5TnINAM07I11XIx7QUyNj3hwqxNgry7W0rDYOmJJ26reaFMYcuF88Z/CF/mnc2Sq hfHfdBvo5n6p2H3i3QMohfSCx6MjQ91MIGyhJ58ojJ8C0anTf88Mc0n60YFLiPOGbjFZ n+oNotmly0S2HRxDpUGd6G/r1Fpr789TPtD/+hUrzpwPRLc7DdIaLAUrJXEOgzfFgq4J nJmg== X-Gm-Message-State: AOAM533Qc+hesUB/4c+t2TXTzDoMfqy0IkNzDNGqvb+Z3H13Mi+43tWw d3njZ93vMiniu0Jg7udgq8w= X-Received: by 2002:a63:c944:: with SMTP id y4mr13068986pgg.435.1607712539175; Fri, 11 Dec 2020 10:48:59 -0800 (PST) Received: from google.com ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id f64sm11566939pfb.146.2020.12.11.10.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 10:48:57 -0800 (PST) Date: Fri, 11 Dec 2020 10:48:55 -0800 From: Dmitry Torokhov To: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Dmitry Osipenko , Johnny Chuang , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v8 2/4] input: elants: support old touch report format Message-ID: References: <20201211160917.GA23095@qmqm.qmqm.pl> <3d872d19-a0b2-ed83-4b08-5c9a4755c2fe@gmail.com> <20201211170401.GA31605@qmqm.qmqm.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201211170401.GA31605@qmqm.qmqm.pl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 06:04:01PM +0100, Michał Mirosław wrote: > On Fri, Dec 11, 2020 at 07:39:33PM +0300, Dmitry Osipenko wrote: > > 11.12.2020 19:09, Michał Mirosław пишет: > > > On Thu, Dec 10, 2020 at 11:29:40PM -0800, Dmitry Torokhov wrote: > > >> Hi Michał, > > >> On Fri, Dec 11, 2020 at 07:53:56AM +0100, Michał Mirosław wrote: > > >>> @@ -998,17 +1011,18 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev) > > >>> } > > >>> > > >>> report_len = ts->buf[FW_HDR_LENGTH] / report_count; > > >>> - if (report_len != PACKET_SIZE) { > > >>> + if (report_len != PACKET_SIZE && > > >>> + report_len != PACKET_SIZE_OLD) { > > >>> dev_err(&client->dev, > > >>> - "mismatching report length: %*ph\n", > > >>> + "unsupported report length: %*ph\n", > > >>> HEADER_SIZE, ts->buf); > > >> Do I understand this correctly that the old packets are only observed on > > >> EKTF3624? If so can we expand the check so that we only accept packets > > >> with "old" size when we know we are dealing with this device? > > > > > > We only have EKTF3624 and can't be sure there are no other chips needing this. > > > > In practice this older packet format should be seen only on 3624, but > > nevertheless we could make it more explicit by adding the extra chip_id > > checks. > > > > It won't be difficult to change it in the future if will be needed. > > > > I think the main point that Dmitry Torokhov conveys here is that we > > should minimize the possible impact on the current EKT3500 code since we > > don't have definitive answers regarding the firmware differences among > > the hardware variants. > > The only possible impact here is that older firmware instead of breaking > would suddenly work. Maybe we can accept such a risk? These are not controllers we'll randomly find in devices: Windows boxes use I2C HID, Chrome devices use "new" firmware, so that leaves random ARM where someone needs to consciously add proper compatible before the driver will engage with the controller. I would prefer we were conservative and not accept potentially invalid data. Thanks. -- Dmitry