Re: [PATCH] hwmon: add Raspberry Pi DA9091 PMIC driver

From: Markus Elfring

Date: Thu Nov 19 2026 - 03:06:19 EST


…
> +++ b/drivers/hwmon/raspberrypi-da9091.c
> @@ -0,0 +1,339 @@
…
> +static int rpi_pmic_read(struct device *dev, enum hwmon_sensor_types type,
> + u32 attr, int channel, long *val)
> +{
…
> + mutex_lock(&data->lock);
> +
> + if (time_after(jiffies,
> + data->last_update + msecs_to_jiffies(RPI_PMIC_CACHE_MS))) {
…
> + mutex_unlock(&data->lock);
> + return ret;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&data->lock);”?
https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/mutex.h#L253

Regards,
Markus