From: Charles Keepax Date: Thu, 18 May 2017 15:32:38 +0000 (+0100) Subject: ASoC: cs35l35: Correctly handle 0 for bst_ipk X-Git-Tag: android-x86-8.1-r1~2533^2~60^2~3^6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=486fb9590302f811d44fa15401e1736679d33736;p=android-x86%2Fkernel.git 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 Signed-off-by: Mark Brown --- 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, 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);