Re: [PATCH 4/5] regulator: arizona: simplify Device Tree property parsing

From: Charles Keepax

Date: Wed Dec 02 2026 - 12:17:48 EST


On Mon, Nov 30, 2026 at 09:58:38PM -0800, Dmitry Torokhov wrote:
> External DCVDD detection in arizona_ldo1_of_get_pdata() was split across
> two branches depending on whether the child ldo1 node existed and
> whether of_get_regulator_init_data() returned non-NULL init_data. If
> DCVDD-supply referenced an external regulator while
> of_get_regulator_init_data() returned NULL, external_dcvdd was
> erroneously left false. Both regulator Device Tree helpers also wrapped
> regulator init data parsing inside nested child-node checks.
>
> Consolidate external DCVDD detection into a single comparison against the
> ldo1 child node (setting external DCVDD accurately even when
> of_get_regulator_init_data() returns NULL) and drop the DCVDD-supply
> phandle reference immediately afterward. Flatten both
> arizona_ldo1_of_get_pdata() and arizona_micsupp_of_get_pdata() by
> assigning the child node directly and relying on
> of_get_regulator_init_data() returning NULL when the child node is
> absent.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles