Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: "Sander Speetjens" <sander.speetjens@gmail.com>,
	linux-hwmon@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Günter Röck" <linux@roeck-us.net>, "Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hwmon: add Raspberry Pi DA9091 PMIC driver
Date: Thu, 19 Nov 2026 09:05:39 +0100	[thread overview]
Message-ID: <303f05ef-8e21-4018-93af-769163be07f4@web.de> (raw)
In-Reply-To: <20261117-hwmon-da9091-v1-1-f55f0af9c6a3@gmail.com>

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


      parent reply	other threads:[~2026-11-19  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 12:52 [PATCH] hwmon: add Raspberry Pi DA9091 PMIC driver Sander Speetjens
2026-11-17 17:09 ` Guenter Roeck
2026-11-19  7:40   ` Sander Speetjens
2026-11-19  8:05 ` Markus Elfring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=303f05ef-8e21-4018-93af-769163be07f4@web.de \
    --to=markus.elfring@web.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=rjui@broadcom.com \
    --cc=sander.speetjens@gmail.com \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox