From: sashiko-bot@kernel.org
To: Clover <alex@ironrobin.net>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] platform: arm64: Add Lenovo ThinkPad X13s EC driver
Date: Sat, 26 Sep 2026 20:04:37 +0000 [thread overview]
Message-ID: <20260926200438.05A7C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926195415.5995-3-alex@ironrobin.net>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] i2c: missing I2C_FUNC_PROTOCOL_MANGLING check for I2C_M_STOP
--
commit a8937fc74e70704582392fdfcb89327bf751206f
Author: Clover <alex@ironrobin.net>
Subject: platform: arm64: Add Lenovo ThinkPad X13s EC driver
This commit adds a standalone driver for the Lenovo ThinkPad X13s embedded
controller. It handles keyboard-backlight control, hardware brightness
change notifications, and system sleep power sequencing.
> diff --git a/drivers/platform/arm64/lenovo-thinkpad-x13s.c b/drivers/platform/arm64/lenovo-thinkpad-x13s.c
> new file mode 100644
> index 0000000000000..708f909f78780
> --- /dev/null
> +++ b/drivers/platform/arm64/lenovo-thinkpad-x13s.c
[ ... ]
> @@ -0,0 +1,408 @@
[ ... ]
> +static int x13s_read(struct x13s_ec *ec, u8 cmd, u8 reg, u8 *value)
> +{
> + struct i2c_client *client = ec->client;
> + u8 buf[] = { cmd, reg, 0, 1 };
> + struct i2c_msg request = {
> + .addr = client->addr,
> + .flags = I2C_M_STOP,
[Severity: Low]
Is the I2C_M_STOP flag necessary here?
Single-message transfers inherently end with a STOP condition. If the
adapter requires this explicit flag, the driver needs to verify that the
adapter supports protocol mangling.
[ ... ]
> +static int x13s_probe(struct i2c_client *client)
> +{
> + struct device *dev = &client->dev;
> + struct x13s_ec *ec;
> + int ret;
> +
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
> + return -EOPNOTSUPP;
[Severity: Low]
If the I2C_M_STOP flag is intentionally required in x13s_read(), should this
functionality check also include I2C_FUNC_PROTOCOL_MANGLING?
The I2C API contract dictates that I2C_M_STOP must only be used if the
adapter advertises protocol mangling.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260926195415.5995-1-alex@ironrobin.net?part=2
next prev parent reply other threads:[~2026-09-26 20:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 19:54 [PATCH v2 0/3] Lenovo ThinkPad X13s embedded controller support Clover
2026-09-26 19:54 ` [PATCH v2 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC Clover
2026-09-27 17:21 ` Krzysztof Kozlowski
2026-09-28 2:53 ` Alex R
2026-09-26 19:54 ` [PATCH v2 2/3] platform: arm64: Add Lenovo ThinkPad X13s EC driver Clover
2026-09-26 20:04 ` sashiko-bot [this message]
2026-09-26 19:54 ` [PATCH v2 3/3] arm64: dts: qcom: sc8280xp-x13s: Add embedded controller Clover
2026-09-26 20:02 ` sashiko-bot
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=20260926200438.05A7C1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alex@ironrobin.net \
--cc=conor+dt@kernel.org \
--cc=devicetree@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