Message ID | 20220604193300.125758-2-robimarko@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/2] regulator: qcom_smd: add get_voltage to MP5496 | expand |
On Sat, Jun 04, 2022 at 09:33:00PM +0200, Robert Marko wrote: > Currently set MP5496 Buck and LDO ranges dont match its datasheet[1]. > According to the datasheet: > Buck range is 0.6-2.1875V with a 12.5mV step > LDO range is 0.8-3.975V with a 25mV step. Doesn't make much difference here but in general fixes like this should come before new features in a series so they can be applied without dependency issues.
On Tue, 7 Jun 2022 at 21:21, Mark Brown <broonie@kernel.org> wrote: > > On Sat, Jun 04, 2022 at 09:33:00PM +0200, Robert Marko wrote: > > Currently set MP5496 Buck and LDO ranges dont match its datasheet[1]. > > According to the datasheet: > > Buck range is 0.6-2.1875V with a 12.5mV step > > LDO range is 0.8-3.975V with a 25mV step. > > Doesn't make much difference here but in general fixes like this should > come before new features in a series so they can be applied without > dependency issues. Will do it next time, thanks for the heads up. Regards, Robert
diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index 5ec68250e79d..6c69359b3ef2 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -724,19 +724,19 @@ static const struct regulator_desc pms405_pldo600 = { static const struct regulator_desc mp5496_smpa2 = { .linear_ranges = (struct linear_range[]) { - REGULATOR_LINEAR_RANGE(725000, 0, 27, 12500), + REGULATOR_LINEAR_RANGE(600000, 0, 127, 12500), }, .n_linear_ranges = 1, - .n_voltages = 28, + .n_voltages = 128, .ops = &rpm_mp5496_ops, }; static const struct regulator_desc mp5496_ldoa2 = { .linear_ranges = (struct linear_range[]) { - REGULATOR_LINEAR_RANGE(1800000, 0, 60, 25000), + REGULATOR_LINEAR_RANGE(800000, 0, 127, 25000), }, .n_linear_ranges = 1, - .n_voltages = 61, + .n_voltages = 128, .ops = &rpm_mp5496_ops, };
Currently set MP5496 Buck and LDO ranges dont match its datasheet[1]. According to the datasheet: Buck range is 0.6-2.1875V with a 12.5mV step LDO range is 0.8-3.975V with a 25mV step. So, correct the ranges according to the datasheet[1]. [1] https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP5496GR/document_id/6906/ Signed-off-by: Robert Marko <robimarko@gmail.com> --- drivers/regulator/qcom_smd-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)