Re: [PATCH] drivers: hwmon: add EMC2101 driver

From: Guenter Roeck
Date: Thu Jul 03 2025 - 20:25:45 EST


On Thu, Jul 03, 2025 at 09:23:41AM +0200, Álvaro Fernández Rojas wrote:
> >
> > Add a comment describing what you are protecting here. It looks so far
> > like you could just use regmap and drop the mutex, but I didn't check
> > thoroughly.
>
> The EMC2101 datasheet is explicit about the Look Up Table registers
> (REG_FAN_LUT_TEMP and REG_FAN_LUT_SPEED) being RO if FAN_LUT_DISABLE
> isn't set, so I believe that we need the mutex even if we switch to
> regmap.
> I will add an explanation with that in the next version.
> Should I still switch the implementation to regmap considering that we
> need a mutex?
>
What does r/w vs. r/o register access have to do with locking ?

Guenter