From patchwork Mon Dec 5 13:40:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2261103wrr; Mon, 5 Dec 2022 05:45:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf7t/qOiVnoBcp4E4uShoRE0xXTA599pG66e0FYlb4hK0vIFcJYFkkNskdivzvBVHPwFoZGs X-Received: by 2002:a17:902:d192:b0:189:8867:9bd4 with SMTP id m18-20020a170902d19200b0018988679bd4mr39995151plb.68.1670247900801; Mon, 05 Dec 2022 05:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247900; cv=none; d=google.com; s=arc-20160816; b=1Duqu9I9RpPB8SNTFxo3YpeKOXfN8OAk5UFyw/fIs/e6e+1yCcYO9bLCKuTFcwOsg3 281bowUgruqX2jGoRYYD1pnImZ9C+3fRRXDRHT80TIY5kHdOF6xpTEvHXRe6ltm5uMmO z46hlPxvi6n0/VZtj9cgeb/t+3Ks2MaRJ8jtB7fNVMDarPgbdt83DT4+j1Pq8kdlcQfX JwUTRHAmw8ID7jS/KKr8zM6PTn1T+xgYy+Qw067Vo6w3xbshH48sb/e2+NJj3cX6+Dwu Rmnx5C+qnTNNtVw+PN53TPiYYNaBYqJrn3a/6fU2CSt0ykVD0vEwwgHEr3g9chUXPz71 3Frg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LD/chWH17w25M9pXTwH4UpygERMvp4cXcbTlF7jaHYg=; b=Os3iAP562EWqcgTIDGfmBJL7nuLFap1mSkpqTg2mTpjDWfP3WgdrRAmGClciOlUts/ xXeQaU+Lc72q5JGciLSlvU1dhxiEC+xiwwTPeiKI0HylBbdpBL9MnFAkaO9BmEto4RxE 3DYd+d78D4TQngttedxz5acPYtIesZ3PStS6qzQEnXjAR+VRzhYY6xMCC/xKbBTcp5Tf i74NMyzaC+EZBxP2GKc899RlbchgJMZ53IJWbZiX1lFEjnrp4OFY7RhxaDlYvMWkLCPs zFp6Cq+mQzMCo/JVrBO1gaave3P1JBmcTecuvi0tIJKiO9wIiMx29enTP2gyh+s44K1j okgg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qi16-20020a17090b275000b00205f1a25a31si14818788pjb.161.2022.12.05.05.44.47; Mon, 05 Dec 2022 05:45:00 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbiLENlZ (ORCPT + 99 others); Mon, 5 Dec 2022 08:41:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232010AbiLENlV (ORCPT ); Mon, 5 Dec 2022 08:41:21 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 692591CFD8; Mon, 5 Dec 2022 05:41:15 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 3D32DFF802; Mon, 5 Dec 2022 13:41:00 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 1/9] Input: goodix - add macro for gpio mapping Date: Mon, 5 Dec 2022 14:40:30 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-1-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381863186052482?= X-GMAIL-MSGID: =?utf-8?q?1751381863186052482?= From: Quentin Schulz To prepare for the quirks member to be set for all pins, which would make the line longer than allowed, let's move all mappings into a macro. Signed-off-by: Quentin Schulz --- drivers/input/touchscreen/goodix.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index c281e49826c23..d73d4272a8ea5 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -797,23 +797,31 @@ static int goodix_reset(struct goodix_ts_data *ts) } #ifdef ACPI_GPIO_SUPPORT + +#define GOODIX_GPIO_MAPPING(_name, _params, _size) \ + { \ + .name = _name, \ + .data = _params, \ + .size = _size, \ + } + static const struct acpi_gpio_params first_gpio = { 0, 0, false }; static const struct acpi_gpio_params second_gpio = { 1, 0, false }; static const struct acpi_gpio_mapping acpi_goodix_int_first_gpios[] = { - { GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1 }, - { GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1 }, + GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1), { }, }; static const struct acpi_gpio_mapping acpi_goodix_int_last_gpios[] = { - { GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 }, - { GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1 }, + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1), { }, }; static const struct acpi_gpio_mapping acpi_goodix_reset_only_gpios[] = { - { GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1 }, + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1), { }, }; From patchwork Mon Dec 5 13:40:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2261240wrr; Mon, 5 Dec 2022 05:45:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf4P8n5JUmdo1wG36ENjz1Cjc4dDTM39JbdvnfgGmg0Z78Whh2/1GuYJjpShkU+1BJq8Y5wL X-Received: by 2002:a17:907:16a5:b0:7be:42dc:4cfc with SMTP id hc37-20020a17090716a500b007be42dc4cfcmr35057797ejc.128.1670247916671; Mon, 05 Dec 2022 05:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247916; cv=none; d=google.com; s=arc-20160816; b=IWUGplYixq06cir6uDcQyMSN0ORqeizXAm//bUcqKOPZPl7O2I7W/wbl7d6n96QzLd CdjIHX31JSLkwLiiDOmTd6k5d4KWLSrcgJufkHae8ljhjczKf787Dvri9BvNM+KOpL/Y vLW0Q6e1puSe3pUpQyr+lJ5aBYiL9UMtleKfhSbw2HZWd+3ON9L92sgGqtuzMBVUkW93 rSP/IdncF3xnQOCrtsTYU8fuusK0SkE18wk2NSHV24G4VpMkaXbRKLtouZ5UnFsYHCK3 rY7G8FS1YEWZDVt2e25vb9QnZpGPvRoTLHwxCprHOlacY9N2VElsUGwf5pluB8NbxYMF wKgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=94BFeRFCOf5gyLvKTVdQmG6EZ7WPUpd9iE1F1/oGgfI=; b=OUHQORu2xwYpn2Slv6oJ+lKHDzDaU2YthL8WQC7HV9BxnzY8FEt+DgY7F8JJ/q2lrV T3XEoj9TLcNauHQzIVxqVYYkLx3llK4B17gnY2rd6dVkKShUafqOEfThMduVtKf0lNjp dPkEra9Ka7prMEo2R43bt4zbUClnCi5Xz8QiQcutGFfiMOUmUixxlI61/LiEc195xepl a+Y6jGGjG4AVglUxm8k4+/vkTlV1LS/9XnlEoHWyRK8c3bc7ivolUdTBL5Znx9UzlY03 MugFF1979aT1JszRO4BCvbrNM6BnJu3LbXRrcsZ5mT2DrIyMDgqidJy+TpVAQz8NufnY NaNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa10-20020a170907868a00b00773db351c39si9784875ejc.64.2022.12.05.05.44.52; Mon, 05 Dec 2022 05:45:16 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231826AbiLENlc (ORCPT + 99 others); Mon, 5 Dec 2022 08:41:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232143AbiLENl2 (ORCPT ); Mon, 5 Dec 2022 08:41:28 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A5011CFDB; Mon, 5 Dec 2022 05:41:27 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 79BC4FF811; Mon, 5 Dec 2022 13:41:14 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 2/9] Input: goodix - make gpiod_get honor GPIOD_ASIS Date: Mon, 5 Dec 2022 14:40:31 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-2-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381879670768221?= X-GMAIL-MSGID: =?utf-8?q?1751381879670768221?= From: Quentin Schulz For some reason the ACPI GPIO lookup code (acpi_find_gpio followed by acpi_gpio_update_gpiod_flags) will override the gpiod_flags passed to gpiod_get() if it can determine a set of flags from the ACPI GpioIo entry. For output pins like the reset pin, this requires a pull bias to be set, which often is not the case, so then the GPIOD_ASIS which we pass in is used. But if a pull bias is specified in the ACPI GpioIo entry for the reset pin then that gets translated to GPIOD_OUT_LOW or GPIOD_OUT_HIGH meaning we cannot guarantee the same behavior on all boards. So this may cause unintended side-effects, c.f. commit a2fd46cd3dbb ("Input: goodix - try not to touch the reset-pin on x86/ACPI devices") for some background. This is something which we can fix though, we can force the ACPI GPIO code to honor the GPIOD_ASIS we pass in by passing ACPI_GPIO_QUIRK_NO_IO_RESTRICTION to the ACPI gpio mapping. Suggested-by: Hans de Goede Signed-off-by: Quentin Schulz --- drivers/input/touchscreen/goodix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index d73d4272a8ea5..1639f2f8a31e3 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -803,6 +803,7 @@ static int goodix_reset(struct goodix_ts_data *ts) .name = _name, \ .data = _params, \ .size = _size, \ + .quirks = ACPI_GPIO_QUIRK_NO_IO_RESTRICTION, \ } static const struct acpi_gpio_params first_gpio = { 0, 0, false }; From patchwork Mon Dec 5 13:40:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2262428wrr; Mon, 5 Dec 2022 05:47:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6TXZMt9wOPIrdcjJIPxjTA4q2PfdBwJfwVG+u+YSKEHYQGK0Yllyt8a1n1ZQRDupa2zpvU X-Received: by 2002:a17:903:40cb:b0:189:dd86:a1e0 with SMTP id t11-20020a17090340cb00b00189dd86a1e0mr3028427pld.78.1670248027246; Mon, 05 Dec 2022 05:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670248027; cv=none; d=google.com; s=arc-20160816; b=zX2soi0zQnmVqwrc16AQoxwqmacu9Ha2QUAfz+R++7iRgaLTM6vC7toeV6VcrBa6AU ds2Ss02R9OFiI5ymQv7l4s/XfjPQ7pYNDreD9ZhisfTFp3AOEH14canWWUfRUf22uVmX cYOMtpeQB7PRCOIJ4uH+l608bmG1nCLP0ydA26soWEgWatPAOW4LhdUEbNjXLJk9FH7v aQbalJgJYh0c85YG99RrPgQa9g3Ulm5mlWCP/HOf73I4a4NTb59tf5Js7WGD7OvbK3kj mfcvOc+wj4voTn9plQL7jFIgUA/pt2ZO7HGq//LnQoANolnA3RjBDpHlRAT6VbYpQDfR ZH8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1v2dvqoGnIUnB3C3w0lQ3kyh6EI2JGVwx+Ss2ydctP8=; b=bCw+mpZ8MvHLUMRVdt/EsVZaSpRB+xVH7iasW8yH9xLiqmo+MED52XgPfd+sSVrWL7 nuPUfCpOn4mxBZygcqZc2+PPQ2kWdmfEuMHr9MmvZXWuwRdSoPZF9fl5w+Tz/dOpIbDc m3uKXgzedv9rgvOSmMlRp1Z7wmQ+BB0oI7Uq+xcDawHcwxM8HYoT6Sgu7NUHdyo9/0Q+ xSbMDJ5XeOVgUWUGl360mDuaAgUcJgbiMhzW5UBfjsPSO9qZLk4i9SAIqd5OXyboUyWB UqTAP//8tS6Uvr+5VQFY5p4Fi2oO04pMvDlaFPZcYz7aoTU8LzJ9h+zPWblZAkM5gZWF 3+GQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb8-20020a17090b4a4800b00213c2f26cb5si18646129pjb.126.2022.12.05.05.46.54; Mon, 05 Dec 2022 05:47:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbiLENlq (ORCPT + 99 others); Mon, 5 Dec 2022 08:41:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbiLENlm (ORCPT ); Mon, 5 Dec 2022 08:41:42 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19BEF1CFD7; Mon, 5 Dec 2022 05:41:39 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 68281FF807; Mon, 5 Dec 2022 13:41:26 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 3/9] Input: goodix - fix reset polarity Date: Mon, 5 Dec 2022 14:40:32 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-3-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381995838998751?= X-GMAIL-MSGID: =?utf-8?q?1751381995838998751?= From: Quentin Schulz The reset line is asserted for selecting the I2C target address and then deasserted. This inverted logic works because the boards using this touchscreen controller also invert the polarity of their reset GPIO. Instead of depending on this double-inversion of meaning, let's *assert* the line. Signed-off-by: Quentin Schulz --- drivers/input/touchscreen/goodix.c | 45 +++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 1639f2f8a31e3..5fff9483640c9 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -742,8 +742,25 @@ int goodix_reset_no_int_sync(struct goodix_ts_data *ts) { int error; - /* begin select I2C slave addr */ - error = gpiod_direction_output(ts->gpiod_rst, 0); + /* + * begin select I2C slave addr by activating/asserting RESET. + * + * The value passed to gpiod_direction_output is decorrelated from the + * actual physical state of the line. The 1 value here is just to + * specify the *assertion* of the line, its meaning being dependent on + * the HW design of the system. + * + * DT-based systems need to specify the GPIO level in which the reset is + * active. Since the touchscreen controller is in reset when its RESET + * line is low, it is the level of the GPIO that results in the RESET + * pin on the touchscreen controller side being low. In a HW design in + * which the GPIO is directly connected to the touchscreen controller + * RESET pin, this would be GPIO_ACTIVE_LOW. + * + * ACPI systems do not have the ability to specify the level of the GPIO + * and they are therefore all assumed active low. + */ + error = gpiod_direction_output(ts->gpiod_rst, 1); if (error) goto error; @@ -756,7 +773,8 @@ int goodix_reset_no_int_sync(struct goodix_ts_data *ts) usleep_range(100, 2000); /* T3: > 100us */ - error = gpiod_direction_output(ts->gpiod_rst, 1); + /* Disable/de-assert RESET */ + error = gpiod_direction_output(ts->gpiod_rst, 0); if (error) goto error; @@ -806,23 +824,30 @@ static int goodix_reset(struct goodix_ts_data *ts) .quirks = ACPI_GPIO_QUIRK_NO_IO_RESTRICTION, \ } -static const struct acpi_gpio_params first_gpio = { 0, 0, false }; -static const struct acpi_gpio_params second_gpio = { 1, 0, false }; +static const struct acpi_gpio_params int_first_gpio = { 0, 0, false }; +static const struct acpi_gpio_params int_second_gpio = { 1, 0, false }; + +/* + * The controller is in reset when the RESET GPIO is output low, so + * set acpi_gpio_params.active_low appropriately. + */ +static const struct acpi_gpio_params rst_first_gpio = { 0, 0, true }; +static const struct acpi_gpio_params rst_second_gpio = { 1, 0, true }; static const struct acpi_gpio_mapping acpi_goodix_int_first_gpios[] = { - GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &first_gpio, 1), - GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &second_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &int_first_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &rst_second_gpio, 1), { }, }; static const struct acpi_gpio_mapping acpi_goodix_int_last_gpios[] = { - GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1), - GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &second_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &rst_first_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_INT_NAME "-gpios", &int_second_gpio, 1), { }, }; static const struct acpi_gpio_mapping acpi_goodix_reset_only_gpios[] = { - GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &first_gpio, 1), + GOODIX_GPIO_MAPPING(GOODIX_GPIO_RST_NAME "-gpios", &rst_first_gpio, 1), { }, }; From patchwork Mon Dec 5 13:40:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2262052wrr; Mon, 5 Dec 2022 05:46:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7S6wiR29EREULltV0w1DFW3LWPRptinZ3osYa11fyMwQL0PtGYe8Phvkmvf11bXez+JtKf X-Received: by 2002:a05:6402:1145:b0:46a:d5ee:d150 with SMTP id g5-20020a056402114500b0046ad5eed150mr38370588edw.312.1670247994618; Mon, 05 Dec 2022 05:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247994; cv=none; d=google.com; s=arc-20160816; b=WEa3D1dODCYb/PULLQXKbzMd8SGn7N8qVdJ2+SpW81F4rPulOjU6NFs0diNDb/7INC FclflxBoyII3aPs1q80OZm9LRxcWapWJw0dyEt7exZevZUpVH8EeTdaavKlLcNbR9U6C dE9PrmTnD+dUEcI2C7HySL0z283jJqnFsRza9DBfxQydEge4Ew62biovGZShnME7FUZj Pm+0uP1r0sZgjGipt0ME+l1JsiGcgwS8Ku+MMxrQL49oyF6u0hz2KpQ3grfeLxPVudj6 UJ3aLGNVEFTCXl32duN+267luaQ1e8ShjBWOvmK4A3JPz9chrHOTTmaCyf49P17WTfXL 65Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RK9Zz1Ba90VilAFGhu183mbpKQ4O4jr/Yx0k1Nz1tOQ=; b=BULn7GV2n3xGdJS4zmyWeyp1FOl6YMNH37g6lgt9yCJmbLfSmLxgUVLtlt1/TvhM5k p2t0e/yOUIXP+LC3ZaKc3CIVhSNhdsq1fimyu5AjM5HUj0y/6tl8jurn49tBL7z+/JAE scM6wbKFwRfOvEIOUo2jDFkFbwVJAwL5mCXx6GZtq/HHfsD6WqV4SAUOgyORPoMYTY3q HoXoAXgv1MOoZ7ePC+6RRL0+2w3Upn6W3BZSZfD6e97MRGaVO7qKHdS38hKyNrEmcRqy UoGqaBy9f4SvmiAsB8xDkmwPr9K2JUtMViVq9v19edTl1v5toFkH1NNiSHKGghN2/icP oTMw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020aa7dad0000000b0046ad8dfcfbasi10209862eds.344.2022.12.05.05.46.04; Mon, 05 Dec 2022 05:46:34 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232453AbiLENm6 (ORCPT + 99 others); Mon, 5 Dec 2022 08:42:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbiLENlz (ORCPT ); Mon, 5 Dec 2022 08:41:55 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 658111CFE6; Mon, 5 Dec 2022 05:41:53 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id B3B56FF802; Mon, 5 Dec 2022 13:41:37 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 4/9] ARM: dts: imx: fix touchscreen reset GPIO polarity Date: Mon, 5 Dec 2022 14:40:33 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-4-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381961190261259?= X-GMAIL-MSGID: =?utf-8?q?1751381961190261259?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz Acked-by: Frieder Schrempf # Reviewed-by: Lukasz Majewski --- arch/arm/boot/dts/imx6q-kp.dtsi | 2 +- arch/arm/boot/dts/imx6ul-kontron-bl-43.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-kp.dtsi b/arch/arm/boot/dts/imx6q-kp.dtsi index 1ade0bff681d6..dae14aaf803a8 100644 --- a/arch/arm/boot/dts/imx6q-kp.dtsi +++ b/arch/arm/boot/dts/imx6q-kp.dtsi @@ -188,7 +188,7 @@ touchscreen@5d { interrupt-parent = <&gpio1>; interrupts = <9 IRQ_TYPE_EDGE_FALLING>; irq-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; }; ds1307: rtc@32 { diff --git a/arch/arm/boot/dts/imx6ul-kontron-bl-43.dts b/arch/arm/boot/dts/imx6ul-kontron-bl-43.dts index 0c643706a158b..767ef5da76136 100644 --- a/arch/arm/boot/dts/imx6ul-kontron-bl-43.dts +++ b/arch/arm/boot/dts/imx6ul-kontron-bl-43.dts @@ -29,7 +29,7 @@ touchscreen@5d { pinctrl-0 = <&pinctrl_cap_touch>; interrupt-parent = <&gpio5>; interrupts = <6 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; irq-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>; }; }; From patchwork Mon Dec 5 13:40:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2261344wrr; Mon, 5 Dec 2022 05:45:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf4hmEQr3er/Gdodv76GQDZfdvPMGe3QRWWgc68Npq/Rxd4N9rDh46RS+caKqugGd2YmpUWf X-Received: by 2002:a63:5857:0:b0:46f:9763:a37b with SMTP id i23-20020a635857000000b0046f9763a37bmr59973361pgm.177.1670247925520; Mon, 05 Dec 2022 05:45:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247925; cv=none; d=google.com; s=arc-20160816; b=GihHfsmls24gzoN7EKtuq+amX8fmVES8z/PtEP0dqEegfkavhxCxm+Ey7kmrOyDW++ 3Vek+XZl4PU5QsdXOEUK3emhNqd2tS91gVONMPTvSh7sPuW3iD0jwAOIsUlrNkETDbH8 3lflGCOI9v/EcVv1kLiFs5E8dJgCPa1dwLuCZOhTUZMBWjtoAbSDXBaaaPDW/UCudeY+ jXhFKwkjwc4OYZE5FaWVye3NrTThBUmhrEygv14RI2jbMZVznHh1pMpTFTb2Z+lpUQJH y+krzSONeBR2KoL1guPJfZ1TKKrj5CTQbu3f+FfG+W0Z6Vsg44NkOJsgj9cuc8u2aIgU 5PlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cSAUMQryQDgPBphaABLqQW5tZ4THRAR2cJj4LKeGPEs=; b=sLSUY+qcEgvjss24wf0lUS+sESMBVbVdFSYtxUFVGeaIslTPWdE79kB31sufpQs6Dj Vd+BbeISITtndqHrzIT/HQCVaOIDZLXdGUeoV8FFwKMZPE+/fRjeXnW5FcEYoaKOhilC eIp17bbUOsYcf6GtsUQcF0q58zxjF/2lKSapj05raSOQoFGCISkw95VxNg5SBLOhiHBl nEKVLLBf1+NtthLOiY5lrYoM06mOdLMMNR6d6RLLiUzaTozFX0fRobz+48PaY+3RiCZM T/PiGJ8+Jrrlaqz1i2OZCfAZH4mgXcn3f1TQXRsEIiE36k4Q0CHZ0neSWCq1ZdVF3h9h UDOQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a056a00245100b0056e3b664403si15310138pfj.298.2022.12.05.05.45.12; Mon, 05 Dec 2022 05:45:25 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbiLENmS (ORCPT + 99 others); Mon, 5 Dec 2022 08:42:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232143AbiLENmO (ORCPT ); Mon, 5 Dec 2022 08:42:14 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D3EE1CFF2; Mon, 5 Dec 2022 05:42:09 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 031A7FF808; Mon, 5 Dec 2022 13:41:50 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 5/9] ARM: dts: sunxi: fix touchscreen reset GPIO polarity on Wexler TAB7200 tablet Date: Mon, 5 Dec 2022 14:40:34 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-5-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381888740674280?= X-GMAIL-MSGID: =?utf-8?q?1751381888740674280?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts index fef02fcbbdf82..8c79ecdb40608 100644 --- a/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +++ b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts @@ -114,7 +114,7 @@ gt911: touchscreen@5d { interrupt-parent = <&pio>; interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ - reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ + reset-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>; /* RST (PB13) */ touchscreen-swapped-x-y; }; }; From patchwork Mon Dec 5 13:40:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29684 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2261499wrr; Mon, 5 Dec 2022 05:45:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iV5CZwkmKaTx1VgVshe4YDVnWQ+tMmELNFfknL4tDnKwgQ80Dq71XJiraLxe/bwEsT4Gj X-Received: by 2002:a17:903:268f:b0:189:e28d:90fe with SMTP id jf15-20020a170903268f00b00189e28d90femr1512801plb.45.1670247941169; Mon, 05 Dec 2022 05:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247941; cv=none; d=google.com; s=arc-20160816; b=S3z0ASfYfy4REeHvDUuoqmUAAjIY9QEcZpjSP9n420AbJb7ODVikXCwdikys6z0Z+z gsSGUdU/Bimwosk9CNEqF658PrfNoChbaL4Kh0GeLg2g2A8vMnzL0lh3Hs9eTQG4AzYD 8DJOMW0uszZpIrNQeJbeOzh87nB3E2Vu7lAHGiAEg/XFd3tUqgbzxDJdjjcaVxK9814l 1NFt4g3d4w7hx8j9AZh3OesddG/ZSLxcXlspzgpVhL/MH4qAuUPhQ6yYBhMqhRYTnMon pUmOTxwv0uIIoEZljGqk+x6mhU1hTmZGxODS+6kV20JgA/qWvklLjL3MmRbxWb6paCYF VmOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I+xC7A3ZLj3ga0Yz894wfNBsgGC2Z48qyKjDNLbzYjk=; b=uJuSt0HxLL6Ns2xxegskFdV74od4IaGhEu389FpiUUldYR2+9FQApUL2ELQwPljU8l zn7u0oal/Ck83PMGXfa4f+0asnKp9hmC3Qhnb/1uwpiE+MQZWjruCZoP+FdHnIIQRr5Y YLMbs6V/QD6Rc3SG0g8D01R2HUSkFAsMDuC2WE1c7ODWR71QCrvnOPNmK3abCXR9oI6L 8s1jJEFrPEOtCVdFrZlzC1i9yBElV7qKYvGjjrJYYkUioLfAEPHHNNPVGOrPBOmVb35x 1NslXS0YGuqS6RN+ZnqPOc7a6h01V2y6IfeeLIdIDh6OOGjr0acqLzdS604SU0/CfSa1 NMAg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a170902e88a00b00188dba5d7dbsi16069765plg.78.2022.12.05.05.45.26; Mon, 05 Dec 2022 05:45:41 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbiLENml (ORCPT + 99 others); Mon, 5 Dec 2022 08:42:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232234AbiLENmf (ORCPT ); Mon, 5 Dec 2022 08:42:35 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC191D0F8; Mon, 5 Dec 2022 05:42:31 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id B22AFFF815; Mon, 5 Dec 2022 13:42:07 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 6/9] arm64: dts: allwinner: fix touchscreen reset GPIO polarity Date: Mon, 5 Dec 2022 14:40:35 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-6-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381905215134497?= X-GMAIL-MSGID: =?utf-8?q?1751381905215134497?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz --- arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts index 8233582f62881..5fd581037d987 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -122,7 +122,7 @@ touchscreen@5d { interrupt-parent = <&pio>; interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>; irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* CTP-INT: PH4 */ - reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* CTP-RST: PH8 */ + reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* CTP-RST: PH8 */ touchscreen-inverted-x; touchscreen-inverted-y; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts index 577f9e1d08a14..990f042f5a5b1 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts @@ -45,7 +45,7 @@ touchscreen@5d { interrupt-parent = <&pio>; interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>; irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* CTP-INT: PH4 */ - reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* CTP-RST: PH11 */ + reset-gpios = <&pio 7 11 GPIO_ACTIVE_LOW>; /* CTP-RST: PH11 */ touchscreen-inverted-x; touchscreen-inverted-y; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 87847116ab6d9..97359cc7f13e2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -167,7 +167,7 @@ touchscreen@5d { interrupt-parent = <&pio>; interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ + reset-gpios = <&pio 7 11 GPIO_ACTIVE_LOW>; /* PH11 */ AVDD28-supply = <®_ldo_io0>; VDDIO-supply = <®_ldo_io0>; touchscreen-size-x = <720>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts index 0a5607f73049e..c0eccc753e3f5 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts @@ -189,7 +189,7 @@ touchscreen@5d { interrupt-parent = <&pio>; interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ AVDD28-supply = <®_ldo_io1>; }; }; From patchwork Mon Dec 5 13:40:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29685 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2261739wrr; Mon, 5 Dec 2022 05:46:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NfumNc9sWKW6sT/VwUkGOHtBCHZEiSXxE7Cmuz5YLeGfu4ouOfxbGTTn9wbb2ygkGtF+p X-Received: by 2002:a17:906:658:b0:7ae:df97:9ff4 with SMTP id t24-20020a170906065800b007aedf979ff4mr20645060ejb.762.1670247964753; Mon, 05 Dec 2022 05:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670247964; cv=none; d=google.com; s=arc-20160816; b=q097FEJs7zG2i1wbd7q2XA1BCVq2X3uUaxeO/A5+BAw7x3PsBmgJ7kV2S0iq0h1yTb jrK0rArh+hZBcYf51efYr/gh8s69OJnzOYeLBZV7Csw54M4a91EaUq7BlvUHhRejK0/M 4raHnqXx03/JxHePmGHV7Hs2AK7Kf68lZ55GJqzGPq2PuRE1L5eOh/9CPTvEx0XjfzTw ov6+tbuLXsiEkEGH7REGC2xsEzYWQJ/e7QC1fHhfO6P5SPQgIyn8haRS4hayGZsXf6Gm Q7bU8W+3nBTqRvQBTvLrxbKrnG0b9g3nYdR12G2A2R8lHEavjMLG/JtOcFaF+r97gbWY gObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7RnDlUq5Nn/6ZxQdNXH+yUB6S5jPzFvBkJluQnSZlto=; b=PVqAGHhb683VPWORe4AtOZO9nTl5qrfhnxIDuvF3ZewONXguMD0mfvqkh6KkfQVlL0 okfr242Nj6dCWHYsclJ2JRLVfmkaOrM1HsYVg2RGtOFpJnwCih/khqA4mtfhXj65qTHF 4FQ5b8IJ6Rd6K2GILXduYrTJ7Fw8qjddJqrjVxS44cd+L4k/oDbbkG+trh13dczKJOsj 9J0z517sftR8gorMx760s5gs+wySDKTMytyehDTAgCOAro7tckZWseYAxtjw1v2e9jpG NrPFVkbvOnkiwze+vF2cJ1EuzNUhAm+dCc5wZhJ9oQ4s+yLc1SiCHLun+NODB2FTKcTz ShQQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx24-20020a0564020b5800b0046c81f2ef40si3700920edb.493.2022.12.05.05.45.39; Mon, 05 Dec 2022 05:46:04 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbiLENnE (ORCPT + 99 others); Mon, 5 Dec 2022 08:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbiLENmn (ORCPT ); Mon, 5 Dec 2022 08:42:43 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D73F119B; Mon, 5 Dec 2022 05:42:41 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 5BA12FF802; Mon, 5 Dec 2022 13:42:29 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 7/9] arm64: dts: librem5: fix touchscreen reset GPIO polarity Date: Mon, 5 Dec 2022 14:40:36 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-7-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751381930129735332?= X-GMAIL-MSGID: =?utf-8?q?1751381930129735332?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz --- arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 6445c6b90b5bb..b038300812b1e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -542,7 +542,7 @@ touchscreen@5d { pinctrl-0 = <&pinctrl_ts>; interrupt-parent = <&gpio3>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; irq-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; touchscreen-size-x = <720>; touchscreen-size-y = <1440>; From patchwork Mon Dec 5 13:40:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29688 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2263180wrr; Mon, 5 Dec 2022 05:48:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6v4mROYZIakU1ibQM2orVkBCyqjipP7KkVAGtmAZchAFpP7jHCunlhbamjSfac42DRgU99 X-Received: by 2002:a17:902:8493:b0:189:a3b9:d9a with SMTP id c19-20020a170902849300b00189a3b90d9amr28993618plo.155.1670248095497; Mon, 05 Dec 2022 05:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670248095; cv=none; d=google.com; s=arc-20160816; b=Xhc0UvnfWNtoQ2R8FBhJjQdps0PKnH2bG0ICArht0bbKRglwmYLVfLhkMcvbRf1AlT yRpgvH4aIEojlYIsIci/fsyOSrCDNFp5zbKqPmTAe+IUH2Ho48nl6jv2YSN7fdKDMFXl LR2Tjc9ixjhKpR/it4dEPTM4Epusz9uZLGy4xqWJNmLCL+F1EejMo8XAm3yhr/f1Csfu 7Hf8HpLp8RUy6NyUuKAtp/0nhKQmGuFCnw44DItFlg9dSEWbIigbknCFTrk5K69FZprY dsjNrcjNHp+9EuOLfAcGfSAJRu072/na+wsyGIIFSZlejF6sXI/AsFS/1Z4dXGotfUi+ Af4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Q8Sl5Vg+CGP9P16iXNzd9QMdYzJTevv6wLO9O4/LWr8=; b=Ts8OsVK+J6HRDN2TsObOXI556wq54LRH0iFWRR5N2WLXDzO07g4+sFBPFVc093n5oS z5OnvObZ9WPEPq3qntMaO96keFGzsNyqUFBB6FuroyhR+Qh5pDV0IKFqAazPPiu3RRHb FfH3mOkr0oV6BYGKSf6cWkDUOmE8BNa/hhaP9LJOvddtEKDOT3kRsEdUqrrSWzrnRLki 0U3AOC1/dgRtATiodiS3BICQHFMqzZNIOt/UcaAwvkD8x0zrHFhhF1FOgdltL/L/Nm8s d+TyOD4vxK0o0oXdXr4yg6EFl715Mm+mHomyAxO4ROaVzEG6n/lxTR8N/EwWSTUY5esW tOTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i24-20020a63cd18000000b00477b4b7703dsi14001326pgg.78.2022.12.05.05.48.01; Mon, 05 Dec 2022 05:48:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232384AbiLENnq (ORCPT + 99 others); Mon, 5 Dec 2022 08:43:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232381AbiLENnW (ORCPT ); Mon, 5 Dec 2022 08:43:22 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8BA51B1EA; Mon, 5 Dec 2022 05:42:57 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id E6ABCFF808; Mon, 5 Dec 2022 13:42:40 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 8/9] arm64: dts: qcom: msm8998-fxtec: fix touchscreen reset GPIO polarity Date: Mon, 5 Dec 2022 14:40:37 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-8-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751382066812433526?= X-GMAIL-MSGID: =?utf-8?q?1751382066812433526?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz --- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts b/arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts index 429ba57e20f71..8f738cade2652 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts +++ b/arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts @@ -249,7 +249,7 @@ touchscreen@14 { reg = <0x14>; interrupt-parent = <&tlmm>; interrupts = <125 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; + reset-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; AVDD28-supply = <&vreg_l28_3p0>; VDDIO-supply = <&ts_vio_vreg>; pinctrl-names = "active"; From patchwork Mon Dec 5 13:40:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 29690 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2263640wrr; Mon, 5 Dec 2022 05:49:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf4X0No8H0BdHQsdtk/L9b9cbxKEVgD32r/GRF/4+lAmMmaEi3fUl1kONelPT+lEQzNm9h+5 X-Received: by 2002:a17:907:98ed:b0:7c0:e7a6:cd2d with SMTP id ke13-20020a17090798ed00b007c0e7a6cd2dmr5416331ejc.317.1670248150356; Mon, 05 Dec 2022 05:49:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670248150; cv=none; d=google.com; s=arc-20160816; b=u+Ed1fDV/GB2thJk3sIMVzLXAYjP7wbeCYZjEWeyIuNNi7v01v+GMEuq6R8y6EfDiN 0QB8JE39ZhwIhjwJ3gDFnwDN9TJHNQESzMghuBAuws3jfarr5TcgXw03nCz3ecc9IFhf GJkS30TqRlYyE5E33rzCV+VjeJz6Ib3vaOZDEAW2jUEz124KZx7mxODBcC5ItjZ5DklX msVz55LODolcEH93410M+wp1Lqyhw6PLm975ggr9PkCZy3Qn2hb6cHwHW1vyWGxMvuuJ 4/bJjJctsidSBTMfYXD8KehSpoS6GY75TA/Gqzr4BTeDalhr/wFEU7NAvK3s181i8Ms5 BtDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=51D9ZPRWNz536gtdLKyX2gZH+14mwbq+xFzOsweR0rw=; b=OpokiCFZpnq7ytybvx9Can5sq1a/iIuLKRmhfA43pByuvaBOS1cIJo5/Zhb7gB8wXG gNY/weyyoSzwJDTb8eBgpDBei6ILb7zN38hZK31FFC9qitqeoRqK+RzIhnVOFWXt1fA/ PHtqs+9lXdxOBcERP3eYzxzUCZ/DoG6lWAK4OVB/UR4tOClcJJYD7A2NxyXz2guMa5Jw 3/uRrQ4WSKlLeBGnv1wFsQv2iuklzNUX3ua7j/pJdx/s00IwF2EwFU7/11rjvSsE9q7X 43hlfOKd4dYtV9tvXcyzsf2orT2REQdRErhT9NKlLh591krHXBg6yhCg30SwJVQdRIHa /nlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb29-20020a1709076d9d00b0078dcdbb3e87si10110799ejc.530.2022.12.05.05.48.46; Mon, 05 Dec 2022 05:49:10 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232398AbiLENoe (ORCPT + 99 others); Mon, 5 Dec 2022 08:44:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbiLENoA (ORCPT ); Mon, 5 Dec 2022 08:44:00 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 626E91DF05; Mon, 5 Dec 2022 05:43:25 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 94B6DFF80A; Mon, 5 Dec 2022 13:42:52 +0000 (UTC) From: Quentin Schulz To: Samuel Holland , Bastien Nocera , =?utf-8?q?Guido_G=C3=BCnther?= , Sascha Hauer , Pengutronix Kernel Team , Angus Ainslie , Ondrej Jirman , Icenowy Zheng , Andy Gross , Aleksei Mamlin , Fabio Estevam , David Jander , Frieder Schrempf , Bjorn Andersson , Konrad Dybcio , Peter Geis , Heiko Stuebner , Shawn Guo , Jernej Skrabec , Lukasz Majewski , AngeloGioacchino Del Regno , Chen-Yu Tsai , Michael Riesch , Rob Herring , NXP Linux Team , Dmitry Torokhov , Hans de Goede , Jagan Teki , Krzysztof Kozlowski Cc: Quentin Schulz , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 9/9] arm64: dts: rockchip: fix touchscreen reset GPIO polarity Date: Mon, 5 Dec 2022 14:40:38 +0100 Message-Id: <20221103-upstream-goodix-reset-v3-9-0975809eb183@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> References: <20221103-upstream-goodix-reset-v3-0-0975809eb183@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751382124244835936?= X-GMAIL-MSGID: =?utf-8?q?1751382124244835936?= From: Quentin Schulz The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz Acked-by: Michael Riesch --- arch/arm64/boot/dts/rockchip/px30-evb.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/px30-evb.dts b/arch/arm64/boot/dts/rockchip/px30-evb.dts index c1bbd555f5f5b..2087dc7299446 100644 --- a/arch/arm64/boot/dts/rockchip/px30-evb.dts +++ b/arch/arm64/boot/dts/rockchip/px30-evb.dts @@ -420,7 +420,7 @@ touchscreen@14 { interrupt-parent = <&gpio0>; interrupts = ; irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>; VDDIO-supply = <&vcc3v3_lcd>; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 78157521e9449..e63491fb443be 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -588,7 +588,7 @@ touch: touchscreen@5d { AVDD28-supply = <&vcc3v0_touch>; VDDIO-supply = <&vcc3v0_touch>; irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>; status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts index 674792567fa6e..234531aaa430a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts @@ -495,7 +495,7 @@ touchscreen0: goodix@14 { irq-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&touch_int &touch_rst>; - reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>; VDDIO-supply = <&vcc3v3_lcd0_n>; }; };