]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ASoC: cs35l35: Correctly handle 0 for bst_ipk
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 18 May 2017 15:32:38 +0000 (16:32 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 19 May 2017 16:31:34 +0000 (17:31 +0100)
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>
sound/soc/codecs/cs35l35.c

index c6eabb8610f013236bb60608167041baad3c1386..375be49b7fd0b2f528b1a6a8b67a3c2e6beea774 100644 (file)
@@ -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);