Re: [PATCH v3 10/20] regulator: add REGULATOR_LINEAR_VRANGE macro
From: Mark Brown
Date: Tue Nov 04 2025 - 09:28:36 EST
On Mon, Nov 03, 2025 at 07:14:49PM +0000, André Draszik wrote:
> REGULATOR_LINEAR_VRANGE is similar to REGULATOR_LINEAR_RANGE, but
> allows a more natural declaration of a voltage range for a regulator,
> in that it expects the minimum and maximum values as voltages rather
> than as selectors.
> Using voltages arguably makes this macro easier to use by drivers and
> code using it can become easier to read compared to
> REGULATOR_LINEAR_RANGE.
It does introduce an additional layer of indirection into the validation
that the configuration is correct, the reason we use selectors is that
they should map directly onto the register in the datasheet.
Attachment:
signature.asc
Description: PGP signature