Re: [PATCH v3 5/6] power: supply: pf1550: add battery charger support

From: Markus Elfring
Date: Mon Jun 02 2025 - 14:51:17 EST



> +++ b/drivers/power/supply/pf1550-charger.c
> @@ -0,0 +1,639 @@

> +static void pf1550_charger_irq_work(struct work_struct *work)
> +{

> + mutex_lock(&chg->mutex);
> +
> + for (i = 0; i < PF1550_CHARGER_IRQ_NR; i++) {

> + mutex_unlock(&chg->mutex);
> +}


Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&chg->mutex);”?
https://elixir.bootlin.com/linux/v6.15/source/include/linux/mutex.h#L201

Regards,
Markus