Commit Graph

5 Commits

Author SHA1 Message Date
Rob Herring
8f7e17d847
regulator: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231017203442.2699322-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 21:38:48 +01:00
Douglas Anderson
d3b81d97d5
regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.19 and 5.4
This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS
for drivers that existed in 4.14") but changes regulators didn't exist
in Linux 4.19 but did exist in Linux 5.4.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230316125351.3.I45bf925ca9537da5f647e2acb0ad207c0c98af81@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-20 13:11:27 +00:00
Jisheng Zhang
b461ac1cc6
regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n
Fix below warning when CONFIG_OF=n:

drivers/regulator/stm32-booster.c:104:34: warning: ‘stm32_booster_of_match’ defined but not used [-Wunused-const-variable=]
  104 | static const struct of_device_id stm32_booster_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Link: https://lore.kernel.org/r/20200821111943.29b2b4ca@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-21 17:28:20 +01:00
Axel Lin
03b77f0b85
regulator: stm32-booster: Remove .min_uV and .list_voltage for fixed regulator
Setting .n_voltages = 1 and .fixed_uV is enough for fixed regulator,
remove the redundant .min_uV and .list_voltage settings.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Link: https://lore.kernel.org/r/20190723014102.25103-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-23 12:28:01 +01:00
Fabrice Gasnier
4e210fbeee
regulator: add support for the stm32-booster
Add support for the 3.3V booster regulator embedded in stm32h7 and stm32mp1
devices, that can be used to supply ADC analog input switches.

This regulator is supplied by vdda. It's controlled by using SYSCFG:
- STM32H7 has a unique register to set/clear the booster enable bit
- STM32MP1 has separate set and clear registers to configure it.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-02 12:45:12 +01:00