diff options
Diffstat (limited to 'sound/soc/codecs/rt5665.c')
| -rw-r--r-- | sound/soc/codecs/rt5665.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index 34254fd47efe..324461e985b3 100644 --- a/sound/soc/codecs/rt5665.c +++ b/sound/soc/codecs/rt5665.c | |||
| @@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) | |||
| 4587 | pr_err("HP Calibration Failure\n"); | 4587 | pr_err("HP Calibration Failure\n"); |
| 4588 | regmap_write(rt5665->regmap, RT5665_RESET, 0); | 4588 | regmap_write(rt5665->regmap, RT5665_RESET, 0); |
| 4589 | regcache_cache_bypass(rt5665->regmap, false); | 4589 | regcache_cache_bypass(rt5665->regmap, false); |
| 4590 | return; | 4590 | goto out_unlock; |
| 4591 | } | 4591 | } |
| 4592 | 4592 | ||
| 4593 | count++; | 4593 | count++; |
| @@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) | |||
| 4606 | pr_err("MONO Calibration Failure\n"); | 4606 | pr_err("MONO Calibration Failure\n"); |
| 4607 | regmap_write(rt5665->regmap, RT5665_RESET, 0); | 4607 | regmap_write(rt5665->regmap, RT5665_RESET, 0); |
| 4608 | regcache_cache_bypass(rt5665->regmap, false); | 4608 | regcache_cache_bypass(rt5665->regmap, false); |
| 4609 | return; | 4609 | goto out_unlock; |
| 4610 | } | 4610 | } |
| 4611 | 4611 | ||
| 4612 | count++; | 4612 | count++; |
| @@ -4621,6 +4621,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) | |||
| 4621 | regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); | 4621 | regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); |
| 4622 | regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); | 4622 | regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); |
| 4623 | 4623 | ||
| 4624 | out_unlock: | ||
| 4624 | mutex_unlock(&rt5665->calibrate_mutex); | 4625 | mutex_unlock(&rt5665->calibrate_mutex); |
| 4625 | } | 4626 | } |
| 4626 | 4627 | ||
| @@ -4676,11 +4677,9 @@ static int rt5665_i2c_probe(struct i2c_client *i2c, | |||
| 4676 | } | 4677 | } |
| 4677 | 4678 | ||
| 4678 | if (gpio_is_valid(rt5665->pdata.ldo1_en)) { | 4679 | if (gpio_is_valid(rt5665->pdata.ldo1_en)) { |
| 4679 | if (devm_gpio_request(&i2c->dev, rt5665->pdata.ldo1_en, | 4680 | if (devm_gpio_request_one(&i2c->dev, rt5665->pdata.ldo1_en, |
| 4680 | "rt5665")) | 4681 | GPIOF_OUT_INIT_HIGH, "rt5665")) |
| 4681 | dev_err(&i2c->dev, "Fail gpio_request gpio_ldo\n"); | 4682 | dev_err(&i2c->dev, "Fail gpio_request gpio_ldo\n"); |
| 4682 | else if (gpio_direction_output(rt5665->pdata.ldo1_en, 1)) | ||
| 4683 | dev_err(&i2c->dev, "Fail gpio_direction gpio_ldo\n"); | ||
| 4684 | } | 4683 | } |
| 4685 | 4684 | ||
| 4686 | /* Sleep for 300 ms miniumum */ | 4685 | /* Sleep for 300 ms miniumum */ |
