[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b55886e2-9a21-4903-b344-2dccb359bcbc@web.de>
Date: Sun, 29 Dec 2024 15:49:01 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Pengyu Luo <mitltlatltl@...il.com>, platform-driver-x86@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-usb@...r.kernel.org, linux-pm@...r.kernel.org,
Bjorn Andersson <andersson@...nel.org>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Konrad Dybcio <konradybcio@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Rob Herring <robh@...nel.org>,
Sebastian Reichel <sre@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Nikita Travkin <nikita@...n.ru>
Subject: Re: [PATCH 2/5] platform: arm64: add Huawei Matebook E Go (sc8280xp)
EC driver
…
> +++ 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
Powered by blists - more mailing lists