* [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend
@ 2026-09-30 14:18 Abel Vesa
2026-09-30 14:23 ` Abel Vesa
2026-10-01 7:03 ` Anvesh Jain P
0 siblings, 2 replies; 3+ messages in thread
From: Abel Vesa @ 2026-09-30 14:18 UTC (permalink / raw)
To: Anvesh Jain P, Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Dmitry Baryshkov, Konrad Dybcio
Cc: Maya Matuszczyk, linux-arm-msm, platform-driver-x86,
linux-kernel, Abel Vesa
EC SCI events require I2C transfers to retrieve the event information.
During system resume, an SCI interrupt can be delivered before the I2C
controller is ready to handle transfers, resulting in failed event reads:
geni_i2c a84000.i2c: error turning SE resources:-13
qcom-hamoa-ec 3-0076: Failed to read EC SCI Event: -13
Keep SCI interrupt handling disabled across system sleep so that EC
events are processed only while the I2C controller is available. This
prevents event reads from racing with the controller's suspend and
resume transitions.
Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
---
drivers/platform/arm64/qcom-hamoa-ec.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/arm64/qcom-hamoa-ec.c b/drivers/platform/arm64/qcom-hamoa-ec.c
index 4d2ad042a7f8..d34afd901324 100644
--- a/drivers/platform/arm64/qcom-hamoa-ec.c
+++ b/drivers/platform/arm64/qcom-hamoa-ec.c
@@ -331,17 +331,28 @@ static const struct thermal_cooling_device_ops qcom_ec_thermal_ops = {
static int qcom_ec_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
+ int ret;
- return i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
- EC_MODERN_STANDBY_EXIT);
+ ret = i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
+ EC_MODERN_STANDBY_EXIT);
+ enable_irq(client->irq);
+
+ return ret;
}
static int qcom_ec_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
+ int ret;
- return i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
- EC_MODERN_STANDBY_ENTER);
+ /* Keep SCI reads from racing the I2C controller's system sleep. */
+ disable_irq(client->irq);
+ ret = i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
+ EC_MODERN_STANDBY_ENTER);
+ if (ret)
+ enable_irq(client->irq);
+
+ return ret;
}
static int qcom_ec_probe(struct i2c_client *client)
---
base-commit: 6c2cb8b8b843d216ab549b678a0d8831c43153e0
change-id: 20260930-qcom-hamoa-ec-suspend-irq-464201cadb6c
Best regards,
--
Abel Vesa <abel.vesa@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend
2026-09-30 14:18 [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend Abel Vesa
@ 2026-09-30 14:23 ` Abel Vesa
2026-10-01 7:03 ` Anvesh Jain P
1 sibling, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2026-09-30 14:23 UTC (permalink / raw)
To: Anvesh Jain P, Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Dmitry Baryshkov, Konrad Dybcio
Cc: Maya Matuszczyk, linux-arm-msm, platform-driver-x86, linux-kernel
On 26-09-30 17:18:36, Abel Vesa wrote:
> EC SCI events require I2C transfers to retrieve the event information.
> During system resume, an SCI interrupt can be delivered before the I2C
> controller is ready to handle transfers, resulting in failed event reads:
>
> geni_i2c a84000.i2c: error turning SE resources:-13
> qcom-hamoa-ec 3-0076: Failed to read EC SCI Event: -13
>
> Keep SCI interrupt handling disabled across system sleep so that EC
> events are processed only while the I2C controller is available. This
> prevents event reads from racing with the controller's suspend and
> resume transitions.
>
> Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices")
> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Urgh, messed up the Subject line.
Will fix it in v2.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend
2026-09-30 14:18 [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend Abel Vesa
2026-09-30 14:23 ` Abel Vesa
@ 2026-10-01 7:03 ` Anvesh Jain P
1 sibling, 0 replies; 3+ messages in thread
From: Anvesh Jain P @ 2026-10-01 7:03 UTC (permalink / raw)
To: Abel Vesa, Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Dmitry Baryshkov, Konrad Dybcio
Cc: Maya Matuszczyk, linux-arm-msm, platform-driver-x86, linux-kernel
On 9/30/2026 7:48 PM, Abel Vesa wrote:
> EC SCI events require I2C transfers to retrieve the event information.
> During system resume, an SCI interrupt can be delivered before the I2C
> controller is ready to handle transfers, resulting in failed event reads:
>
> geni_i2c a84000.i2c: error turning SE resources:-13
> qcom-hamoa-ec 3-0076: Failed to read EC SCI Event: -13
>
> Keep SCI interrupt handling disabled across system sleep so that EC
> events are processed only while the I2C controller is available. This
> prevents event reads from racing with the controller's suspend and
> resume transitions.
>
> Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices")
> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> ---
> drivers/platform/arm64/qcom-hamoa-ec.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/arm64/qcom-hamoa-ec.c b/drivers/platform/arm64/qcom-hamoa-ec.c
> index 4d2ad042a7f8..d34afd901324 100644
> --- a/drivers/platform/arm64/qcom-hamoa-ec.c
> +++ b/drivers/platform/arm64/qcom-hamoa-ec.c
> @@ -331,17 +331,28 @@ static const struct thermal_cooling_device_ops qcom_ec_thermal_ops = {
> static int qcom_ec_resume(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> + int ret;
>
> - return i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
> - EC_MODERN_STANDBY_EXIT);
> + ret = i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
> + EC_MODERN_STANDBY_EXIT);
> + enable_irq(client->irq);
> +
> + return ret;
> }
>
> static int qcom_ec_suspend(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> + int ret;
>
> - return i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
> - EC_MODERN_STANDBY_ENTER);
> + /* Keep SCI reads from racing the I2C controller's system sleep. */
> + disable_irq(client->irq);
> + ret = i2c_smbus_write_byte_data(client, EC_MODERN_STANDBY_CMD,
> + EC_MODERN_STANDBY_ENTER);
> + if (ret)
> + enable_irq(client->irq);
> +
> + return ret;
> }
>
> static int qcom_ec_probe(struct i2c_client *client)
>
> ---
> base-commit: 6c2cb8b8b843d216ab549b678a0d8831c43153e0
> change-id: 20260930-qcom-hamoa-ec-suspend-irq-464201cadb6c
>
> Best regards,
> --
> Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Anvesh Jain P <anvesh.p@oss.qualcomm.com>
--
Best Regards,
Anvesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-01 7:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 14:18 [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend Abel Vesa
2026-09-30 14:23 ` Abel Vesa
2026-10-01 7:03 ` Anvesh Jain P
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®