From 66d3a850b955209a2228d3c63cb466cb84b95eca Mon Sep 17 00:00:00 2001 From: Brian Austin Date: Wed, 24 Jan 2018 08:04:48 -0600 Subject: [PATCH] ASoC: cs35l36: Move OTP PAC call to B0 We should do the PAC OTP trim kickoff if we are only B0, so place the call where we determine it is in fact B0 Change-Id: Ida17815c68f8a5785b6cc1f802903c40659ead8f Signed-off-by: Brian Austin Signed-off-by: Ravi Vembu Mot-CRs-fixed: (CR) Reviewed-on: https://gerrit.mot.com/1140349 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Vladimir Karpovich Submit-Approved: Jira Key --- sound/soc/codecs/cs35l36.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index 9f18ad0b34c5..d49b8ce98949 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -1565,12 +1565,6 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client, else cs35l36->chip_version = CS35L36_10V_L36; - ret = cs35l36_pac(cs35l36); - if (ret < 0) { - dev_err(dev, "Failed to Trim OTP %d\n", ret); - goto err; - } - if (pdata->irq_config.is_present) irq_pol = cs35l36_irq_gpio_config(cs35l36); @@ -1591,6 +1585,11 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client, } } if (cs35l36->rev_id == CS35L36_REV_B0) { + ret = cs35l36_pac(cs35l36); + if (ret < 0) { + dev_err(dev, "Failed to Trim OTP %d\n", ret); + goto err; + } ret = regmap_register_patch(cs35l36->regmap, cs35l36_revb0_errata_patch, ARRAY_SIZE(cs35l36_revb0_errata_patch));