From: sashiko-bot@kernel.org
To: "Fabio Estevam" <festevam@gmail.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH] dt-bindings: input: ti,ads7843: Allow SPI clock polarity
Date: Fri, 16 Oct 2026 20:37:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-174919@kernel.org> (raw)
In-Reply-To: <20261016203131.454640-1-festevam@gmail.com>
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
prev parent reply other threads:[~2026-10-16 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=sashiko-outbox-174919@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=festevam@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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