[PATCH v9 2/3] regulator: Add devres version of of_regulator_get_optional()

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Sep 30 01:57:00 PDT 2024


Il 30/09/24 06:45, Chen-Yu Tsai ha scritto:
> There are existing uses for a devres version of of_regulator_get_optional()
> in power domain drivers. On MediaTek platforms, power domains may have
> regulator supplies tied to them. The driver currently tries to use
> devm_regulator_get() to not have to manage the lifecycle, but ends up
> doing it in a very hacky way by replacing the device node of the power
> domain controller device to the device node of the power domain that is
> currently being registered, getting the supply, and reverting the device
> node.
> 
> Provide a better API so that the hack can be replaced.
> 
> Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the Linux-mediatek mailing list