summaryrefslogtreecommitdiff
path: root/drivers/regulator/qcom_usb_vbus-regulator.c
AgeCommit message (Collapse)Author
2023-07-14regulator: Explicitly include correct DT includesRob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230714174930.4063320-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-20regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10Douglas Anderson
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 5.4 but did exist in Linux 5.10. Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20230316125351.4.I01f21c98901641a009890590ddc1354c0f294e5e@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10regulator: Add a routine to set the current limit for QCOM PMIC VBUSBryan O'Donoghue
Add hooks to regulator_get_current_limit_regmap() and regulator_set_current_limit_regmap() with an accompanying map of amperages. This lets us use the existing helper functions to map requested current settings to register bit-map/indicies. This change is required to elevate the default 2 Amps set by the bootloader to 3 Amps or indeed to constrain the value lower as the system design may dictate. The valid range is 500 mA to 3 A in increments of 500 mA. Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20210427130712.2005456-2-bryan.odonoghue@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18regulator: set of_node for qcom vbus regulatorJonathan Marek
This allows the regulator to be found by devm_regulator_get(). Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster") Signed-off-by: Jonathan Marek <jonathan@marek.ca> Link: https://lore.kernel.org/r/20200818162508.5246-1-jonathan@marek.ca Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-02regulator: fix null pointer check on regmapColin Ian King
The null pointer check on regmap that checks for a dev_get_regmap failure is currently returning -ENOENT if the regmap succeeded. Fix this by adding in the missing ! operator. Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster") Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Dereference after null check") Link: https://lore.kernel.org/r/20200702115659.38208-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-01regulator: Add support for QCOM PMIC VBUS boosterWesley Cheng
Some Qualcomm PMICs have the capability to source the VBUS output to connected peripherals. This driver will register a regulator to the regulator list to enable or disable this source by an external driver. Signed-off-by: Wesley Cheng <wcheng@codeaurora.org> Link: https://lore.kernel.org/r/20200626185516.18018-5-wcheng@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>