Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7529354rwd; Tue, 6 Jun 2023 12:05:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Wx820fKmFL1LKOlrpiIsk8xXXPDMtJxAV+4rhTfHuXbunONk1lenNlsZ4rsx+2ho3vNmc X-Received: by 2002:a17:90a:1a52:b0:256:2ef:92ec with SMTP id 18-20020a17090a1a5200b0025602ef92ecmr1585065pjl.1.1686078345315; Tue, 06 Jun 2023 12:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686078345; cv=none; d=google.com; s=arc-20160816; b=i+9FlbbGNqxV9GKfBxQ0GJbbyBYT94s+wBPj1ndN+Geva8ms1mzk+yMxLl7ViIiJ66 QM0WqEAa6h0L1zoMxriD6t+fd/lkMfPq2Tu/Gj2uEpFzqS72EftKndsKd3Q5GrZNjyfd TQMykj9D7f6M/Xzl6xZH+/o9BIDzZj+hMmYYb9V3XZG3MnUJVwl2ZAlGoqboO0aiNpRY VlKNFnmnzJoRVFYmAIt3A5/AlqJ+S1/f+OtF7cwSJ91YG133CDt2eDO5FCZAh0l373Vm DojsfzS8bHNsTOoKFKo1qZq2uGCTJTUbiaTpPSKOgs5AbpT2NK6llxHM+hBjaNNJdrlx mVVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:references:cc:to:content-language:reply-to:from :user-agent:mime-version:date:message-id:dkim-signature; bh=WF84323liifZi1X4RPGsffn6FGJtYs7l55Hl/A+Mj44=; b=o3gVq6sW8CWezXMQcpxer5jeXYBEUzpAKXDtVHirOTRIVbVyxEu4gSSwSUpVQhxiHq Ov8lVXsj2dAvhC+qNxtr4LyCEFR7Ia12C6sg1ke3N3j0t/uTx1f8GOBmwB0UcfQ6+ynd ieyDYpkDuRnMJjBHm4Y73mJUmigedNROjd7Her/tKQpIJYCR+ClBiC+RCr4h9497fddw ppFGKe7NECB8loPvwrNT7eimW8UpnVkAAQCGm2Uki5Lc7qD/nlNnOlWfE6RFagGvRy0L qecknD/F+ISplAo7gFjcvkVyVMSz1gxK+JfZOgJWWQC8stBBhTyUDJSBILy2qV9+/oOx Gu+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JAOB0+kh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a17090a3e4d00b002565804077bsi7902013pjm.32.2023.06.06.12.05.33; Tue, 06 Jun 2023 12:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JAOB0+kh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239140AbjFFSzl (ORCPT + 99 others); Tue, 6 Jun 2023 14:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238536AbjFFSzk (ORCPT ); Tue, 6 Jun 2023 14:55:40 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 033B1101 for ; Tue, 6 Jun 2023 11:55:38 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f732d37d7bso29293615e9.0 for ; Tue, 06 Jun 2023 11:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686077736; x=1688669736; h=content-transfer-encoding:in-reply-to:subject:organization :references:cc:to:content-language:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=WF84323liifZi1X4RPGsffn6FGJtYs7l55Hl/A+Mj44=; b=JAOB0+kh1vSX3idIL/rmdxFvoBbODqG5NOuctGiVfsDv054ZAxp2vZ7/fO/UzOWbLr kff7kWXFbDZph9g4kGpjeZ5v7xJ19kkYhGw/U7q98tZZz48rujZ2G5mzufn7OZxo2gwp o3+oKFzKJxs9rGKdQ0htR33AYx6u7oc8jrC9+iyyX3t7k+XERPGsQ7lUsoYHg8lTAIhD +FzM/AmenlzKWgZ0DYUOT5ihe7QhgNfnBTbfh8gRayHGWhJjPByclj3vBF4ZV743NCOP duAp2zdi0Efa4XuTUCDZTla6AiwJu2vXBNpm77yJpiOlUivsbKlytz9uLggqAZXqR+3s PCAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686077736; x=1688669736; h=content-transfer-encoding:in-reply-to:subject:organization :references:cc:to:content-language:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=WF84323liifZi1X4RPGsffn6FGJtYs7l55Hl/A+Mj44=; b=R4gDgVqbJom+3P+GktYzYZtAw7cAJNM9DBOXYkpgCPGM32XIjnh1A55xio3hzAsNwk 1SrGikcUphKifakWXpNQNVZKO8wK+w90PoN+bY7BfLbPDigEzdE7aQCxzA+Mubm9LSPp mlkZpEiwa8ddJ2S40/UC2ghlhmE+/6oflszVZSyL8sLwAz9o9xCD8L3Z5+UnElNbpydU SLJw2XROj7b63F/tUBEhFxB2THtz/DaMa/umZqtk+6bWCqq80bcvfnJw4pdea5KL7YnL KwykUF5T8fvzFyZ9a03F5Hg2LJmyqfdRNGqG0hYILjPv8RqnOdbRrsZBqdUSw5g7W4pR c5+g== X-Gm-Message-State: AC+VfDw5ptH0bsTH5cTJ8K7qQa0E7Z04Iuh204kEYjgh45u3AGlW8SMw ym7xaHFQn5FBRD/0olobpTgOIex5NeDAxZ8Fe0s1Qt1+ X-Received: by 2002:a5d:56c4:0:b0:30a:bdfd:5c3c with SMTP id m4-20020a5d56c4000000b0030abdfd5c3cmr2392137wrw.17.1686077736430; Tue, 06 Jun 2023 11:55:36 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:4973:1165:b171:fa69? ([2a01:e0a:982:cbb0:4973:1165:b171:fa69]) by smtp.gmail.com with ESMTPSA id z6-20020a1c4c06000000b003f42ceb3bf4sm15015265wmf.32.2023.06.06.11.55.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 11:55:36 -0700 (PDT) Message-ID: <665c9aa5-ef70-65ce-7d9c-4b3b93874934@linaro.org> Date: Tue, 6 Jun 2023 20:55:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Content-Language: en-US To: Dmitry Torokhov Cc: Hans de Goede , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bastien Nocera , Henrik Rydberg , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230606-topic-goodix-berlin-upstream-initial-v1-0-4a0741b8aefd@linaro.org> <2677ae8c-59d3-b658-dc3f-918838ac0fb6@linaro.org> Organization: Linaro Developer Services Subject: Re: [PATCH RFC 0/4] input: touchscreen: add initial support for Goodix Berlin touchscreen IC In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On 06/06/2023 20:44, Dmitry Torokhov wrote: > On Tue, Jun 06, 2023 at 08:12:04PM +0200, Neil Armstrong wrote: >> Hi, >> >> On 06/06/2023 17:31, Hans de Goede wrote: >>> Hi Neil, >>> >>> On 6/6/23 16:31, Neil Armstrong wrote: >>>> These touchscreen ICs support SPI, I2C and I3C interface, up to >>>> 10 finger touch, stylus and gestures events. >>>> >>>> This initial driver is derived from the Goodix goodix_ts_berlin >>>> available at [1] and [2] and only supports the GT9916 IC >>>> present on the Qualcomm SM8550 MTP & QRD touch panel. >>>> >>>> The current implementation only supports BerlinD, aka GT9916. >>>> >>>> Support for advanced features like: >>>> - Firmware & config update >>>> - Stylus events >>>> - Gestures events >>>> - Previous revisions support (BerlinA or BerlinB) >>>> is not included in current version. >>>> >>>> The current support will work with currently flashed firmware >>>> and config, and bail out if firmware or config aren't flashed yet. >>> >>> What I'm missing here / in the commit msg of >>> "input: touchscreen: add core support for Goodix Berlin Touchscreen IC" >>> >>> is an explanation why this is a new driver instead of adding >>> support to the existing goodix.c code. >>> >>> I assume you have good reasons for this, but it would be good >>> if you can write the reasons for this down. >> >> Sure, should I write it down here and/or update the commit message in a new revision ? >> >> Anyway, here's the reasons: >> - globally the event handling "looks like" the current goodix.c, but again the offsets >> are again different and none of the register address are the same, and unlike the current >> support all registers are provided by the "ic_info" structure >> - while with the current code it *could* be possible to merge it, with a lot of changes, >> the firmware management looks really different, and it would be really hard to merge. >> >> But I may be wrong, and may be misleaded by the goodix driver structure (even if it >> went through a really heavy cleaning process). >> >> Globally it seems they tried to match the "event handling" process of the previous >> generations, but the firmware interface is completely different. > > It is not unprecedented for drivers to share event processing and > implement several ways/generations of firmware update mechanisms. Thanks for your reply, I'm perfectly aware of that, this is why I posted this as RFC. If the event handling is vaguely similar, I'm not sure it's worth refactoring the current driver since I do not have the old and current IC datasheet nor HW to check for current support non-regression. What I'm sure is that not a single register address, flag or struct is even close to the current upstream defined ones. Neil > > Thanks. >