Re: [PATCH 2/5] platform: arm64: add Huawei Matebook E Go (sc8280xp) EC driver
From: Markus Elfring
Date: Sun Dec 29 2024 - 09:49:49 EST
…
> +++ b/drivers/platform/arm64/huawei-gaokun-ec.c
> @@ -0,0 +1,598 @@
…
> +static int gaokun_ec_request(struct gaokun_ec *ec, const u8 *req,
> + size_t resp_len, u8 *resp)
> +{
…
> + mutex_lock(&ec->lock);
> +
> + i2c_transfer(client->adapter, msgs, 2);
> + usleep_range(2000, 2500);
> +
> + mutex_unlock(&ec->lock);
> +
> + return *resp;
> +}
…
Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&ec->lock);”?
https://elixir.bootlin.com/linux/v6.13-rc3/source/include/linux/mutex.h#L201
Regards,
Markus