summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/qcom_smd-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'regulator/topic/qcom_smd' into regulator-nextMark Brown2018-03-281-2/+0
|\
| * regulator: qcom_smd: Drop regulator/{machine,of_regulator} includesStephen Boyd2018-03-221-2/+0
| | | | | | | | | | | | | | | | | | These seem to be leftovers from previous developments of the driver but they never got removed. Dropping them still allows the code to compile so everything must be fine. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: qcom: smd: Add pm8998 and pmi8998 regulatorsBjorn Andersson2018-03-281-0/+121
|/ | | | | | | Add the pm8998 and pmi8998 regulators as used in the MSM8998 platform. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: add NULL check on of_match_device() return valueGustavo A. R. Silva2017-07-071-0/+5
| | | | | | | | | | Check return value from call to of_match_device() in order to prevent a NULL pointer dereference. In case of NULL print error message and return. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-smd: Add PM8994 regulator supportRajendra Nayak2017-01-191-0/+102
| | | | | | | | | | This patch adds support for the PM8994 regulators found on msm8992, msm8994 and msm8996 platforms. Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> [bjorn: Add DT binding doc and vdd_lvs1_2 supply] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Fix voltage ranges for pma8084 ftsmps and pldoStephen Boyd2016-08-051-6/+7
| | | | | | | | | | | | | | | | The voltage ranges listed here are wrong. The pma8084 pldo supports three different overlapping voltage ranges with differing step sizes and the pma8084 ftsmps supports two. These ranges can be seen in the "native" spmi regulator driver (qcom_spmi-regulator.c) at pldo_ranges[] and ftsmps_ranges[] respectively. Port these ranges over to the RPM SMD regulator driver so that we list the appropriate set of supported voltages on these types of regulators. Fixes: ee01d0c91ef1 ("regulator: qcom-smd: Add support for PMA8084") Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Fix voltage ranges for pm8x41Stephen Boyd2016-08-051-8/+9
| | | | | | | | | | | | | | | | | The voltage ranges listed here are wrong. The correct ranges can be seen in the "native" spmi regulator driver qcom_spmi-regulator.c at pldo_ranges[], ftsmps_ranges[] and boost_ranges[] for the pldo, ftsmps, and boost type regulators. Port these ranges over to the RPM SMD regulator driver so that we list the appropriate set of supported voltages on pldos. Doing this allows us to specify a voltage like 3075000 for l24, whereas before that wasn't a supported voltage. Fixes: da65e367b67e ("regulator: Regulator driver for the Qualcomm RPM") Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Avoid overlapping linear voltage rangesStephen Boyd2016-07-121-1/+1
| | | | | | | | | | | | | | | | | The pm8x41_hfsmps ranges overlap. The first range is from 375000 to 1562500: 375000 + (95 * 12500) == 1562500 and the second range starts at 1550000. Interestingly, the second range ends at the correct value when it's set to be the appropriate start value, 1575000: 1575000 + ((158 - 96) * 25000) == 3125000 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Remove list_voltage callback for rpm_smps_ldo_ops_fixedAxel Lin2016-06-151-1/+0
| | | | | | | | | | | | Use regulator_list_voltage_linear_range in rpm_smps_ldo_ops_fixed is wrong because it is used for fixed regulator without any linear range. The rpm_smps_ldo_ops_fixed is used for pm8941_lnldo which has fixed_uV set and n_voltages = 1. In this case, regulator_list_voltage() can return rdev->desc->fixed_uV without .list_voltage implementation. Fixes: 3bfbb4d1a480 ("regulator: qcom_smd: add list_voltage callback") Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: add list_voltage callbackSrinivas Kandagatla2016-06-131-0/+1
| | | | | | | | | | This patch adds support to list_voltage callback, so that consumers like mmc core, can get information of supported voltage range. Without this patch there is no way for mmc core to know this voltage range. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: add regulator ops for pm8941 lnldoSrinivas Kandagatla2016-06-081-1/+12
| | | | | | | | | | | | After "regulator: qcom_smd: add list_voltage callback" patch adding pm8941 lnldo regulators would bug on list_voltages as it is a fixed regulator without any linear range. This patch fixes that issue by adding dedicated ops for pm8941 lnldo without list_voltages callback. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org # v4.6
* regulator: qcom_smd: add list_voltage callbackSrinivas Kandagatla2016-06-081-0/+1
| | | | | | | | | | | This patch adds support to list_voltage callback, so that consumers like mmc core, can get information of supported voltage range. Without this patch there is no way for mmc core to know this voltage range. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org # v4.6
* regulator: qcom-smd: Add support for PMA8084Andy Gross2015-12-161-0/+95
| | | | | | | | | This patch adds support and documentation for the PMA8084 regulators found on APQ8084 platforms. Signed-off-by: Andy Gross <agross@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-smd: Add PM8916 supportAndy Gross2015-12-161-0/+64
| | | | | | | | | This patch adds support and documentation for the PM8916 regulators found on MSM8916 platforms. Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-smd: Correct set_load() unitBjorn Andersson2015-10-221-1/+1
| | | | | | | | The set_load() op deals with uA while the SMD packets used mA, so convert as we're building the packet. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Handle big endian CPUsStephen Boyd2015-09-031-14/+14
| | | | | | | | | | The smd rpm structures are always in little endian, but this driver is not capable of being used on big endian CPUs. Annotate the little endian data members and update the code to do the proper byte swapping. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom_smd: Set n_voltages for pm8941_lnldoAxel Lin2015-08-191-0/+1
| | | | | | | | | Just setting fixed_uV is not enough, the regulator core will also check n_voltages setting. The fixed_uV only works when n_voltages is 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: Regulator driver for the Qualcomm RPMBjorn Andersson2015-08-171-0/+349
Driver for regulators exposed by the Resource Power Manager (RPM) found in devices based on Qualcomm 8974 and newer platforms. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by: Andy Gross <agross@codeaurora.org> Tested-by: Tim Bird <tim.bird@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud