]> git.dujemihanovic.xyz Git - u-boot.git/commit
regulator: fixed: fix regulator-fixed-clock
authorJohn Keeping <jkeeping@inmusicbrands.com>
Tue, 9 Jul 2024 09:24:54 +0000 (10:24 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 6 Sep 2024 03:06:17 +0000 (21:06 -0600)
commita5d990854f2c67a8e9aa3d9ab3a11b2baff3285c
treee6a5158d675edb55f30f1faa679966742f195471
parent07c12525bbee102969fe7d2fce21a09f12fa0ae7
regulator: fixed: fix regulator-fixed-clock

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@inmusicbrands.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/power/regulator/fixed.c