[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXqK73h9NIlBfHiu@smile.fi.intel.com>
Date: Thu, 29 Jan 2026 00:17:19 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, Andy Shevchenko <andy@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
David Jander <david@...tonic.nl>
Subject: Re: [PATCH v3 7/8] iio: dac: ds4424: convert to regmap
On Wed, Jan 28, 2026 at 04:38:23PM +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.
...
> changes v3:
> - Switch to REGCACHE_MAPLE to efficiently handle the sparse register map
> (offset 0xF8) and avoid allocating memory for the unused 0x00-0xF7 range.
> - Use explicit regmap_bulk_read() in probe to seed the cache with the
> bootloader configuration. This avoids the invalid read from address 0x00
> that occurred with generic cache defaults.
Isn't regmap has an option to do it for you?
(I'm talking about num_reg_defaults_raw without setting reg_defaults_raw)
> - Remove ds4424_verify_chip(); devm_regmap_init_i2c() and the subsequent
> bulk read implicitly validate the device presence.
> - Use regmap_bulk_write() in ds4424_suspend() to efficiently zero all
> channels.
> - Adopt fsleep() for delays and include <linux/array_size.h>.
> - Use dev_err_ratelimited() with the physical device context in the read
> path (incorporating feedback aimed at v2 patch 8).
...
> - usleep_range(1000, 1200);
> + fsleep(1000);
Seems like undescribed / unrelated change.
Also needs a comment to explain the delay.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists