From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org,
mfd@lists.linux.dev, linux-leds@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, dmitry.torokhov@gmail.com, lee@kernel.org
Subject: Re: [PATCH v12 2/7] mfd: Add driver for ASUS Transformer embedded controller
Date: Mon, 19 Oct 2026 10:17:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-176970@kernel.org> (raw)
In-Reply-To: <20261019100406.103687-3-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] mfd: asus-transformer-ec: hard-coded cell IDs instead of PLATFORM_DEVID_AUTO
--
commit 69f71ab310cf2527cceba8746f7a17bbb27f3ab4
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
mfd: Add driver for ASUS Transformer embedded controller
This commit adds an MFD core driver for the Nuvoton NPCE795-based embedded
controller found in ASUS Transformer series tablets and keyboard docks. It
handles I2C communication, firmware detection, interrupt notifications, and
sub-device registration.
> diff --git a/drivers/mfd/asus-transformer-ec.c b/drivers/mfd/asus-transformer-ec.c
> new file mode 100644
> index 0000000000000..15942ea59fe1a
> --- /dev/null
> +++ b/drivers/mfd/asus-transformer-ec.c
> @@ -0,0 +1,569 @@
[ ... ]
> +static const struct mfd_cell asus_ec_sl101_dock_mfd_devices[] = {
> + MFD_CELL_NAME("asus-transformer-ec-kbc"),
> +};
> +
> +static const struct mfd_cell asus_ec_tf101_dock_mfd_devices[] = {
> + MFD_CELL_BASIC("asus-transformer-ec-battery", NULL, NULL, 0, 1),
> + MFD_CELL_BASIC("asus-transformer-ec-charger", NULL, NULL, 0, 1),
> + MFD_CELL_BASIC("asus-transformer-ec-led", NULL, NULL, 0, 1),
> + MFD_CELL_NAME("asus-transformer-ec-kbc"),
> + MFD_CELL_NAME("asus-transformer-ec-keys"),
> +};
> +
> +static const struct mfd_cell asus_ec_tf201_pad_mfd_devices[] = {
> + MFD_CELL_NAME("asus-transformer-ec-battery"),
> + MFD_CELL_NAME("asus-transformer-ec-led"),
> +};
> +
> +static const struct mfd_cell asus_ec_tf600t_pad_mfd_devices[] = {
> + MFD_CELL_NAME("asus-transformer-ec-battery"),
> + MFD_CELL_NAME("asus-transformer-ec-charger"),
> + MFD_CELL_NAME("asus-transformer-ec-led"),
> +};
> +
> +static int asus_ec_probe(struct i2c_client *client)
> +{
[ ... ]
> + /* Parent I2C controller uses DMA, ASUS EC and child devices do not */
> + client->dev.coherent_dma_mask = 0;
> + client->dev.dma_mask = &client->dev.coherent_dma_mask;
> +
> + return devm_mfd_add_devices(dev, 0, cells, num_cells, NULL, 0, NULL);
> +}
[Severity: Low]
In asus_ec_probe(), devm_mfd_add_devices() is called with a hard-coded base
ID of 0, while asus_ec_tf101_dock_mfd_devices[] manually sets a cell ID of
1 via MFD_CELL_BASIC() for the battery, charger, and led subdevices to offset
them from the pad EC cells (leaving kbc and keys at ID 0).
Could devm_mfd_add_devices() pass PLATFORM_DEVID_AUTO instead of 0, so that
asus_ec_tf101_dock_mfd_devices[] can use MFD_CELL_NAME() for all entries and
rely on automatic cell indexing without risk of platform device name
collisions in sysfs if multiple EC instances with identical cell IDs are
registered?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261019100406.103687-1-clamor95@gmail.com?part=2
next prev parent reply other threads:[~2026-10-19 10:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 10:03 [PATCH v12 0/7] mfd: Add support for Asus Transformer embedded controller Svyatoslav Ryhel
2026-10-19 10:04 ` [PATCH v12 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC Svyatoslav Ryhel
2026-10-19 10:04 ` [PATCH v12 2/7] mfd: Add driver for ASUS Transformer embedded controller Svyatoslav Ryhel
2026-10-19 10:17 ` sashiko-bot [this message]
2026-10-19 10:04 ` [PATCH v12 3/7] input: serio: Add driver for ASUS Transformer dock keyboard and touchpad Svyatoslav Ryhel
2026-10-19 10:22 ` sashiko-bot
2026-10-20 12:37 ` Svyatoslav Ryhel
2026-10-19 10:04 ` [PATCH v12 4/7] input: keyboard: Add driver for ASUS Transformer dock multimedia keys Svyatoslav Ryhel
2026-10-19 10:04 ` [PATCH v12 5/7] leds: Add driver for ASUS Transformer LEDs Svyatoslav Ryhel
2026-10-19 10:04 ` [PATCH v12 6/7] power: supply: Add driver for ASUS Transformer battery Svyatoslav Ryhel
2026-10-20 13:55 ` Markus Elfring
2026-10-19 10:04 ` [PATCH v12 7/7] power: supply: Add charger driver for Asus Transformers Svyatoslav Ryhel
2026-10-20 0:57 ` [PATCH v12 0/7] mfd: Add support for Asus Transformer embedded controller Florian Krischer
2026-10-20 7:27 ` Svyatoslav Ryhel
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-176970@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--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