]> www.infradead.org Git - users/willy/pagecache.git/commit
regulator: core: do not silently ignore provided init_data
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 8 Oct 2024 16:07:01 +0000 (18:07 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 22 Oct 2024 19:49:13 +0000 (20:49 +0100)
commitcd7a38c40b231350a3cd0fd774f4e6bb68c4b411
treee2ded8453f44613976e8990afdca7b3b5283e338
parent42f7652d3eb527d03665b09edac47f85fb600924
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>
drivers/regulator/core.c