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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79FABC77B73 for ; Tue, 6 Jun 2023 18:55:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237163AbjFFSzk (ORCPT ); Tue, 6 Jun 2023 14:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239099AbjFFSzk (ORCPT ); Tue, 6 Jun 2023 14:55:40 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04FE2E40 for ; Tue, 6 Jun 2023 11:55:38 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f7378a75c0so25670085e9.3 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=d4BLylIaiA+SItOTs2MJar+f4MFdQ39hRAzBcf+5yI7SACmiC3l/eeip2AqsvyptET N/Mep0fm6uoDP1JtYW6GnL1107c1o2swkK/r4wiE0ArBgLYZxC/KAJ52S8Z2c53AemXc Nv2ZCjsCzAIqyUWvWd+spgaV+Kxub50EnWvwJbkzwmI7P3FJRtsK/Ghzfb03LtLQ/oCu FdyfqWl3fiP2FiF0NpnHKCdcSSnDYKtM2VHinRgjZiX56ej5FYXMpdsT9OcKhL1d+PVu VA7DVScGEHhzmyVTz5AjAxJQpH3xFaAThOY2DAcs1LfeNfEfQbHnCfbjxn8BWGkJTu6P xjYg== X-Gm-Message-State: AC+VfDwoiN9JXKF7IJDMCmVY0uA8YRApdRt3V2g/Io9RA09tcXVQElJs etXB9bUCe5SScGxc3ZELsWIzNA== X-Google-Smtp-Source: ACHHUZ7VduePN/2ZpGfRhK0O16LzqsCyivVAEc2VSdGTMLYkolaWsUhsc23qiWuit4FOcR7ohBiYAA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-input@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. >