[PATCH] hwmon: add Raspberry Pi DA9091 PMIC driver

Markus Elfring Markus.Elfring at web.de
Thu Nov 19 00:05:39 PST 2026


…
> +++ 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



More information about the linux-arm-kernel mailing list