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>
---
.../input/touchscreen/fsl,imx6ul-tsc.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
index 678756ad0f92..2fee2940213f 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml
@@ -62,6 +62,23 @@ properties:
description: Number of data samples which are averaged for each read.
enum: [ 1, 4, 8, 16, 32 ]
+ fsl,glitch-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ Indicates the glitch threshold. The threshold is defined by number
+ of clock cycles. A detect signal is only valid if it is exist longer
+ than threshold; otherwise, it is regarded as a glitch.
+ 0: Normal function: 8191 clock cycles
+ Low power mode: 9 clock cycles
+ 1: Normal function: 4095 clock cycles
+ Low power mode: 7 clock cycles
+ 2: Normal function: 2047 clock cycles
+ Low power mode: 5 clock cycles
+ 3: Normal function: 1023 clock cycles
+ Low power mode: 3 clock cycles
+
required:
- compatible
- reg
@@ -94,4 +111,5 @@ examples:
measure-delay-time = <0xfff>;
pre-charge-time = <0xffff>;
touchscreen-average-samples = <32>;
+ fsl,glitch-threshold = <2>;
};
--
2.43.0
On Tue, Jul 22, 2025 at 12:36:16PM +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> > --- > > .../input/touchscreen/fsl,imx6ul-tsc.yaml | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > index 678756ad0f92..2fee2940213f 100644 > --- a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > +++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > @@ -62,6 +62,23 @@ properties: > description: Number of data samples which are averaged for each read. > enum: [ 1, 4, 8, 16, 32 ] > > + fsl,glitch-threshold: > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 0 > + enum: [ 0, 1, 2, 3 ] > + description: | > + Indicates the glitch threshold. The threshold is defined by number > + of clock cycles. A detect signal is only valid if it is exist longer > + than threshold; otherwise, it is regarded as a glitch. > + 0: Normal function: 8191 clock cycles > + Low power mode: 9 clock cycles > + 1: Normal function: 4095 clock cycles > + Low power mode: 7 clock cycles > + 2: Normal function: 2047 clock cycles > + Low power mode: 5 clock cycles > + 3: Normal function: 1023 clock cycles > + Low power mode: 3 clock cycles Don't we have common properties for this expressed in time? Debounce time IIRC. > + > required: > - compatible > - reg > @@ -94,4 +111,5 @@ examples: > measure-delay-time = <0xfff>; > pre-charge-time = <0xffff>; > touchscreen-average-samples = <32>; > + fsl,glitch-threshold = <2>; > }; > -- > 2.43.0 >
On Wed, Jul 23, 2025 at 7:03 AM Rob Herring <robh@kernel.org> wrote: > > On Tue, Jul 22, 2025 at 12:36:16PM +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> > > --- > > > > .../input/touchscreen/fsl,imx6ul-tsc.yaml | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > index 678756ad0f92..2fee2940213f 100644 > > --- a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > +++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > @@ -62,6 +62,23 @@ properties: > > description: Number of data samples which are averaged for each read. > > enum: [ 1, 4, 8, 16, 32 ] > > > > + fsl,glitch-threshold: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + default: 0 > > + enum: [ 0, 1, 2, 3 ] > > + description: | > > + Indicates the glitch threshold. The threshold is defined by number > > + of clock cycles. A detect signal is only valid if it is exist longer > > + than threshold; otherwise, it is regarded as a glitch. > > + 0: Normal function: 8191 clock cycles > > + Low power mode: 9 clock cycles > > + 1: Normal function: 4095 clock cycles > > + Low power mode: 7 clock cycles > > + 2: Normal function: 2047 clock cycles > > + Low power mode: 5 clock cycles > > + 3: Normal function: 1023 clock cycles > > + Low power mode: 3 clock cycles > > Don't we have common properties for this expressed in time? Debounce > time IIRC. I tried checking in Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml, but I didn't find anything about it. It exists in some specific touchscreen bindings: - azoteq,iqs7211.yaml - brcm,iproc-touchscreen.txt - fsl-mx25-tcq.txt, - ti,ads7843.yaml. Only fsl-mx25-tcq.txt expresses it in terms of time (ns). Thanks and regards, Dario > > > + > > required: > > - compatible > > - reg > > @@ -94,4 +111,5 @@ examples: > > measure-delay-time = <0xfff>; > > pre-charge-time = <0xffff>; > > touchscreen-average-samples = <32>; > > + fsl,glitch-threshold = <2>; > > }; > > -- > > 2.43.0 > > -- Dario Binacchi Senior Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com
Hello Rob, just a gentle ping — I’ve replied to your comments on this patch, but I haven’t seen any further feedback. Thanks and regards, Dario On Wed, Jul 23, 2025 at 8:25 AM Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > > On Wed, Jul 23, 2025 at 7:03 AM Rob Herring <robh@kernel.org> wrote: > > > > On Tue, Jul 22, 2025 at 12:36:16PM +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> > > > --- > > > > > > .../input/touchscreen/fsl,imx6ul-tsc.yaml | 18 ++++++++++++++++++ > > > 1 file changed, 18 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > > index 678756ad0f92..2fee2940213f 100644 > > > --- a/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/fsl,imx6ul-tsc.yaml > > > @@ -62,6 +62,23 @@ properties: > > > description: Number of data samples which are averaged for each read. > > > enum: [ 1, 4, 8, 16, 32 ] > > > > > > + fsl,glitch-threshold: > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + default: 0 > > > + enum: [ 0, 1, 2, 3 ] > > > + description: | > > > + Indicates the glitch threshold. The threshold is defined by number > > > + of clock cycles. A detect signal is only valid if it is exist longer > > > + than threshold; otherwise, it is regarded as a glitch. > > > + 0: Normal function: 8191 clock cycles > > > + Low power mode: 9 clock cycles > > > + 1: Normal function: 4095 clock cycles > > > + Low power mode: 7 clock cycles > > > + 2: Normal function: 2047 clock cycles > > > + Low power mode: 5 clock cycles > > > + 3: Normal function: 1023 clock cycles > > > + Low power mode: 3 clock cycles > > > > Don't we have common properties for this expressed in time? Debounce > > time IIRC. > > I tried checking in > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml, > but I didn't find anything about it. > > It exists in some specific touchscreen bindings: > - azoteq,iqs7211.yaml > - brcm,iproc-touchscreen.txt > - fsl-mx25-tcq.txt, > - ti,ads7843.yaml. > > Only fsl-mx25-tcq.txt expresses it in terms of time (ns). > > Thanks and regards, > Dario > > > > > > + > > > required: > > > - compatible > > > - reg > > > @@ -94,4 +111,5 @@ examples: > > > measure-delay-time = <0xfff>; > > > pre-charge-time = <0xffff>; > > > touchscreen-average-samples = <32>; > > > + fsl,glitch-threshold = <2>; > > > }; > > > -- > > > 2.43.0 > > > > > > > -- > > Dario Binacchi > > Senior Embedded Linux Developer > > dario.binacchi@amarulasolutions.com > > __________________________________ > > > Amarula Solutions SRL > > Via Le Canevare 30, 31100 Treviso, Veneto, IT > > T. +39 042 243 5310 > info@amarulasolutions.com > > www.amarulasolutions.com -- Dario Binacchi Senior Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com
© 2016 - 2025 Red Hat, Inc.