Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
To: David Jander <david@protonic.nl>, Fabio Estevam <festevam@gmail.com>
Cc: Quentin Schulz <foss+kernel@0leil.net>,
	"Angus Ainslie (Purism)" <angus@akkea.ca>,
	Shawn Guo <shawnguo@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Samuel Holland <samuel@sholland.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Bastien Nocera <hadess@hadess.net>, Chen-Yu Tsai <wens@csie.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Hans de Goede <hdegoede@redhat.com>,
	Andy Gross <agross@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC v2 5/7] arm64: dts: imx: fix touchscreen reset GPIO polarity
Date: Tue, 22 Nov 2022 10:58:07 +0100	[thread overview]
Message-ID: <907b9321-14dc-dc99-80fc-e1a20ee33a1e@theobroma-systems.com> (raw)
In-Reply-To: <20221122081851.6cb762d8@erd992>

Hi David,

Thanks Fabio for the Cc.

On 11/22/22 08:18, David Jander wrote:
> On Mon, 21 Nov 2022 15:18:32 -0300
> Fabio Estevam <festevam@gmail.com> wrote:
> 
>> [Adding Angus and David]
> 
> Thanks. This was apparently necessary ;-)
> 
>> On Mon, Nov 21, 2022 at 3:12 PM Quentin Schulz <foss+kernel@0leil.net> wrote:
>>>
>>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>>
>>> 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 <quentin.schulz@theobroma-systems.com>
>>> ---
>>>   arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts         | 2 +-
>>>   arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +-
>>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts b/arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts
>>> index 9fbbbb556c0b3..df7e5ae9698e1 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-prt8mm.dts
>>> @@ -107,7 +107,7 @@ touchscreeen@5d {
>>>                  interrupt-parent = <&gpio1>;
>>>                  interrupts = <8 IRQ_TYPE_NONE>;
>>>                  irq-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
>>> -               reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
>>> +               reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
> 
> NACK!
> 
> The PRT8MM has an inverter in the reset line. The reason for that is that the
> reset line needs to be inactive when the driving side is unpowered.
> The DT was correct, this change will break it.
> 

The DT was correct. The implementation in the driver is changed (the 
polarity is swapped) in this patch series, therefore the DT isn't 
correct anymore, hence this patch.

See 
https://lore.kernel.org/linux-input/20221103-upstream-goodix-reset-v2-0-2c38fb03a300@theobroma-systems.com/ 
for the whole patch series.

This DT patch alone is obviously incorrect, but the context around it 
matters. I could/should have made it all into one big patch, the 
question is then how this big tree-crossing patch would be merged into 
Linux (if there's consensus). We're not there yet.

For some additional background on the discussion that was had in the v1:
https://lore.kernel.org/all/267de96a-0129-a97d-9bf6-e1001b422a1a@theobroma-systems.com/
I messed up the Cc list in the v1, apologies for the missing context in 
the archived mails, I think one should be able to understand the 
important bits by reading the answers in-mail. There, Dmitry, Hans and I 
discussed the meaning of the active level of GPIOs/reset lines and I 
expressed the reasons for such a change (which are also listed in the 
cover letter of this patch series).

As stated in v1 cover letter, no implementation will satisfy every one. 
We either make the DT binding implementation specific (which is what it 
shouldn't be), or we swap the polarity in the Linux implementation and 
thus the DT but then break DT backward compatibility.

Cheers,
Quentin

  reply	other threads:[~2022-11-22  9:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 17:17 [PATCH RFC v2 0/7] fix reset line polarity for Goodix touchscreen controllers Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 1/7] Input: goodix - fix reset polarity Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 2/7] ARM: dts: imx: fix touchscreen reset GPIO polarity Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 3/7] ARM: dts: sunxi: " Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 4/7] arm64: dts: allwinner: " Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 5/7] arm64: dts: imx: " Quentin Schulz
2022-11-21 18:18   ` Fabio Estevam
2022-11-22  7:18     ` David Jander
2022-11-22  9:58       ` Quentin Schulz [this message]
2022-11-22 12:46         ` Robin Murphy
2022-11-22 16:22           ` Quentin Schulz
2022-11-23  8:07             ` David Jander
2022-11-21 17:17 ` [PATCH RFC v2 6/7] arm64: dts: qcom: " Quentin Schulz
2022-11-21 17:17 ` [PATCH RFC v2 7/7] arm64: dts: rockchip: " Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=907b9321-14dc-dc99-80fc-e1a20ee33a1e@theobroma-systems.com \
    --to=quentin.schulz@theobroma-systems.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=angus@akkea.ca \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=foss+kernel@0leil.net \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=heiko@sntech.de \
    --cc=jernej.skrabec@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel@sholland.org \
    --cc=shawnguo@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox