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 <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
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 <vkarp@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Brian Austin 2018-01-24 08:04:48 -06:00 • committed by Ravikumar Vembu
commit 66d3a850b9

View file

@ -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));