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

Samuel Kayode
2025-06-04T14:08:38Z

On Mon, Jun 02, 2025 at 08:44:04PM +0200, Markus Elfring wrote:
> …
> > +++ 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
>
I think it can be applied to v4 of this patch. I'll try it out and tag you on
the next version.

Thanks,
Sam