regulator: scmi: Fix off-by-one for linear regulators .n_voltages setting
BugLink: https://bugs.launchpad.net/bugs/1934012
commit
36cb555fae0875d5416e8514a84a427bec6e4cda upstream.
For linear regulators, the .n_voltages is (max_uv - min_uv) / uv_step + 1.
Fixes: 0fbeae70ee7c ("regulator: add SCMI driver")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20210521073020.1944981-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>