diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2017-05-18 11:32:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-05-19 12:31:34 -0400 |
commit | 486fb9590302f811d44fa15401e1736679d33736 (patch) | |
tree | 743f116122694836bde68ab21e18d4b2954e439b | |
parent | cff7597a46454cf0ef0de7340dfb3f6bc0855777 (diff) |
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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/cs35l35.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c index c6eabb8610f0..375be49b7fd0 100644 --- a/sound/soc/codecs/cs35l35.c +++ b/sound/soc/codecs/cs35l35.c | |||
@@ -1269,7 +1269,7 @@ static int cs35l35_handle_of_data(struct i2c_client *i2c_client, | |||
1269 | return -EINVAL; | 1269 | return -EINVAL; |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | pdata->bst_ipk = (val32 - 1680) / 110; | 1272 | pdata->bst_ipk = ((val32 - 1680) / 110) | CS35L35_VALID_PDATA; |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | ret = of_property_read_u32(np, "cirrus,boost-ind-nanohenry", &val32); | 1275 | ret = of_property_read_u32(np, "cirrus,boost-ind-nanohenry", &val32); |