Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9582368rwr; Thu, 11 May 2023 17:56:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+EEQFrkeEDiG99riTqS9vVcpzvzr5livD6/t8iBJKtbQke4ZTN6tIpe/UajiGuMVLd5EV X-Received: by 2002:a05:6a21:6d9a:b0:100:607:b997 with SMTP id wl26-20020a056a216d9a00b001000607b997mr23347597pzb.49.1683852984039; Thu, 11 May 2023 17:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683852984; cv=none; d=google.com; s=arc-20160816; b=D5UF2yt7kRFaXSYkR5iz+cxVlfy13Ya/n/Rl3FtUdFZIIuuThnlz8MwjhQlYp4324+ HFr6tbkm4phKEaNszd1iFbUa4dKFbMYx1pSWsmiXfAA5jelPxU+ebX2ueV1vVwzH2d6i aLqRgMgI5zS/00EsBvcThBKUK6P3AD3IAQ84E3t04fDukMfozAmLMku6SAHa0oE0jc0Y BLc9uKx6hB+SRDN3nGcL3oaL4omPPaaAeJe6mNkce49hVi4FZh8ASf00+7UXOrfiRhmh x36PMWvNNQJgm/dx6W7uMcU6bQcXYZTK9NzaKnFFEeZbgCy3c+kQT7aQakCpsyge0c95 oiWA== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xA9GTBUaLlTL5Dbrc7x2OWFAgSUirYMQNpAhJ3u77zc=; b=zW7B/AyIXykIMf22aGAtb15M7arvRBs9sVtgAfpqp4UTYobfMrjlmIcNKR5nuXIvwS uvo88UkNB3aindfdDDOixsKW0TPN/QVgLWaMDT3t6L7XC8YkD/7mSJALV/JR0EPUKMgA 9VRfQzCBXuqaTZ2ioeE9RCrMew0VM5lrFoba5770kpBv6LxXZQLWhnqJ2z2QSq68Gy1r Au6+P4bH3ICJI7FOR/lc4faIx/Jg+sMfa+tcK3MzKDv1Vt4lnGfHK1uo3nUZ5m2TAf7g O2yIavqvu9QdQ+irSFWP5LeOpxTwvG2CeOvs8Dntr5JKURnsS/YkNUD0ZvwO/eFm07hk G1YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=H6aBAxY3; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a056a00008a00b0063b21db5973si8921556pfj.358.2023.05.11.17.56.06; Thu, 11 May 2023 17:56:24 -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=@gmail.com header.s=20221208 header.b=H6aBAxY3; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239604AbjELAng (ORCPT + 99 others); Thu, 11 May 2023 20:43:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjELAnf (ORCPT ); Thu, 11 May 2023 20:43:35 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 909BF2101; Thu, 11 May 2023 17:43:33 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-b8bf64a4999so1420489276.1; Thu, 11 May 2023 17:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683852213; x=1686444213; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xA9GTBUaLlTL5Dbrc7x2OWFAgSUirYMQNpAhJ3u77zc=; b=H6aBAxY3wFF6Kt5Q/Y8uQ7NlsoJyI40Fa4BBxOhfdK+6FQIjv7OWSZ0IWj4xWsGTv/ m6RgetZqbEuwK/8+DAisyYV+yLEnhVqT01ChTlllvMTndZI1mCZjIOfPwxDvgHo7XNm4 ffuRw2hS698UDlRVNfZGdg+gPq5aRJZ9FLkxxm3b9Z6hNMB+mrVSAoHaywADN4LMpjbW WIUIYNdkM2iPx4LSaWDfGk41QJPjOo7RPlWiyNsBHLGGBc8QwwxSy8R0BUl3jYFGi1HJ Y8OkEDMLwKN7e2srUMI6gNo7sAQsqYWcAXR8WXS2cQG82RQcv+H1hetKvVORqzNDGOJQ ZyNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683852213; x=1686444213; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xA9GTBUaLlTL5Dbrc7x2OWFAgSUirYMQNpAhJ3u77zc=; b=clzgGGSG/g1iR7HUz/URka4pdrGxHZOC13myn79ooNFCYUjkUCwNWTgGadKaz1o1Cz Z3vtJjgRaonOXfMU9TxOiU0S2Z8bSAK7D8IxJkOPE5yu6oFHEJ3RvywxWzhmLtsr8V7N JSi1ouJHkP+pCK5cevxaoio2yVbDlJGaWntvEypeZpiRRrZVVGoYhz2GP2Fh8jt8TsNE 33SEndhMP2QGL10aNWpoJxC8XYHMi+zI2OIjNHFCjd/NP3vFNdorAKxI4qRCGgBtc3uw kH8LHpEs7nc9xM1KzZkeKf4ueBEne0n6jBMWsShcHnadJN8k1cV6dRfDf1Q1e10rh5O6 Pmhg== X-Gm-Message-State: AC+VfDz1JM61VGnue1Y/7k8lv+jYFtxWB5LYqNxtR6ntLf0LKvZ5tmxO ve0ljTxJ05RayJH6mWPnps8= X-Received: by 2002:a81:1ad7:0:b0:55d:9a9c:f19e with SMTP id a206-20020a811ad7000000b0055d9a9cf19emr21949258ywa.0.1683852212629; Thu, 11 May 2023 17:43:32 -0700 (PDT) Received: from ?IPV6:2604:2d80:4d87:cd00:e2d5:5eff:fe88:4a55? ([2604:2d80:4d87:cd00:e2d5:5eff:fe88:4a55]) by smtp.gmail.com with ESMTPSA id l62-20020a0de241000000b00560c2e3ec63sm2377401ywe.77.2023.05.11.17.43.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 May 2023 17:43:32 -0700 (PDT) Message-ID: Date: Thu, 11 May 2023 19:43:28 -0500 MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: [PATCH v3 2/5] Input: add driver for Focaltech FTS touchscreen To: Jeff LaBundy Cc: Caleb Connolly , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg , Arnd Bergmann , Robert Jarzmik , Markuss Broks , Jean Delvare , Max Krummenacher , Chris Morgan , Job Noorman , Alistair Francis , Hans de Goede , Maxime Ripard , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org References: <20230415020222.216232-1-joelselvaraj.oss@gmail.com> <20230415020222.216232-3-joelselvaraj.oss@gmail.com> Content-Language: en-US From: Joel Selvaraj In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Jeff LaBundy, On 4/23/23 21:39, Jeff LaBundy wrote: > Hi Joel, > > Great work so far! It's coming along nicely. Please find my latest > feedback below. Sorry for the late reply, university semester end got me hooked up. I have a sad kind of good news... As pointed out by Hans de Goede, the edt-ft5x06 driver works out of the box for the fts8719 touchscreen in my device. So I think this patch series is no longer needed. I did have a look at the driver once when working on this patch series, but it looked different/not compatible at that time. After mentioned by Hans de Goede, I had a more closer look and the main touch buffer handling seems to be the same. I am sorry as we put some considerable time in this patch series. I should have noted more carefully. Thank you though as I learnt things working on this patch series. I guess I will send a different patch to add the compatible data to the existing edt-ft5x06 driver and dts changes to include that driver to my device. > On Fri, Apr 14, 2023 at 09:02:19PM -0500, Joel Selvaraj wrote: >> The Focaltech FTS driver supports several variants of focaltech >> touchscreens found in ~2018 era smartphones including variants found on >> the PocoPhone F1 and the SHIFT6mq which are already present in mainline. >> This driver is loosely based on the original driver from Focaltech >> but has been simplified and largely reworked. >> >> Co-developed-by: Caleb Connolly >> Signed-off-by: Caleb Connolly >> Signed-off-by: Joel Selvaraj >> --- >> MAINTAINERS | 8 + >> drivers/input/touchscreen/Kconfig | 12 + >> drivers/input/touchscreen/Makefile | 1 + >> drivers/input/touchscreen/focaltech_fts5452.c | 432 ++++++++++++++++++ >> 4 files changed, 453 insertions(+) >> create mode 100644 drivers/input/touchscreen/focaltech_fts5452.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 7ec4ce64f66d..1a3ea61e1f52 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -8028,6 +8028,14 @@ L: linux-input@vger.kernel.org >> S: Maintained >> F: drivers/input/joystick/fsia6b.c >> >> +FOCALTECH FTS5452 TOUCHSCREEN DRIVER >> +M: Joel Selvaraj >> +M: Caleb Connolly >> +L: linux-input@vger.kernel.org >> +S: Maintained >> +F: Documentation/devicetree/bindings/input/touchscreen/focaltech,fts5452.yaml >> +F: drivers/input/touchscreen/focaltech_fts5452.c >> + >> FOCUSRITE SCARLETT GEN 2/3 MIXER DRIVER >> M: Geoffrey D. Bennett >> L: alsa-devel@alsa-project.org (moderated for non-subscribers) >> diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig >> index 1feecd7ed3cb..11af91504969 100644 >> --- a/drivers/input/touchscreen/Kconfig >> +++ b/drivers/input/touchscreen/Kconfig >> @@ -388,6 +388,18 @@ config TOUCHSCREEN_EXC3000 >> To compile this driver as a module, choose M here: the >> module will be called exc3000. >> >> +config TOUCHSCREEN_FOCALTECH_FTS5452 >> + tristate "Focaltech FTS Touchscreen" >> + depends on I2C >> + help >> + Say Y here to enable support for I2C connected Focaltech FTS >> + based touch panels, including the 5452 and 8917 panels. > > This language is a bit misleading, as it seems to suggest three or more > models are supported. It seems the title should simply be "FocalTech > FTS5452 touchscreen controller" with the description as "...FocalTech > FTS5452 and compatible touchscreen controllers." > > As more are found to be compatible (e.g. FTS8917), the compatible strings > can simply be appended. > >> + >> + If unsure, say N. >> + >> + To compile this driver as a module, choose M here: the >> + module will be called focaltech_fts. >> + >> config TOUCHSCREEN_FUJITSU >> tristate "Fujitsu serial touchscreen" >> select SERIO >> diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile >> index 159cd5136fdb..47d78c9cff21 100644 >> --- a/drivers/input/touchscreen/Makefile >> +++ b/drivers/input/touchscreen/Makefile >> @@ -45,6 +45,7 @@ obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o >> obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o >> obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o >> obj-$(CONFIG_TOUCHSCREEN_EXC3000) += exc3000.o >> +obj-$(CONFIG_TOUCHSCREEN_FOCALTECH_FTS5452) += focaltech_fts5452.o >> obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o >> obj-$(CONFIG_TOUCHSCREEN_GOODIX) += goodix_ts.o >> obj-$(CONFIG_TOUCHSCREEN_HIDEEP) += hideep.o >> diff --git a/drivers/input/touchscreen/focaltech_fts5452.c b/drivers/input/touchscreen/focaltech_fts5452.c >> new file mode 100644 >> index 000000000000..abf8a2f271ca >> --- /dev/null >> +++ b/drivers/input/touchscreen/focaltech_fts5452.c >> @@ -0,0 +1,432 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> +/* >> + * FocalTech touchscreen driver. >> + * >> + * Copyright (c) 2010-2017, FocalTech Systems, Ltd., all rights reserved. >> + * Copyright (C) 2018 XiaoMi, Inc. >> + * Copyright (c) 2021 Caleb Connolly >> + * Copyright (c) 2023 Joel Selvaraj >> + */ [skip] >> +static const struct of_device_id fts_of_match[] = { >> + { .compatible = "focaltech,fts5452", .data = &fts5452_chip_data }, >> + { .compatible = "focaltech,fts8719", .data = &fts8719_chip_data }, >> + { /* sentinel */ } >> +}; >> + >> +MODULE_DEVICE_TABLE(of, fts_of_match); >> + >> +static struct i2c_driver fts_ts_driver = { >> + .probe_new = fts_ts_probe, >> + .id_table = fts_i2c_id, >> + .driver = { >> + .name = FTS_DRIVER_NAME, >> + .pm = pm_sleep_ptr(&fts_dev_pm_ops), >> + .of_match_table = fts_of_match, >> + }, >> +}; >> +module_i2c_driver(fts_ts_driver); >> + >> +MODULE_AUTHOR("Joel Selvaraj "); >> +MODULE_AUTHOR("Caleb Connolly "); >> +MODULE_DESCRIPTION("Focaltech Touchscreen Driver"); > > Nit: mixing 'FocalTech' and 'Focaltech' throughout. > >> +MODULE_LICENSE("GPL"); >> -- >> 2.40.0 >> > > Kind regards, > Jeff LaBundy Thank you, Joel Selvaraj