[PATCH] regulator: fixed: fix regulator-fixed-clock

Simon Glass sjg at chromium.org
Sat Jul 13 17:13:54 CEST 2024


On Tue, 9 Jul 2024 at 10:25, John Keeping <jkeeping at inmusicbrands.com> wrote:
>
> For regulator-fixed-clock, the device's private data is never set so in
> fixed_clock_regulator_set_enable() is null and the function cannot
> complete successfully.
>
> Rename the _plat structure to _priv to better represent its role and set
> this as the private data.  As shown by the set_enable() function and by
> using the same .of_to_plat hook as regulator-fixed, the platform data is
> regulator_common_plat so also set .plat_auto correctly.
>
> Finally, set up the private data by adding a .probe function to look up
> the clock and set the member variable.
>
> Fixes: f3b5100aff3 ("regulator: fixed: add possibility to enable by clock")
> Signed-off-by: John Keeping <jkeeping at inmusicbrands.com>
> ---
>  drivers/power/regulator/fixed.c | 21 +++++++++++++++++----
>  1 file changed, 17 insertions(+), 4 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list