From: Florian Krischer <florian.krischer@fkr.dev>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Lee Jones <lee@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Florian Krischer <florian.krischer@fkr.dev>
Subject: [PATCH v10 fixup 1/2] mfd: asus-transformer-ec: use 8-byte event reads on SL101
Date: Mon, 21 Sep 2026 19:52:36 +0200 [thread overview]
Message-ID: <20260921175234.3137985-2-florian.krischer@fkr.dev> (raw)
In-Reply-To: <20260721095233.420823-1-clamor95@gmail.com>
The SL101 embedded controller exposes the event window at 0x6a through
8-byte reads. This matches the downstream ASUS SL101 driver, which uses
an 8-byte SMBus I2C block read for command responses and events.
The generic 32-byte event read used by v10 prevents the physical SL101
keyboard from completing PS/2 initialization.
Use a variant-specific event read length for the SL101 in both the
clear-buffer and interrupt paths. Keep the 32-byte entry size for other
variants.
Tested on an ASUS Eee Pad Slider SL101 with EC firmware SL101-0202.
With the matching serio fixup, the built-in keyboard completes atkbd
initialization and works.
Signed-off-by: Florian Krischer <florian.krischer@fkr.dev>
---
drivers/mfd/asus-transformer-ec.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
--- a/drivers/mfd/asus-transformer-ec.c
+++ b/drivers/mfd/asus-transformer-ec.c
@@ -229,8 +229,18 @@
return ret;
}
+static size_t asus_ec_read_size(const struct asus_ec_data *ddata)
+{
+ /* SL101 firmware exposes an 8-byte event window at 0x6a. */
+ if (ddata->info->variant == ASUSEC_SL101_DOCK)
+ return 8;
+
+ return ASUSEC_ENTRY_SIZE;
+}
+
static void asus_ec_clear_buffer(struct asus_ec_data *ddata)
{
+ size_t read_size = asus_ec_read_size(ddata);
int ret, retry = ASUSEC_RSP_BUFFER_SIZE;
/*
@@ -239,8 +249,8 @@
*/
while (retry--) {
ret = i2c_smbus_read_i2c_block_data(ddata->client, ASUSEC_READ_BUF,
- ASUSEC_ENTRY_SIZE, ddata->ec_buf);
- if (ret < ASUSEC_ENTRY_SIZE)
+ read_size, ddata->ec_buf);
+ if (ret < read_size)
continue;
if (ddata->ec_buf[ASUSEC_IRQ_STATUS] & ASUSEC_OBF_MASK)
@@ -318,12 +328,13 @@
static irqreturn_t asus_ec_interrupt(int irq, void *dev_id)
{
struct asus_ec_data *ddata = dev_id;
+ size_t read_size = asus_ec_read_size(ddata);
unsigned long notify_action;
int ret;
ret = i2c_smbus_read_i2c_block_data(ddata->client, ASUSEC_READ_BUF,
- ASUSEC_ENTRY_SIZE, ddata->ec_buf);
- if (ret < ASUSEC_ENTRY_SIZE)
+ read_size, ddata->ec_buf);
+ if (ret < read_size)
return IRQ_NONE;
/* Check status byte with ASUSEC_OBF_MASK if data is valid */
--
next prev parent reply other threads:[~2026-09-21 17:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:52 [PATCH v10 0/7] mfd: Add support for Asus Transformer embedded controller Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 2/7] mfd: Add driver for ASUS Transformer embedded controller Svyatoslav Ryhel
2026-07-23 6:25 ` Uwe Kleine-König
2026-07-25 13:23 ` Svyatoslav Ryhel
2026-07-29 12:33 ` Uwe Kleine-König
2026-07-21 9:52 ` [PATCH v10 3/7] input: serio: Add driver for ASUS Transformer dock keyboard and touchpad Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 4/7] input: keyboard: Add driver for ASUS Transformer dock multimedia keys Svyatoslav Ryhel
2026-08-19 9:20 ` Svyatoslav Ryhel
2026-09-06 17:22 ` Svyatoslav Ryhel
2026-09-21 7:34 ` Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 5/7] leds: Add driver for ASUS Transformer LEDs Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 6/7] power: supply: Add driver for ASUS Transformer battery Svyatoslav Ryhel
2026-07-21 9:52 ` [PATCH v10 7/7] power: supply: Add charger driver for Asus Transformers Svyatoslav Ryhel
2026-09-21 17:52 ` [PATCH v10 fixup 0/2] ASUS Transformer EC: SL101 keyboard event/response fixes Florian Krischer
2026-09-21 17:52 ` Florian Krischer [this message]
2026-09-22 6:22 ` [PATCH v10 fixup 1/2] mfd: asus-transformer-ec: use 8-byte event reads on SL101 Svyatoslav Ryhel
2026-09-21 17:52 ` [PATCH v10 fixup 2/2] input: serio: asus-transformer-ec: fix keyboard response framing Florian Krischer
2026-09-22 6:25 ` 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=20260921175234.3137985-2-florian.krischer@fkr.dev \
--to=florian.krischer@fkr.dev \
--cc=clamor95@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®