On Tue, Feb 03, 2026 at 10:34:31AM +0100, Oleksij Rempel wrote:
Refactor the driver to use the regmap API.
Replace the driver-specific mutex and manual shadow buffers with the
standard regmap infrastructure for locking and caching.
This ensures the cache is populated from hardware at probe, preventing
state desynchronization (e.g. across suspend/resume).
Define access tables to validate the different register maps of DS44x2
and DS44x4.
Reviewed-by: Andy Shevchenko <redacted>
...
+#include <linux/array_size.h>
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
Side note: I expect at some point see this inclusion to be gone.
#include <linux/module.h>
+#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+ types.h // exempli gratia, u8 vals[] in the code
...
+ u8 zero_buf[DS4424_MAX_DAC_CHANNELS] = { 0 };
'0' is not needed.
--
With Best Regards,
Andy Shevchenko