Re: [PATCH 3/5] regulator: arizona: stop using platform data for init_data
From: Charles Keepax
Date: Wed Dec 02 2026 - 12:10:28 EST
On Mon, Nov 30, 2026 at 09:58:37PM -0800, Dmitry Torokhov wrote:
> Neither Arizona nor Madera board code populates regulator init_data in
> platform data. Both drivers only used the platform data field as
> temporary storage between Device Tree parsing and regulator
> registration.
>
> Assign the default init_data directly to the regulator configuration and
> let Device Tree parsing override it when present, dropping the unused
> platform data parameters and headers from both regulator drivers. Also
> remove the now-unreachable zero consumer supply check in
> arizona_ldo1_common_init(), as all default templates and Device Tree
> init_data unconditionally specify one consumer supply.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---
Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> - /*
> - * LDO1 can only be used to supply DCVDD so if it has no
> - * consumers then DCVDD is supplied externally.
> - */
> - if (config.init_data->num_consumer_supplies == 0)
> - *external_dcvdd = true;
This does make me a little nervous as I think it changes the
behaviour if no DT is supplied, but it's definitely more normal
for the part to use internal DCVDD so probably fine.
Thanks,
Charles