Re: [RFC PATCH v2 0/2] regmap: add APIs to bypass regmap_field and work with reg_field directly
From: Mark Brown
Date: Fri Nov 20 2026 - 09:34:11 EST
On Fri, Nov 13, 2026 at 12:55:44AM -0600, Victor Chernyakin wrote:
> This is not actually a new idea! Both it and the current *_alloc approach
> were suggested as alternatives right when the regmap_field_* APIs were
> being added [1]. The *_alloc approach was chosen without much
> discussion, but I think (and Patch 2 demonstrates, I hope) that
> this approach is the cleaner one.
This approach doesn't address the main driver for the field API so well.
That is where we have devices with similar programming models but
differing register layouts, for example bitfields changing sizes or
moving. That ends up meaning you don't get most of the inlining
benefits since nothing is known at compile time, the compiler wasn't
being particularly helpful with it.
Attachment:
signature.asc
Description: PGP signature