summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/qcom_usb_vbus-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10Douglas Anderson2023-03-201-0/+1
| | | | | | | | | | 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>
* regulator: Add a routine to set the current limit for QCOM PMIC VBUSBryan O'Donoghue2021-05-101-0/+12
| | | | | | | | | | | | | | | | | | | 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>
* regulator: set of_node for qcom vbus regulatorJonathan Marek2020-08-181-0/+1
| | | | | | | | | | 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>
* regulator: fix null pointer check on regmapColin Ian King2020-07-021-1/+1
| | | | | | | | | | | | 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>
* regulator: Add support for QCOM PMIC VBUS boosterWesley Cheng2020-07-011-0/+97
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>