Re: [PATCH 2/2] regulator: pf0900: Modify volatile register range definition
From: Mark Brown
Date: Thu Jun 18 2026 - 15:12:56 EST
On Thu, Jun 18, 2026 at 10:03:06AM +0800, joy.zou@xxxxxxxxxxx wrote:
> -static const struct regmap_range pf0900_range = {
> - .range_min = PF0900_REG_DEV_ID,
> - .range_max = PF0900_REG_SYS_DIAG,
> +static const struct regmap_range pf0900_range[] = {
> + regmap_reg_range(PF0900_REG_SYSTEM_INT, PF0900_REG_SYSTEM_INT),
> + regmap_reg_range(PF0900_REG_STATUS1_SNS, PF0900_REG_STATUS1_SNS),
> + regmap_reg_range(PF0900_REG_STATUS2_SNS, PF0900_REG_STATUS2_SNS),
It's a bit weird to have all these single register ranges, usually when
we have large blocks of single registers we specify them with a big
switch statement and let the compiler figure out optimising how to look
them up. It also looks like this isn't joined up with the interrupt
handler code, regu_irqs[] lists _INT registers not _STS registers so
presumably both need to be volatile (I'm guessing _STS is live state and
_INT latched or similar).
This also omits PF0900_REG_STATUS[12]_{INT,STS}, while we don't seem
to handle these as interrupts (though we check STATUS1 during probe)
they look like they should be volatile too?
Attachment:
signature.asc
Description: PGP signature