Re: [PATCH 0/3] ASoC: cs35l41/cs35l45/cs4265: sort the reg_defaults tables
Péter Ujfalusi <[email protected]> Wed, 5 Aug 2026 12:10:10 +0300
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On 05/08/2026 12:00, Richard Fitzgerald wrote: >>> Found by an audit of all reg_defaults tables under sound/, the SoundWire >>> codec drivers are fixed by a separate series. >> >> Wow. Would it make sense to have a regmap helper to double-check the >> addresses are indeed in-order in those reg_default tables? >> I am not sure how this requirement can be enforced by just inspection, a >> warning would help detect this sort of issues on more platforms. >> > It does seem probable that anything that relies on people just > remembering to keep a large table sorted is prone to breaking, > especially if the addresses are provided by named constant instead of > a list of hardcoded numbers. > > Should regmap check the table when the regmap is first created? > As it has to search the table during normal use anyway, one extra walk > when the regmap is created probably isn't a serious overhead. But it will be done for _all_ devices which uses regmap on boot, small things do add up, see my reply to Pierre-Louis. -- Péter