提交 fde7b46c 编写于 作者: A Axel Lin 提交者: Wang ShaoBo

regulator: fan53880: Fix missing n_voltages setting

stable inclusion
from stable-v5.10.44
commit 5a5f5cfb5f0996d65eae3cc034513d90f4be6783
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=401
CVE: NA

-------------------------------------------------

commit 34991ee9 upstream.

Fixes: e6dea51e ("regulator: fan53880: Add initial support")
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NChristoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/20210517105325.1227393-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nlantianbaiyun <lianyi21@mails.ucas.ac.cn>
Reviewed-by: NJian Cheng <cj.chengjian@huawei.com>
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
上级 f08c2d75
...@@ -51,6 +51,7 @@ static const struct regulator_ops fan53880_ops = { ...@@ -51,6 +51,7 @@ static const struct regulator_ops fan53880_ops = {
REGULATOR_LINEAR_RANGE(800000, 0xf, 0x73, 25000), \ REGULATOR_LINEAR_RANGE(800000, 0xf, 0x73, 25000), \
}, \ }, \
.n_linear_ranges = 2, \ .n_linear_ranges = 2, \
.n_voltages = 0x74, \
.vsel_reg = FAN53880_LDO ## _num ## VOUT, \ .vsel_reg = FAN53880_LDO ## _num ## VOUT, \
.vsel_mask = 0x7f, \ .vsel_mask = 0x7f, \
.enable_reg = FAN53880_ENABLE, \ .enable_reg = FAN53880_ENABLE, \
...@@ -76,6 +77,7 @@ static const struct regulator_desc fan53880_regulators[] = { ...@@ -76,6 +77,7 @@ static const struct regulator_desc fan53880_regulators[] = {
REGULATOR_LINEAR_RANGE(600000, 0x1f, 0xf7, 12500), REGULATOR_LINEAR_RANGE(600000, 0x1f, 0xf7, 12500),
}, },
.n_linear_ranges = 2, .n_linear_ranges = 2,
.n_voltages = 0xf8,
.vsel_reg = FAN53880_BUCKVOUT, .vsel_reg = FAN53880_BUCKVOUT,
.vsel_mask = 0x7f, .vsel_mask = 0x7f,
.enable_reg = FAN53880_ENABLE, .enable_reg = FAN53880_ENABLE,
...@@ -95,6 +97,7 @@ static const struct regulator_desc fan53880_regulators[] = { ...@@ -95,6 +97,7 @@ static const struct regulator_desc fan53880_regulators[] = {
REGULATOR_LINEAR_RANGE(3000000, 0x4, 0x70, 25000), REGULATOR_LINEAR_RANGE(3000000, 0x4, 0x70, 25000),
}, },
.n_linear_ranges = 2, .n_linear_ranges = 2,
.n_voltages = 0x71,
.vsel_reg = FAN53880_BOOSTVOUT, .vsel_reg = FAN53880_BOOSTVOUT,
.vsel_mask = 0x7f, .vsel_mask = 0x7f,
.enable_reg = FAN53880_ENABLE_BOOST, .enable_reg = FAN53880_ENABLE_BOOST,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册