Commit cd7a38c
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>1 parent 42f7652 commit cd7a38c
1 file changed
+34
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5681 | 5681 | | |
5682 | 5682 | | |
5683 | 5683 | | |
5684 | | - | |
5685 | | - | |
5686 | | - | |
5687 | | - | |
5688 | | - | |
5689 | | - | |
5690 | | - | |
5691 | | - | |
5692 | | - | |
5693 | | - | |
5694 | | - | |
5695 | | - | |
| 5684 | + | |
| 5685 | + | |
| 5686 | + | |
| 5687 | + | |
| 5688 | + | |
| 5689 | + | |
| 5690 | + | |
| 5691 | + | |
5696 | 5692 | | |
5697 | | - | |
5698 | | - | |
5699 | | - | |
5700 | | - | |
5701 | | - | |
5702 | | - | |
5703 | | - | |
5704 | | - | |
5705 | | - | |
5706 | | - | |
5707 | | - | |
5708 | 5693 | | |
5709 | 5694 | | |
| 5695 | + | |
| 5696 | + | |
| 5697 | + | |
| 5698 | + | |
| 5699 | + | |
| 5700 | + | |
| 5701 | + | |
| 5702 | + | |
| 5703 | + | |
| 5704 | + | |
| 5705 | + | |
| 5706 | + | |
| 5707 | + | |
| 5708 | + | |
| 5709 | + | |
| 5710 | + | |
| 5711 | + | |
| 5712 | + | |
| 5713 | + | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
| 5718 | + | |
| 5719 | + | |
| 5720 | + | |
5710 | 5721 | | |
5711 | 5722 | | |
5712 | 5723 | | |
| |||
0 commit comments