Re: [PATCH v2] regmap: Add debugfs file for forcing field writes

From: Mark Brown
Date: Tue Jun 13 2023 - 11:47:47 EST


On Tue, Jun 13, 2023 at 05:15:10PM +0200, Ricard Wanderlof wrote:

> I can understand that enabling a write-always behavior results in a
> different behavior on the associated bus (e.g. I2C), but in the end it
> shouldn't affect the functionality of the peripheral device any more than
> rearranging driver code to perform regmap writes in a different order,
> which might also lead to fewer or more bus writes.

> It seems I'm clearly in the wrong here, so there must be some scenario
> I've missed. It just doesn't seem that dangerous; it's a debug
> functionality after all.

There are devices where the act of writing to a register can have side
effects even if the values in the register are the same (for example
triggering some kind of recalibration based on the "new" value). It's
rare, and it's probably more likely to be annoying or disruptive than
actually dangerous, but it is something drivers might be relying on.

Attachment: signature.asc
Description: PGP signature