[PATCH 2/2] i3c: master: Add Nuvoton npcm845 i3c master driver

Markus Elfring Markus.Elfring at web.de
Thu Aug 1 18:42:56 AEST 2024


…
> +++ b/drivers/i3c/master/npcm845-i3c-master.c
> @@ -0,0 +1,2364 @@
…
> +static int npcm_i3c_master_do_daa(struct i3c_master_controller *m)
> +{
…
> +	int ret, i;
> +
> +	mutex_lock(&master->lock);
> +	spin_lock_irqsave(&master->req_lock, flags);
…
> +	npcm_i3c_master_set_sda_skew(master, 0);
> +	spin_unlock_irqrestore(&master->req_lock, flags);
> +	mutex_unlock(&master->lock);
…

Under which circumstances would you become interested to apply statements
like the following?

* guard(mutex)(&master->lock);
  https://elixir.bootlin.com/linux/v6.11-rc1/source/include/linux/mutex.h#L196

* guard(spinlock_irqsave)(&master->req_lock);
  https://elixir.bootlin.com/linux/v6.11-rc1/source/include/linux/spinlock.h#L572

Regards,
Markus


More information about the openbmc mailing list