From: sashiko-bot@kernel.org
To: yy-Local-LLM <yogo.0917.sabu@gmail.com>, devicetree@vger.kernel.org
Cc: linux-input@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH RFC 4/6] Input: add polled SiRF AT550 resistive touch support
Date: Tue, 17 Nov 2026 13:38:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-218891@kernel.org> (raw)
In-Reply-To: <20261117-at550-rfc-v1-v1-4-5879573cb825@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] Input: at550-ts: non-human handle in Signed-off-by and commit
author
- [Medium] Input: at550-ts: unsafe register restore and IRQ clear order
in at550_ts_close()
- [Low] Input: at550-ts: violation of Input subsystem error-handling and
style rules
--
commit cf7c284aeaacb1e8a41814f52eee2edf5d3fbc10
Author: yy-Local-LLM <yogo.0917.sabu@gmail.com>
> Input: add polled SiRF AT550 resistive touch support
>
> Report raw ABS_X/ABS_Y and BTN_TOUCH using the input polling framework.
> Preserve the firmware settling settings and reject streaming/AUX
> ownership. Use standard touchscreen axis properties; keep affine
> calibration in userspace. Polling is the initial supported acquisition
> mode.
>
> Signed-off-by: yy-Local-LLM <yogo.0917.sabu@gmail.com>
[Severity: High]
Documentation/process/submitting-patches.rst requires a real human name (known
identity) in the Author header and Signed-off-by trailer rather than a handle
or bot identifier such as yy-Local-LLM.
> diff --git a/drivers/input/touchscreen/at550-ts.c b/drivers/input/touchscreen/at550-ts.c
> new file mode 100644
> index 0000000000000..0a208f4a92f55
> --- /dev/null
> +++ b/drivers/input/touchscreen/at550-ts.c
> @@ -0,0 +1,108 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/* SiRF AT550 coordinate acquisition. Layout cross-checked with AT551 draft. */
> +#include <linux/bitfield.h>
> +#include <linux/input.h>
> +#include <linux/input/touchscreen.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
[ ... ]
> +static int at550_ts_open(struct input_dev *input)
> +{
> + struct at550_ts *ts = input_get_drvdata(input);
> +
> + /* Polling keeps the interrupt sources disabled. Preserve CE settling. */
> + writel(3, ts->base + AT550_INTR);
> + writel(ts->ctrl2 | GENMASK(15, 14), ts->base + AT550_CTRL2);
> + writel((ts->ctrl1 & GENMASK(7, 4)) | BIT(11) | BIT(10),
> + ts->base + AT550_CTRL1);
> + return 0;
> +}
> +static void at550_ts_close(struct input_dev *input)
> +{
> + struct at550_ts *ts = input_get_drvdata(input);
> +
> + writel(3, ts->base + AT550_INTR);
> + writel(ts->ctrl1, ts->base + AT550_CTRL1);
> + writel(ts->ctrl2, ts->base + AT550_CTRL2);
> +}
[Severity: Medium]
Can at550_ts_close() leave pending interrupt status latched or re-enable
coordinate acquisition and hardware interrupts?
Clearing AT550_INTR before writing AT550_CTRL1 and AT550_CTRL2 allows an
in-flight conversion to complete and reassert interrupt status before the
controller stops. In addition, at550_ts_probe() accepts any boot-time bits
within 0xffff in ts->ctrl1 and 0xc2ff in ts->ctrl2, so restoring the unmasked
values on close (unlike at550_ts_open(), which masks ts->ctrl1 to
GENMASK(7, 4)) can re-enable acquisition or interrupt generation if firmware
or a bootloader left those bits set.
> +static int at550_ts_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct at550_ts *ts;
> + struct input_dev *input;
> + int ret;
[ ... ]
> + ret = input_setup_polling(input, at550_ts_poll);
> + if (ret)
> + return ret;
> + input_set_poll_interval(input, 10);
> + return input_register_device(input);
> +}
[Severity: Low]
This isn't a bug, but Input subsystem convention is to name the error variable
error or err, check the result of input_register_device(input), and explicitly
return 0 on success:
error = input_register_device(input);
if (error)
return error;
return 0;
Also, linux/bitfield.h is unused here while linux/bits.h (for BIT and GENMASK)
and linux/mod_devicetable.h (for struct of_device_id) should be included
directly, and blank lines should separate top-level definitions and functions.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-at550-rfc-v1-v1-0-5879573cb825@gmail.com?part=4
next prev parent reply other threads:[~2026-11-17 13:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 13:06 [PATCH RFC 0/6] SiRF AT550 / YPL514si initial RAM-boot platform support yy-Local-LLM via B4 Relay
2026-11-17 13:06 ` [PATCH RFC 1/6] dt-bindings: add SiRF AT550 and Yupiteru YPL514si descriptions yy-Local-LLM via B4 Relay
2026-11-17 13:21 ` sashiko-bot
2026-11-17 13:06 ` [PATCH RFC 2/6] irqchip: add the SiRF AT550 interrupt controller yy-Local-LLM via B4 Relay
2026-11-17 13:27 ` sashiko-bot
2026-11-17 13:06 ` [PATCH RFC 3/6] clocksource: add the SiRF AT550 counter and match timer yy-Local-LLM via B4 Relay
2026-11-17 13:43 ` sashiko-bot
2026-11-17 13:06 ` [PATCH RFC 4/6] Input: add polled SiRF AT550 resistive touch support yy-Local-LLM via B4 Relay
2026-11-17 13:38 ` sashiko-bot [this message]
2026-11-17 13:06 ` [PATCH RFC 5/6] mmc: sdhci: add SiRF AT550 programmed-I/O support yy-Local-LLM via B4 Relay
2026-11-17 13:46 ` sashiko-bot
2026-11-17 13:06 ` [PATCH RFC 6/6] ARM: add the SiRF AT550 platform and YPL514si board yy-Local-LLM via B4 Relay
2026-11-17 13:17 ` Arnd Bergmann
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-218891@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yogo.0917.sabu@gmail.com \
/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