Re: [PATCH] platform/arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend

From: Anvesh Jain P

Date: Thu Oct 01 2026 - 03:04:35 EST




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@xxxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxxx>

Reviewed-by: Anvesh Jain P <anvesh.p@xxxxxxxxxxxxxxxx>

--
Best Regards,
Anvesh