* [PATCH] dt-bindings: input: ti,ads7843: Allow SPI clock polarity
@ 2026-10-16 20:31 Fabio Estevam
2026-10-16 20:37 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2026-10-16 20:31 UTC (permalink / raw)
To: dmitry.torokhov
Cc: robh, krzk+dt, conor+dt, linux-input, devicetree, linux-kernel,
Fabio Estevam
imx27-eukrea-mbimxsd27-baseboard passes 'spi-cpol' in the ads7846
touchscreen node, which causes the following dt-schema warning:
imx27-eukrea-mbimxsd27-baseboard.dtb: ads7846@0 (ti,ads7846):
Unevaluated properties are not allowed (spi-cpol was unexpected)
Allow spi-cpol so the binding describes the existing configuration
without changing its SPI mode.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
.../devicetree/bindings/input/touchscreen/ti,ads7843.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
index 1b58fc263dce..24172d206d6d 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
@@ -32,6 +32,8 @@ properties:
description:
GPIO handle describing the pin the !PENIRQ line is connected to.
+ spi-cpol: true
+
vcc-supply:
description:
A regulator node for the supply voltage.
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: input: ti,ads7843: Allow SPI clock polarity
2026-10-16 20:31 [PATCH] dt-bindings: input: ti,ads7843: Allow SPI clock polarity Fabio Estevam
@ 2026-10-16 20:37 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-10-16 20:37 UTC (permalink / raw)
To: Fabio Estevam; +Cc: linux-input, devicetree, robh, conor+dt, dmitry.torokhov
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: input: ti,ads7843: invalid spi-cpol ignored by ads7846_probe()
--
commit d8ba40e3cdda072fca3161a79055b07f36780581
Author: Fabio Estevam <festevam@gmail.com>
dt-bindings: input: ti,ads7843: Allow SPI clock polarity
This commit adds the spi-cpol property to the ti,ads7843 device tree
binding schema to address a dtbs_check warning for the ads7846@0 node in
arch/arm/boot/dts/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts.
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
> index 1b58fc263dce8..24172d206d6da 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
> @@ -32,6 +32,8 @@ properties:
> description:
> GPIO handle describing the pin the !PENIRQ line is connected to.
>
> + spi-cpol: true
> +
> vcc-supply:
> description:
> A regulator node for the supply voltage.
[Severity: Medium]
Should spi-cpol be removed from the ads7846@0 node in
arch/arm/boot/dts/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts instead of
being added to the properties block in
Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml?
The commit message states:
Allow spi-cpol so the binding describes the existing configuration
without changing its SPI mode.
However, in drivers/input/touchscreen/ads7846.c, ads7846_probe()
unconditionally clears SPI_MODE_X_MASK (SPI_CPOL | SPI_CPHA) and forces
SPI_MODE_0 before calling spi_setup():
spi->bits_per_word = 8;
spi->mode &= ~SPI_MODE_X_MASK;
spi->mode |= SPI_MODE_0;
err = spi_setup(spi);
Because ads7846_probe() overrides any polarity flags parsed from Device
Tree, the spi-cpol property in imx27-eukrea-mbimxsd27-baseboard.dts has no
effect on the operating SPI mode of the touchscreen driver, and removing it
from the DTS would not change the operational SPI mode.
Furthermore, the TI ADS7843, ADS7845, ADS7846, ADS7873, and TSC2046
controllers latch DIN on the rising edge of DCLK and shift DOUT on the
falling edge (SPI Mode 0: CPOL=0, CPHA=0). Allowing spi-cpol without
spi-cpha in the binding schema permits SPI Mode 2 (CPOL=1, CPHA=0), which
does not match the hardware protocol or the forced SPI_MODE_0 configuration
in ads7846_probe().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016203131.454640-1-festevam@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-16 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 20:31 [PATCH] dt-bindings: input: ti,ads7843: Allow SPI clock polarity Fabio Estevam
2026-10-16 20:37 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox