提交 486fb959 编写于 作者: C Charles Keepax 提交者: Mark Brown

ASoC: cs35l35: Correctly handle 0 for bst_ipk

Zero is a totally valid value to specify for the bst_ipk, as such we
should append CS35L35_VALID_PDATA to ensure that it actually makes it
into the register value.
Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 cff7597a
...@@ -1269,7 +1269,7 @@ static int cs35l35_handle_of_data(struct i2c_client *i2c_client, ...@@ -1269,7 +1269,7 @@ static int cs35l35_handle_of_data(struct i2c_client *i2c_client,
return -EINVAL; return -EINVAL;
} }
pdata->bst_ipk = (val32 - 1680) / 110; pdata->bst_ipk = ((val32 - 1680) / 110) | CS35L35_VALID_PDATA;
} }
ret = of_property_read_u32(np, "cirrus,boost-ind-nanohenry", &val32); ret = of_property_read_u32(np, "cirrus,boost-ind-nanohenry", &val32);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册