regulator: core: do not silently ignore provided init_data
On DT platforms, if a regulator init_data is provided in config, it is
silently ignored in favor of the DT parsing done by the framework, if
of_match is set.
of_match is an indication that init_data is expected to be set based on DT
and the parsing should be done by the regulator framework.
If the regulator provider passed init_data it must be because it is useful
somehow, in such case of_match should be clear.
If the driver expects the framework to initialize this data on its
own, it should leave init_data clear.
Warn if both init_data and of_match are set, then default to the provided
init_data.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20241008-regulator-ignored-data-v2-1-d1251e0ee507@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>