regulator: qcom_spmi: Add slewing delays for all SMPS types
authorStephen Boyd <stephen.boyd@linaro.org>
Thu, 31 Mar 2016 01:57:49 +0000 (18:57 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 31 Mar 2016 17:32:35 +0000 (10:32 -0700)
commit2cf7b99cf74b435f27e48aa2829300c4d0aa65a0
treec9ce9b14f04467f9e96211261cdc1378d999aea9
parent6ee5c04407f59122774c8da26f3ee8d6db9cec9b
regulator: qcom_spmi: Add slewing delays for all SMPS types

Only the FT SMPS type regulators have slewing supported in the
driver, but all types of SMPS regulators need the same support.
The only difference is that some SMPS regulators don't have a
step size and the step delay is typically 20, not 8. Luckily, the
step size reads as 0 for the non-FT types, so we can always read
that, but we need to detect which type of regulator we're using
to figure out what step delay to use. Make these minor
adjustments to the slew rate calculations and add support for the
delay function to the appropriate regulator ops.

Reported-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_spmi-regulator.c