Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1729682rwi; Thu, 3 Nov 2022 08:27:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM57SmOsfu7k8BFTLld0CFMEpTCamwzW0ZCSgByWU3oY4z6KjsrzEmH9+38c1TOUILdGFkey X-Received: by 2002:a17:907:7704:b0:780:da38:4480 with SMTP id kw4-20020a170907770400b00780da384480mr30023132ejc.64.1667489251953; Thu, 03 Nov 2022 08:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667489251; cv=none; d=google.com; s=arc-20160816; b=R/7B49rwt0Vi/kIUol/+6SoBfjRa8rugf+T/R/940bTuInV9JWPE814Hz+YKOUH2Ul Fvcg5ZiTzx3P0eeimOy1I7gFS3KfIDHiBSKuqrqCj8wCcrIMXrq6s/ouMle389r1I8We B7LWSov+isFA/xuU5ugvJnLTnh8EiddyeKBXtaPBJjE+jIxC16szfs0qbDUCUVI0Z7Tz Ij7c3zFIHE/JNIhwSmQxUoZWjbtsUx8K9GgUgsc5qXeu7ppmtHaVJUwQgPFj2sCWnr5/ ovp3Ika5zpWjp+PejSonQBCdiTZdPzqIWMRZNoyA7ZocYaUNJXQqazTlfoSozxcOdOdn oVog== 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 :message-id:date:subject:cc:to:from; bh=cWqCgG8WYD6ctSD0tgkk/W2LB2B6juryOBqFZTYBfCI=; b=M3Pxzv35J4YjipiL5lcOZCD0yh6ty8baAjq9yXN3ciB+/zASaOu/+tggIwv3It5eTD p0R0EAdfPFdkCDPP2eM8sn4zIndThy0XoF4oVzzGZR9OVWaw2p0io6K6c56uJiLqV7RV ZsEIzYFC9bQjyJueWML7wBnx8uX3kx7sTCO/S3LKHaNFBW4hscxmq2uMWtzmEq7YLRMS /1rszVEp1u8PU7WUxL90r3TTppzSrB4ABk9IVBRuwflSTw5JRuhdyvH6a2Fj53yJBY75 5hzN+lAbHb89hzF2aKaDA8b19q0A8oBzz3XX3EWqbwQnOQP3Ym3VFxniyeD3oUG4DRi3 MJ/g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a170906369600b0078da42195c2si1232942ejc.547.2022.11.03.08.26.56; Thu, 03 Nov 2022 08:27:31 -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; 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 S231702AbiKCOoa (ORCPT + 97 others); Thu, 3 Nov 2022 10:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbiKCOoW (ORCPT ); Thu, 3 Nov 2022 10:44:22 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C27630E; Thu, 3 Nov 2022 07:44:20 -0700 (PDT) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id D516B10000E; Thu, 3 Nov 2022 14:44:06 +0000 (UTC) From: Quentin Schulz To: hadess@hadess.net, hdegoede@redhat.com, dmitry.torokhov@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@somainline.org, heiko@sntech.de Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, Quentin Schulz Subject: [RFC PATCH 0/7] fix reset line polarity for Goodix touchscreen controllers Date: Thu, 3 Nov 2022 15:43:45 +0100 Message-Id: <20221103-upstream-goodix-reset-v1-0-87b49ae589f1@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, 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 The Goodix touchscreen controller has a reset line active low. It happens to also be used to configure its i2c address at runtime. If the reset line is incorrectly asserted, the address will be wrongly configured. This cost me a few hours yesterday, trying to figure out why the touchscreen wouldn't work. The driver is "asserting" this reset GPIO by setting its output to 0, probably to reflect the physical state of the line. However, this relies on the fact that the Device Tree node setting the reset line polarity to active high, which is incorrect since the reset is active low in hardware. To fix this inconsistency, the polarity is inverted to not confuse the user about the reset line polarity. This is marked as RFC because it breaks DT compatibility and also the Google CoachZ device is the only one with an active low polarity for the reset GPIO in DT, so not sure if it is a typo or its state is actually inverted (so GPIO active high to drive the reset line low). Changing it anyways since the polarity is changed in the driver so it needs to be changed in DT too. I'm all ears if there's a better way to handle this. We could document this in the DT binding but this kinda breaks the promise we make that the DT is not bound to the driver implementation. Thanks, Quentin To: Bastien Nocera To: Hans de Goede To: Dmitry Torokhov To: Rob Herring To: Krzysztof Kozlowski To: Shawn Guo To: Sascha Hauer To: Pengutronix Kernel Team To: Fabio Estevam To: NXP Linux Team To: Chen-Yu Tsai To: Jernej Skrabec To: Samuel Holland To: Andy Gross To: Bjorn Andersson To: Konrad Dybcio To: Heiko Stuebner Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: linux-arm-msm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Quentin Schulz --- Quentin Schulz (7): Input: goodix - fix reset polarity ARM: dts: imx: fix touchscreen reset GPIO polarity ARM: dts: sunxi: fix touchscreen reset GPIO polarity arm64: dts: allwinner: fix touchscreen reset GPIO polarity arm64: dts: imx: fix touchscreen reset GPIO polarity arm64: dts: qcom: fix touchscreen reset GPIO polarity arm64: dts: rockchip: fix touchscreen reset GPIO polarity arch/arm/boot/dts/imx6q-kp.dtsi | 2 +- arch/arm/boot/dts/imx6ul-kontron-bl-43.dts | 2 +- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 2 +- 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 +- arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-mrbland.dtsi | 2 +- 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 +- drivers/input/touchscreen/goodix.c | 4 ++-- 17 files changed, 18 insertions(+), 18 deletions(-) --- base-commit: 8e5423e991e8cd0988d0c4a3f4ac4ca1af7d148a change-id: 20221103-upstream-goodix-reset-aa1c65994f57 Best regards, -- Quentin Schulz