| Message ID | 20250918155240.2536852-4-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBUOVWDDAMGQETSQTILY@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com
[209.85.218.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A54323F14F
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 18 Sep 2025 17:52:50 +0200 (CEST)
Received: by mail-ej1-f72.google.com with SMTP id
a640c23a62f3a-b0413074929sf16402066b.0
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 18 Sep 2025 08:52:50 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1758210770; cv=pass;
d=google.com; s=arc-20240605;
b=E408c77Q4vXL2tWhxqwZZCsLnMATEd2wfS+fjrZqkNlIbnu+JnttO7+o5afakA5SUb
mYawA+2RgXwk6BuqIOh2DRE/X/jZVolTOwaXxwWiDk1tknCCdtYTRCLEixaZ2y5jNRJL
fRlVr1lUUD8atEMYhf+0xZ50rpp6PItDH1bbr/uVFEYVRMuQLPjmWPUccESZM/dJXTqX
KZlqSZS2cogeg/tGU72gVwQzQlHayIaWvCSpJaK8MIDO1Enu9k2H9eU0fxJyC0r2kwDX
Hcik+O9bkSG2OrR7XjfWnici926s37ms9K9VlO5K4a3vh4IKe+tSCDtkuVNZmFLEXgSJ
E1gA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=+CRg+0kN1di9Ed8gLahDsPdrHvKRQCEO59PNnWM+zDs=;
fh=Rn6z5wMLDmFbOCxjAoclWZDtXUqyBmKJC+WpgQaREE8=;
b=lY+SABeSbcznPJ6E1YGRsWYIpvafqci7qZ9nbJBHxT7dapJjySV4wQgwCaRTbLOzCF
fa6+ZXW0VbPCGUDSGRnKkbAqAoF9i5B3v6L3yYQxzUJQYly1dDLc6bzD4RC+6h4OxgaL
V9mdulxXScpV2YGZBUIyBCrQ7sisdtSsgn7+5CKzbh2kV61TCLqk3lv162ImvTC0VeFg
b8yPeDgE6Nlb+HHMaASzjeMz2evz+nD+LejgLlcWoKVQv2ThWDlMr+SQMdRL0dx0rGyi
iyOec1KoFmZfZV5+bqaPuii/Z+dky0dG3q3S1fF1FgG/RBtXdfkQi86IXwdV2KWCY3H/
Pw1w==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=rcdB4Uqq;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1758210770; x=1758815570;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=+CRg+0kN1di9Ed8gLahDsPdrHvKRQCEO59PNnWM+zDs=;
b=KFtwaBLuH351aPrrycmQP5SY+DXNOZkLJ9bg8tfIP5KKJFkk0pTWHhmKwIHHP2VaoO
k85l9HLMgegglpGaPSsSADh6+gH1xTUcCpPFOlIwG/ytlmAlzoQsMtD8wZKXYiy2N1wT
bpmwQnd8mMgm1k+BLY2Ayf1ioeokKRKjtGEwI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1758210770; x=1758815570;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from
:x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=+CRg+0kN1di9Ed8gLahDsPdrHvKRQCEO59PNnWM+zDs=;
b=l6ZAMsOuvhqoD2e4zmubTaZQa5KxOly/Awz3uVl+NwMAWaFJB8A6AEmwe96J8lOMeW
EVFveNP8dzpum94ugejM2MjJcv8gsCug0TrZ74L3GKGeOKd+0XYeBhVGWh+19hNPn4AQ
OrMNdglxCjnu0fyERaKBLRW+IcRJZoBu4SDw/eirmM+Gv/iyImBmzMUB+Bjom3omotBI
iLq8NKp8Llt3wcNCAB47ywpPU5JaNXJYNO+ElAHYV8F8S9hfRWeGe0MOtnA1xzasgyL8
rvv0oIRooG7umblqqjrsuGHNcDLOetvZ+JGeKlflz44PYuEdAPjWcaDl+jzDFykZnPHr
g8tQ==
X-Forwarded-Encrypted: i=2;
AJvYcCUR4g0FNj2p/tUFF+WJjM+rjMNf1Pjg7ZtMoF+/D61QFSg7xJOiZGHA34oRjk09Yw8WKHJiTOkfnOo7Ybon@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YzXPSWeAlFDDT9m7yXeM0kOrOYA6UAp7Z1Bz8ibAQiJDxUUwGVW
QvlQS6vIYso7cLDijejjVVXqb49jviH7SFXGXe0QrYGhpfKp777M1dm7dCJzSNg5HT9SWg==
X-Google-Smtp-Source:
AGHT+IE32kJh7HUISvhkZr9Kkil/uRanmZMxXbYu3RV07Cls6H6ZHQsMhgD4Cv4g/rWMh5fsrXJktg==
X-Received: by 2002:a05:6402:518b:b0:628:d1b5:d207 with SMTP id
4fb4d7f45d1cf-62f842191a2mr3049535a12.2.1758210770255;
Thu, 18 Sep 2025 08:52:50 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h=ARHlJd5E1U/UbwWt1Nap97FjPJm8SyU2vaak3q11OosKx9xbKQ==
Received: by 2002:a05:6402:23c8:b0:61c:c9e2:e4c6 with SMTP id
4fb4d7f45d1cf-62fa73600f3ls1069910a12.0.-pod-prod-01-eu; Thu, 18 Sep 2025
08:52:48 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCU415k+TATcmmX/fcp3x/mHqH12eFKCRbQKMM63pvgXIL1j4M/L2NBM1lpDlu+SciEq+2G26EUOseB6l6ca@amarulasolutions.com
X-Received: by 2002:a17:907:7e88:b0:b04:97a2:64f8 with SMTP id
a640c23a62f3a-b1bb86d78famr689618366b.2.1758210767949;
Thu, 18 Sep 2025 08:52:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1758210767; cv=none;
d=google.com; s=arc-20240605;
b=bbqb7JOf+0DiOqBMQtOwmb65BC636vkiQ5+G9Whkigz1WVLSO8eRYp0sWg47IFAu/v
/+b6PBJekn1B4ZFwhG5/MIFrOjclmzAKEwJnz3/wDAbJnWfO4Xna+vZVEHxhjwWkYE9w
ZmHvRoV0DBKeuCGQQ9zEJMJ3EjMI7YADouRZnLgJmdwcnremNFQvZTicTJaiH3Tbc2Xu
R362M9XdSCuMI60+YoYnbnsi6dIuoeA18QuTqzOqVICmTCxYirE7co6XilGxvf8KBCEG
YBnQE22qe/8aj//uHuPrca4s/SJbDgfXCMJEmQ3ReWcna2+eDhN2Pud1oGWTZU1ccZV2
iYUQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=b+LIVzIwJpub6PF+1VXdSXGpljd8+6HMYi55fOiXUgs=;
fh=buOXKd2sY2sp1LDmIKlSFPT2tTZQvvnO46lwc5lPDeE=;
b=S+feKylF3/FNqS6EF3P8bWy1MujMYRMtsBfMbtChWP1XA4QcAmzXmV81vn71/WUn41
Vhxw4/YOJ8c6lIxXnXo6Np1NrcRITett0H3SrggTU5O/jIhMcZDNCcYJ3l2KjxBJljw2
0q+SuxeSvzYoKsSRZBzLePXMMUDGunsdjfnHz7OAFDJ2iH3VlkmXk39Yt9n5YhS0Emv5
Z4Mj1k+JBL6NeJreaLnQ/QyZF6irKnZ6ech40CubnzQP+xbynGsUtierhRkH/sjorGwp
CY29QfLRfQrV/2wXdMwDveLbWmD6lRGVRAJWGzQ74Fc8JpsgJeL64q2G8TW7Uo+boWfu
N7iQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=rcdB4Uqq;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
a640c23a62f3a-b1fd36bfd02sor131001466b.16.2025.09.18.08.52.47
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Thu, 18 Sep 2025 08:52:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Forwarded-Encrypted: i=1;
AJvYcCV5uqWjCjKldmmoUjAtUIq7PxGACm4gngHRvJ+vB07BZsv5SZzqyj2hfRIyZeHcAEGJfk+FOXDFvTUeK7Ui@amarulasolutions.com
X-Gm-Gg: ASbGncsfvAVB/aNmKun+C3HNSFSu95dPS+E4JoZRZ6U9BQSZH9TMrigL6406KarXlcY
W/4cdilW996bcoDuCIO9+EHenLsr2U5BNpi3MKn3j+kq3uNJla3lymfJUvRz+J+DDS2NOjjl2kB
4twPuIlDZs4d6BbukpO7684W/8Fg0gwOH6JS3nYHIH6/1yK9BIAdmR8AVptU/yLvDos7JDGsrEr
Ve+s4fahtruebDl1O349zmnXKEA4tprI66xN7SxkVHhbd92+G3im86NeLHIuMzFFjhbcAiXx0f2
ZSgiIUKS3XOZ2odnt3TwuoGtKLE5fmCkm8P2GoPiZgnN7NC5wW5Wmzt2PiU5GKI4paUSEI9dDw/
GvSr5+9o7C69inTiU8H8SfM/otFKH4BtA2cltdMOIgWjuJDIrJSH9dg9nFrOQG5A/qB7XlofpAG
1sHa/J6jyxDLwttBW5ZsXL85HDGr+H9NcppL7FYVR5D42YsdmCw0Qo/OJbavCFeij92GnJkrKO+
vCpy8BOfMU=
X-Received: by 2002:a17:907:7e88:b0:b04:97a2:64f8 with SMTP id
a640c23a62f3a-b1bb86d78famr689615266b.2.1758210767474;
Thu, 18 Sep 2025 08:52:47 -0700 (PDT)
Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it
(host-82-56-38-125.retail.telecomitalia.it. [82.56.38.125])
by smtp.gmail.com with ESMTPSA id
a640c23a62f3a-b23a1227bacsm60449766b.41.2025.09.18.08.52.46
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 18 Sep 2025 08:52:47 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: Frank Li <Frank.Li@nxp.com>,
linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Conor Dooley <conor.dooley@microchip.com>,
Conor Dooley <conor+dt@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Javier Carrasco <javier.carrasco@wolfvision.net>,
Jeff LaBundy <jeff@labundy.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org,
linux-input@vger.kernel.org
Subject: [PATCH v5 3/6] dt-bindings: touchscreen: add
touchscreen-glitch-threshold-ns property
Date: Thu, 18 Sep 2025 17:52:31 +0200
Message-ID: <20250918155240.2536852-4-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250918155240.2536852-1-dario.binacchi@amarulasolutions.com>
References: <20250918155240.2536852-1-dario.binacchi@amarulasolutions.com>
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=rcdB4Uqq;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
Input: imx6ul_tsc - set glitch threshold by dts property
|
|
Commit Message
Dario Binacchi
Sept. 18, 2025, 3:52 p.m. UTC
Add support for glitch threshold configuration. A detected signal is valid only if it lasts longer than the set threshold; otherwise, it is regarded as a glitch. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> --- Changes in v5: - Add Acked-by tag of Conor Dooley Changes in v2: - Added in v2. .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > Add support for glitch threshold configuration. A detected signal is valid > only if it lasts longer than the set threshold; otherwise, it is regarded > as a glitch. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > --- > > Changes in v5: > - Add Acked-by tag of Conor Dooley > > Changes in v2: > - Added in v2. > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > index 3e3572aa483a..a60b4d08620d 100644 > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > @@ -206,6 +206,10 @@ properties: > > unevaluatedProperties: false > > + touchscreen-glitch-threshold-ns: > + description: Minimum duration in nanoseconds a signal must remain stable > + to be considered valid. What's wrong with debounce-delay-ms? To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Thu, Sep 18, 2025 at 10:04 PM Rob Herring <robh@kernel.org> wrote: > > On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > > Add support for glitch threshold configuration. A detected signal is valid > > only if it lasts longer than the set threshold; otherwise, it is regarded > > as a glitch. > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > --- > > > > Changes in v5: > > - Add Acked-by tag of Conor Dooley > > > > Changes in v2: > > - Added in v2. > > > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > index 3e3572aa483a..a60b4d08620d 100644 > > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > @@ -206,6 +206,10 @@ properties: > > > > unevaluatedProperties: false > > > > + touchscreen-glitch-threshold-ns: > > + description: Minimum duration in nanoseconds a signal must remain stable > > + to be considered valid. > > What's wrong with debounce-delay-ms? Do you mean that I should rename touchscreen-glitch-threshold-ns to debounce-delay-ms? Thanks and regards, Dario
On Thu, Sep 18, 2025 at 10:37:37PM +0200, Dario Binacchi wrote: > On Thu, Sep 18, 2025 at 10:04 PM Rob Herring <robh@kernel.org> wrote: > > > > On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > > > Add support for glitch threshold configuration. A detected signal is valid > > > only if it lasts longer than the set threshold; otherwise, it is regarded > > > as a glitch. > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > > > --- > > > > > > Changes in v5: > > > - Add Acked-by tag of Conor Dooley > > > > > > Changes in v2: > > > - Added in v2. > > > > > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > index 3e3572aa483a..a60b4d08620d 100644 > > > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > @@ -206,6 +206,10 @@ properties: > > > > > > unevaluatedProperties: false > > > > > > + touchscreen-glitch-threshold-ns: > > > + description: Minimum duration in nanoseconds a signal must remain stable > > > + to be considered valid. > > > > What's wrong with debounce-delay-ms? > > Do you mean that I should rename touchscreen-glitch-threshold-ns to > debounce-delay-ms? I mean that's the common property we already have, so use it or explain why you aren't using it. I suppose the definition is technically a bit different if it's purely a s/w delay vs. h/w monitoring of the signal state. I don't think it matters if the interpretation by each driver is a bit different. Maybe msec is not enough resolution for you could be another reason? Looks like your h/w supports that assuming the clock frequency is 10s of MHz. But are touchscreen glitches really in sub msec times? Not in my experience, but that's 20 years ago on resistive touchscreens... Rob To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Fri, Sep 19, 2025 at 4:38 PM Rob Herring <robh@kernel.org> wrote: > > On Thu, Sep 18, 2025 at 10:37:37PM +0200, Dario Binacchi wrote: > > On Thu, Sep 18, 2025 at 10:04 PM Rob Herring <robh@kernel.org> wrote: > > > > > > On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > > > > Add support for glitch threshold configuration. A detected signal is valid > > > > only if it lasts longer than the set threshold; otherwise, it is regarded > > > > as a glitch. > > > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > > > > > --- > > > > > > > > Changes in v5: > > > > - Add Acked-by tag of Conor Dooley > > > > > > > > Changes in v2: > > > > - Added in v2. > > > > > > > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > index 3e3572aa483a..a60b4d08620d 100644 > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > @@ -206,6 +206,10 @@ properties: > > > > > > > > unevaluatedProperties: false > > > > > > > > + touchscreen-glitch-threshold-ns: > > > > + description: Minimum duration in nanoseconds a signal must remain stable > > > > + to be considered valid. > > > > > > What's wrong with debounce-delay-ms? > > > > Do you mean that I should rename touchscreen-glitch-threshold-ns to > > debounce-delay-ms? > > I mean that's the common property we already have, so use it or explain > why you aren't using it. I suppose the definition is technically a bit > different if it's purely a s/w delay vs. h/w monitoring of the signal > state. I don't think it matters if the interpretation by each driver is > a bit different. > > Maybe msec is not enough resolution for you could be another reason? Yes, this is the main reason. As specified in the following patch: v5 4/6 dt-bindings: touchscreen: fsl,imx6ul-tsc: support glitch threshold Drivers must convert this value to IPG clock cycles and map it to one of the four discrete thresholds exposed by the TSC_DEBUG_MODE2 register: 0: 8191 IPG cycles 1: 4095 IPG cycles 2: 2047 IPG cycles 3: 1023 IPG cycles In my case, the IPG clock runs at 66 MHz, which corresponds to: 124 µs for 0 62 µs for 1 31 us for 2 15 us for 3 So using milliseconds would not fit my use case. A possible trade-off could be to use debounce-delay-us. Would that be acceptable? Thanks and regards Dario > Looks like your h/w supports that assuming the clock frequency is 10s > of MHz. But are touchscreen glitches really in sub msec times? Not in my > experience, but that's 20 years ago on resistive touchscreens... > > Rob
On Fri, Sep 19, 2025 at 05:12:42PM +0200, Dario Binacchi wrote: > On Fri, Sep 19, 2025 at 4:38 PM Rob Herring <robh@kernel.org> wrote: > > > > On Thu, Sep 18, 2025 at 10:37:37PM +0200, Dario Binacchi wrote: > > > On Thu, Sep 18, 2025 at 10:04 PM Rob Herring <robh@kernel.org> wrote: > > > > > > > > On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > > > > > Add support for glitch threshold configuration. A detected signal is valid > > > > > only if it lasts longer than the set threshold; otherwise, it is regarded > > > > > as a glitch. > > > > > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > > > > > > > --- > > > > > > > > > > Changes in v5: > > > > > - Add Acked-by tag of Conor Dooley > > > > > > > > > > Changes in v2: > > > > > - Added in v2. > > > > > > > > > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > index 3e3572aa483a..a60b4d08620d 100644 > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > @@ -206,6 +206,10 @@ properties: > > > > > > > > > > unevaluatedProperties: false > > > > > > > > > > + touchscreen-glitch-threshold-ns: > > > > > + description: Minimum duration in nanoseconds a signal must remain stable > > > > > + to be considered valid. > > > > > > > > What's wrong with debounce-delay-ms? > > > > > > Do you mean that I should rename touchscreen-glitch-threshold-ns to > > > debounce-delay-ms? > > > > I mean that's the common property we already have, so use it or explain > > why you aren't using it. I suppose the definition is technically a bit > > different if it's purely a s/w delay vs. h/w monitoring of the signal > > state. I don't think it matters if the interpretation by each driver is > > a bit different. > > > > Maybe msec is not enough resolution for you could be another reason? > > Yes, this is the main reason. As specified in the following patch: > v5 4/6 dt-bindings: touchscreen: fsl,imx6ul-tsc: support glitch threshold > > Drivers must convert this value to IPG clock cycles and map > it to one of the four discrete thresholds exposed by the > TSC_DEBUG_MODE2 register: > > 0: 8191 IPG cycles > 1: 4095 IPG cycles > 2: 2047 IPG cycles > 3: 1023 IPG cycles > > In my case, the IPG clock runs at 66 MHz, which corresponds to: > > 124 µs for 0 > 62 µs for 1 > 31 us for 2 > 15 us for 3 > > So using milliseconds would not fit my use case. A possible trade-off > could be to use debounce-delay-us. Would that be acceptable? I agree it wouldn't map to what the h/w provides, but is what the h/w provides actually useful? There's plenty of h/w designed that's not useful. 15us is quite short for a glitch. Do you have an actual cases where the different values above are needed? Rob To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Fri, Sep 19, 2025 at 10:44 PM Rob Herring <robh@kernel.org> wrote: > > On Fri, Sep 19, 2025 at 05:12:42PM +0200, Dario Binacchi wrote: > > On Fri, Sep 19, 2025 at 4:38 PM Rob Herring <robh@kernel.org> wrote: > > > > > > On Thu, Sep 18, 2025 at 10:37:37PM +0200, Dario Binacchi wrote: > > > > On Thu, Sep 18, 2025 at 10:04 PM Rob Herring <robh@kernel.org> wrote: > > > > > > > > > > On Thu, Sep 18, 2025 at 05:52:31PM +0200, Dario Binacchi wrote: > > > > > > Add support for glitch threshold configuration. A detected signal is valid > > > > > > only if it lasts longer than the set threshold; otherwise, it is regarded > > > > > > as a glitch. > > > > > > > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > > > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > > > > > > > > > --- > > > > > > > > > > > > Changes in v5: > > > > > > - Add Acked-by tag of Conor Dooley > > > > > > > > > > > > Changes in v2: > > > > > > - Added in v2. > > > > > > > > > > > > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 4 ++++ > > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > > index 3e3572aa483a..a60b4d08620d 100644 > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml > > > > > > @@ -206,6 +206,10 @@ properties: > > > > > > > > > > > > unevaluatedProperties: false > > > > > > > > > > > > + touchscreen-glitch-threshold-ns: > > > > > > + description: Minimum duration in nanoseconds a signal must remain stable > > > > > > + to be considered valid. > > > > > > > > > > What's wrong with debounce-delay-ms? > > > > > > > > Do you mean that I should rename touchscreen-glitch-threshold-ns to > > > > debounce-delay-ms? > > > > > > I mean that's the common property we already have, so use it or explain > > > why you aren't using it. I suppose the definition is technically a bit > > > different if it's purely a s/w delay vs. h/w monitoring of the signal > > > state. I don't think it matters if the interpretation by each driver is > > > a bit different. > > > > > > Maybe msec is not enough resolution for you could be another reason? > > > > Yes, this is the main reason. As specified in the following patch: > > v5 4/6 dt-bindings: touchscreen: fsl,imx6ul-tsc: support glitch threshold > > > > Drivers must convert this value to IPG clock cycles and map > > it to one of the four discrete thresholds exposed by the > > TSC_DEBUG_MODE2 register: > > > > 0: 8191 IPG cycles > > 1: 4095 IPG cycles > > 2: 2047 IPG cycles > > 3: 1023 IPG cycles > > > > In my case, the IPG clock runs at 66 MHz, which corresponds to: > > > > 124 µs for 0 > > 62 µs for 1 > > 31 us for 2 > > 15 us for 3 > > > > So using milliseconds would not fit my use case. A possible trade-off > > could be to use debounce-delay-us. Would that be acceptable? > > I agree it wouldn't map to what the h/w provides, but is what the h/w > provides actually useful? There's plenty of h/w designed that's not > useful. 15us is quite short for a glitch. Do you have an actual cases > where the different values above are needed? Considering an IPG clock at 66 MHz, currently at reset the deglitch filter is set to 124 µs, the driver sets it to 31 µs with a hardcoded value, and in my use case I need to set it to 62 µs, as you can see in the patch: https://lore.kernel.org/all/20250918155240.2536852-6-dario.binacchi@amarulasolutions.com/ and its handling in https://lore.kernel.org/all/20250918155240.2536852-7-dario.binacchi@amarulasolutions.com/ Another option could be to use a specific binding for the fsl,imx6ul-tsc controller, as I did in the earlier versions of the series. Thanks and regards, Dario > > Rob
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml index 3e3572aa483a..a60b4d08620d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml @@ -206,6 +206,10 @@ properties: unevaluatedProperties: false + touchscreen-glitch-threshold-ns: + description: Minimum duration in nanoseconds a signal must remain stable + to be considered valid. + dependencies: touchscreen-size-x: [ touchscreen-size-y ] touchscreen-size-y: [ touchscreen-size-x ]